diff options
| author | 2018-03-22 11:33:16 -0700 | |
|---|---|---|
| committer | 2018-03-26 14:02:26 -0700 | |
| commit | 5bcd347b2b36c2d970f23df63ff10df65239a4df (patch) | |
| tree | d45db61c7b62ae09ec3e2d0fc7acc81199db455a | |
| parent | 294ad785342f0eaaf41c59d819edd559450a4a2a (diff) | |
Fixes drawing quickscrub track in correct location with cutout
Cutout changes navigation bar padding, correct track rect with the
padding.
Test: do quickscrub
Change-Id: I762be276cc95af7290219cec1cc6afd27ddc8fd0
Fixes: 74904602
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java index 6047f8e89f3e..a51cd93794f1 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStepController.java @@ -303,16 +303,18 @@ public class QuickStepController implements GestureHelper { @Override public void onLayout(boolean changed, int left, int top, int right, int bottom) { - final int width = right - left; - final int height = bottom - top; + final int width = (right - left) - mNavigationBarView.getPaddingEnd() + - mNavigationBarView.getPaddingStart(); + final int height = (bottom - top) - mNavigationBarView.getPaddingBottom() + - mNavigationBarView.getPaddingTop(); final int x1, x2, y1, y2; if (mIsVertical) { - x1 = (width - mTrackThickness) / 2; + x1 = (width - mTrackThickness) / 2 + mNavigationBarView.getPaddingStart(); x2 = x1 + mTrackThickness; y1 = mDragPositive ? height / 2 : mTrackPadding; y2 = y1 + height / 2 - mTrackPadding; } else { - y1 = (height - mTrackThickness) / 2; + y1 = (height - mTrackThickness) / 2 + mNavigationBarView.getPaddingTop(); y2 = y1 + mTrackThickness; x1 = mDragPositive ? width / 2 : mTrackPadding; x2 = x1 + width / 2 - mTrackPadding; |