Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9be2d893 authored by Shawn Lee's avatar Shawn Lee Committed by Android (Google) Code Review
Browse files

Merge "Revert "[flexiglass] Stop consuming window inset in WindowRootView when...

Merge "Revert "[flexiglass] Stop consuming window inset in WindowRootView when flexiglass is on"" into 24D1-dev
parents d0677e96 c941a07f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@
    android:id="@+id/scene_window_root"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="false">
    android:fitsSystemWindows="true">

    <include layout="@layout/super_notification_shade"
        android:layout_width="match_parent"
+8 −10
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ open class WindowRootView(

    override fun onApplyWindowInsets(windowInsets: WindowInsets): WindowInsets? {
        val insets = windowInsets.getInsetsIgnoringVisibility(WindowInsets.Type.systemBars())
        val displayCutout = rootWindowInsets.displayCutout
        if (fitsSystemWindows) {
            val paddingChanged = insets.top != paddingTop || insets.bottom != paddingBottom

@@ -79,23 +78,22 @@ open class WindowRootView(
            if (paddingChanged) {
                setPadding(0, 0, 0, 0)
            }

            val pairInsets: Pair<Int, Int> =
                layoutInsetsController.getinsets(windowInsets, displayCutout)
            leftInset = pairInsets.first
            rightInset = pairInsets.second
            applyMargins()
        } else {
            val changed =
                paddingLeft != 0 || paddingRight != 0 || paddingTop != 0 || paddingBottom != 0
            if (changed) {
                setPadding(0, 0, 0, 0)
            }

        }
        leftInset = 0
        rightInset = 0
        }

        val displayCutout = rootWindowInsets.displayCutout
        val pairInsets: Pair<Int, Int> =
            layoutInsetsController.getinsets(windowInsets, displayCutout)
        leftInset = pairInsets.first
        rightInset = pairInsets.second
        applyMargins()
        return windowInsets
    }

+1 −2
Original line number Diff line number Diff line
@@ -60,7 +60,6 @@ import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
import com.android.systemui.res.R;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.scene.shared.flag.SceneContainerFlags;
import com.android.systemui.scene.ui.view.WindowRootViewComponent;
import com.android.systemui.settings.UserTracker;
@@ -507,7 +506,7 @@ public class NotificationShadeWindowControllerImpl implements NotificationShadeW

    private void applyFitsSystemWindows(NotificationShadeWindowState state) {
        boolean fitsSystemWindows = !state.isKeyguardShowingAndNotOccluded();
        if (!SceneContainerFlag.isEnabled() && mWindowRootView != null
        if (mWindowRootView != null
                && mWindowRootView.getFitsSystemWindows() != fitsSystemWindows) {
            mWindowRootView.setFitsSystemWindows(fitsSystemWindows);
            mWindowRootView.requestApplyInsets();