Loading packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java +1 −5 Original line number Diff line number Diff line Loading @@ -178,11 +178,7 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { * @param translationX how to translate the horizontal position */ public void setPanelTranslation(float translationX) { if (isLayoutRtl()) { setTranslationX(translationX + mCutOutInset); } else { setTranslationX(translationX - mCutOutInset); } setTranslationX(translationX); updateDrawingRect(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceController.java +10 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import android.graphics.Point; import android.graphics.Rect; import android.view.DisplayCutout; import android.view.View; import android.view.WindowInsets; Loading Loading @@ -159,8 +160,15 @@ public class HeadsUpAppearanceController implements OnHeadsUpChangedListener, } WindowInsets windowInset = mStackScroller.getRootWindowInsets(); return windowInset.getSystemWindowInsetLeft() + mStackScroller.getRight() + windowInset.getSystemWindowInsetRight() - realDisplaySize; DisplayCutout cutout = (windowInset != null) ? windowInset.getDisplayCutout() : null; int sysWinLeft = (windowInset != null) ? windowInset.getStableInsetLeft() : 0; int sysWinRight = (windowInset != null) ? windowInset.getStableInsetRight() : 0; int cutoutLeft = (cutout != null) ? cutout.getSafeInsetLeft() : 0; int cutoutRight = (cutout != null) ? cutout.getSafeInsetRight() : 0; int leftInset = Math.max(sysWinLeft, cutoutLeft); int rightInset = Math.max(sysWinRight, cutoutRight); return leftInset + mStackScroller.getRight() + rightInset - realDisplaySize; } public void updatePanelTranslation() { Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +13 −18 Original line number Diff line number Diff line Loading @@ -331,16 +331,13 @@ public class PhoneStatusBarView extends PanelBar { // or letterboxing from the right or left sides. FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams(); if (mDisplayCutout == null) { if (mDisplayCutout == null || mDisplayCutout.isEmpty() || mLastOrientation != ORIENTATION_PORTRAIT || cornerCutoutMargins == null) { lp.leftMargin = 0; lp.rightMargin = 0; return; } lp.leftMargin = mDisplayCutout.getSafeInsetLeft(); lp.rightMargin = mDisplayCutout.getSafeInsetRight(); if (cornerCutoutMargins != null) { lp.leftMargin = Math.max(lp.leftMargin, cornerCutoutMargins.first); lp.rightMargin = Math.max(lp.rightMargin, cornerCutoutMargins.second); Loading @@ -354,8 +351,6 @@ public class PhoneStatusBarView extends PanelBar { if (lp.rightMargin <= rightInset) { lp.rightMargin = 0; } } } public static Pair<Integer, Integer> cornerCutoutMargins(DisplayCutout cutout, Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +15 −3 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.os.IBinder; import android.os.SystemClock; import android.util.AttributeSet; import android.view.ActionMode; import android.view.DisplayCutout; import android.view.InputDevice; import android.view.InputQueue; import android.view.KeyEvent; Loading Loading @@ -118,10 +119,21 @@ public class StatusBarWindowView extends FrameLayout { boolean paddingChanged = insets.top != getPaddingTop() || insets.bottom != getPaddingBottom(); int rightCutout = 0; int leftCutout = 0; DisplayCutout displayCutout = getRootWindowInsets().getDisplayCutout(); if (displayCutout != null) { leftCutout = displayCutout.getSafeInsetLeft(); rightCutout = displayCutout.getSafeInsetRight(); } int targetLeft = Math.max(insets.left, leftCutout); int targetRight = Math.max(insets.right, rightCutout); // Super-special right inset handling, because scrims and backdrop need to ignore it. if (insets.right != mRightInset || insets.left != mLeftInset) { mRightInset = insets.right; mLeftInset = insets.left; if (targetRight != mRightInset || targetLeft != mLeftInset) { mRightInset = targetRight; mLeftInset = targetLeft; applyMargins(); } // Drop top inset, and pass through bottom inset. Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/HeadsUpStatusBarView.java +1 −5 Original line number Diff line number Diff line Loading @@ -178,11 +178,7 @@ public class HeadsUpStatusBarView extends AlphaOptimizedLinearLayout { * @param translationX how to translate the horizontal position */ public void setPanelTranslation(float translationX) { if (isLayoutRtl()) { setTranslationX(translationX + mCutOutInset); } else { setTranslationX(translationX - mCutOutInset); } setTranslationX(translationX); updateDrawingRect(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/HeadsUpAppearanceController.java +10 −2 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ package com.android.systemui.statusbar.phone; import android.graphics.Point; import android.graphics.Rect; import android.view.DisplayCutout; import android.view.View; import android.view.WindowInsets; Loading Loading @@ -159,8 +160,15 @@ public class HeadsUpAppearanceController implements OnHeadsUpChangedListener, } WindowInsets windowInset = mStackScroller.getRootWindowInsets(); return windowInset.getSystemWindowInsetLeft() + mStackScroller.getRight() + windowInset.getSystemWindowInsetRight() - realDisplaySize; DisplayCutout cutout = (windowInset != null) ? windowInset.getDisplayCutout() : null; int sysWinLeft = (windowInset != null) ? windowInset.getStableInsetLeft() : 0; int sysWinRight = (windowInset != null) ? windowInset.getStableInsetRight() : 0; int cutoutLeft = (cutout != null) ? cutout.getSafeInsetLeft() : 0; int cutoutRight = (cutout != null) ? cutout.getSafeInsetRight() : 0; int leftInset = Math.max(sysWinLeft, cutoutLeft); int rightInset = Math.max(sysWinRight, cutoutRight); return leftInset + mStackScroller.getRight() + rightInset - realDisplaySize; } public void updatePanelTranslation() { Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java +13 −18 Original line number Diff line number Diff line Loading @@ -331,16 +331,13 @@ public class PhoneStatusBarView extends PanelBar { // or letterboxing from the right or left sides. FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams(); if (mDisplayCutout == null) { if (mDisplayCutout == null || mDisplayCutout.isEmpty() || mLastOrientation != ORIENTATION_PORTRAIT || cornerCutoutMargins == null) { lp.leftMargin = 0; lp.rightMargin = 0; return; } lp.leftMargin = mDisplayCutout.getSafeInsetLeft(); lp.rightMargin = mDisplayCutout.getSafeInsetRight(); if (cornerCutoutMargins != null) { lp.leftMargin = Math.max(lp.leftMargin, cornerCutoutMargins.first); lp.rightMargin = Math.max(lp.rightMargin, cornerCutoutMargins.second); Loading @@ -354,8 +351,6 @@ public class PhoneStatusBarView extends PanelBar { if (lp.rightMargin <= rightInset) { lp.rightMargin = 0; } } } public static Pair<Integer, Integer> cornerCutoutMargins(DisplayCutout cutout, Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java +15 −3 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.os.IBinder; import android.os.SystemClock; import android.util.AttributeSet; import android.view.ActionMode; import android.view.DisplayCutout; import android.view.InputDevice; import android.view.InputQueue; import android.view.KeyEvent; Loading Loading @@ -118,10 +119,21 @@ public class StatusBarWindowView extends FrameLayout { boolean paddingChanged = insets.top != getPaddingTop() || insets.bottom != getPaddingBottom(); int rightCutout = 0; int leftCutout = 0; DisplayCutout displayCutout = getRootWindowInsets().getDisplayCutout(); if (displayCutout != null) { leftCutout = displayCutout.getSafeInsetLeft(); rightCutout = displayCutout.getSafeInsetRight(); } int targetLeft = Math.max(insets.left, leftCutout); int targetRight = Math.max(insets.right, rightCutout); // Super-special right inset handling, because scrims and backdrop need to ignore it. if (insets.right != mRightInset || insets.left != mLeftInset) { mRightInset = insets.right; mLeftInset = insets.left; if (targetRight != mRightInset || targetLeft != mLeftInset) { mRightInset = targetRight; mLeftInset = targetLeft; applyMargins(); } // Drop top inset, and pass through bottom inset. Loading