diff options
| author | 2020-03-18 05:28:43 +0000 | |
|---|---|---|
| committer | 2020-03-18 05:28:43 +0000 | |
| commit | 841f253cb19090f2ef49d2f315afbc7e00a469c0 (patch) | |
| tree | 90cf346be54e31a91fe54ae7280865ec1fb5a423 | |
| parent | 9144141d326791c0fa04796e80545a10d7e3bfe3 (diff) | |
| parent | 6aa582a731a1afa37454f6d914f174b4fd9bce4c (diff) | |
Merge "Fixed wrong QS padding" into rvc-dev
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java index d422dd7f4175..11b625f41737 100644 --- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java +++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java @@ -436,6 +436,10 @@ public class QuickStatusBarHeader extends RelativeLayout implements @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { + // Handle padding of QuickStatusBarHeader + setPadding(mRoundedCornerPadding, getPaddingTop(), mRoundedCornerPadding, + getPaddingBottom()); + // Handle padding of SystemIconsView DisplayCutout cutout = insets.getDisplayCutout(); Pair<Integer, Integer> cornerCutoutPadding = StatusBarWindowView.cornerCutoutMargins( @@ -450,8 +454,11 @@ public class QuickStatusBarHeader extends RelativeLayout implements int statusBarPaddingRight = isLayoutRtl() ? getResources().getDimensionPixelSize(R.dimen.status_bar_padding_start) : getResources().getDimensionPixelSize(R.dimen.status_bar_padding_end); - mSystemIconsView.setPadding(padding.first + statusBarPaddingLeft, waterfallTopInset, - padding.second + statusBarPaddingRight, 0); + mSystemIconsView.setPadding( + Math.max(padding.first + statusBarPaddingLeft - mRoundedCornerPadding, 0), + waterfallTopInset, + Math.max(padding.second + statusBarPaddingRight - mRoundedCornerPadding, 0), + 0); return super.onApplyWindowInsets(insets); } |