Skip to content

Commit 076324a

Browse files
committed
Fix rounding error when drawing panel handles.
Bug: 7649037 Change-Id: If8d9fa5f3852729207c31c95cfd68ef54ff47d7d
1 parent bf0e106 commit 076324a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
public class NotificationPanelView extends PanelView {
3232

3333
Drawable mHandleBar;
34-
float mHandleBarHeight;
34+
int mHandleBarHeight;
3535
View mHandleView;
3636
int mFingers;
3737
PhoneStatusBar mStatusBar;
@@ -51,7 +51,7 @@ protected void onFinishInflate() {
5151

5252
Resources resources = getContext().getResources();
5353
mHandleBar = resources.getDrawable(R.drawable.status_bar_close);
54-
mHandleBarHeight = resources.getDimension(R.dimen.close_handle_height);
54+
mHandleBarHeight = resources.getDimensionPixelSize(R.dimen.close_handle_height);
5555
mHandleView = findViewById(R.id.handle);
5656

5757
setContentDescription(resources.getString(R.string.accessibility_desc_notification_shade));

packages/SystemUI/src/com/android/systemui/statusbar/phone/SettingsPanelView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class SettingsPanelView extends PanelView {
4141
private QuickSettingsContainerView mQSContainer;
4242

4343
Drawable mHandleBar;
44-
float mHandleBarHeight;
44+
int mHandleBarHeight;
4545
View mHandleView;
4646

4747
public SettingsPanelView(Context context, AttributeSet attrs) {
@@ -56,7 +56,7 @@ protected void onFinishInflate() {
5656

5757
Resources resources = getContext().getResources();
5858
mHandleBar = resources.getDrawable(R.drawable.status_bar_close);
59-
mHandleBarHeight = resources.getDimension(R.dimen.close_handle_height);
59+
mHandleBarHeight = resources.getDimensionPixelSize(R.dimen.close_handle_height);
6060
mHandleView = findViewById(R.id.handle);
6161

6262
setContentDescription(resources.getString(R.string.accessibility_desc_quick_settings));

0 commit comments

Comments
 (0)