diff --git a/packages/SystemUI/res/layout/super_notification_shade.xml b/packages/SystemUI/res/layout/super_notification_shade.xml index e59d71312a63..d4b73a4e3de0 100644 --- a/packages/SystemUI/res/layout/super_notification_shade.xml +++ b/packages/SystemUI/res/layout/super_notification_shade.xml @@ -32,7 +32,6 @@ android:layout_height="match_parent" android:visibility="gone" sysui:ignoreRightInset="true" - sysui:ignoreLeftInset="true" > 348dp - 12dp - 12dp + 0dp + 0dp 12dp 16dp diff --git a/packages/SystemUI/res/values-sw600dp-land/dimens.xml b/packages/SystemUI/res/values-sw600dp-land/dimens.xml index ac8b2c4fad2f..2a27b47e54ca 100644 --- a/packages/SystemUI/res/values-sw600dp-land/dimens.xml +++ b/packages/SystemUI/res/values-sw600dp-land/dimens.xml @@ -76,5 +76,5 @@ when media is not showing. --> 83dp - 0dp + 24dp diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml index e44ac62ff86b..d693631080af 100644 --- a/packages/SystemUI/res/values/attrs.xml +++ b/packages/SystemUI/res/values/attrs.xml @@ -93,7 +93,6 @@ - diff --git a/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt b/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt index a7a40775121a..4afe6797cdfb 100644 --- a/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt +++ b/packages/SystemUI/src/com/android/systemui/scene/ui/view/WindowRootView.kt @@ -101,15 +101,11 @@ open class WindowRootView( if (child.layoutParams is LayoutParams) { val layoutParams = child.layoutParams as LayoutParams if ( - (layoutParams.rightMargin != rightInset || - layoutParams.leftMargin != leftInset) + !layoutParams.ignoreRightInset && + (layoutParams.rightMargin != rightInset || + layoutParams.leftMargin != leftInset) ) { - val leftMargin = if (layoutParams.ignoreLeftInset) 0 else leftInset - val rightMargin = if ( - !layoutParams.ignoreRightInset || - (layoutParams.ignoreLeftInset && layoutParams.rightMargin == 0) - ) rightInset else 0 - layoutParams.updateMargins(left = leftMargin, right = rightMargin) + layoutParams.updateMargins(left = leftInset, right = rightInset) child.requestLayout() } } @@ -138,7 +134,6 @@ open class WindowRootView( private class LayoutParams : FrameLayout.LayoutParams { var ignoreRightInset = false - var ignoreLeftInset = false constructor( width: Int, @@ -163,11 +158,6 @@ open class WindowRootView( R.styleable.StatusBarWindowView_Layout_ignoreRightInset, false ) - ignoreLeftInset = - obtainedAttributes.getBoolean( - R.styleable.StatusBarWindowView_Layout_ignoreLeftInset, - false - ) obtainedAttributes.recycle() } }