Loading policy/src/com/android/internal/policy/impl/PhoneWindow.java +22 −7 Original line number Diff line number Diff line Loading @@ -2164,6 +2164,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { private int mLastBottomInset = 0; private int mLastRightInset = 0; private int mLastSystemUiVisibility = 0; private int mLastWindowSystemUiVisibility = 0; public DecorView(Context context, int featureId) { Loading Loading @@ -2749,6 +2750,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { updateColorViews(null /* insets */); } @Override public void onWindowSystemUiVisibilityChanged(int visible) { mLastWindowSystemUiVisibility = visible; updateColorViews(null /* insets */); } @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { mFrameOffsets.set(insets.getSystemWindowInsets()); Loading Loading @@ -2791,7 +2798,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } WindowManager.LayoutParams attrs = getAttributes(); int sysUiVisibility = attrs.systemUiVisibility | attrs.subtreeSystemUiVisibility; int sysUiVisibility = attrs.systemUiVisibility | mLastWindowSystemUiVisibility; // When we expand the window with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, we still need // to ensure that the rest of the view hierarchy doesn't notice it, unless they've Loading @@ -2812,16 +2819,24 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { lp.rightMargin = consumedRight; lp.bottomMargin = consumedBottom; mContentRoot.setLayoutParams(lp); if (insets == null) { // The insets have changed, but we're not currently in the process // of dispatching them. requestApplyInsets(); } } if (insets != null) { insets = insets.consumeStableInsets().replaceSystemWindowInsets( insets = insets.replaceSystemWindowInsets( insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight() - consumedRight, insets.getSystemWindowInsetBottom() - consumedBottom ); insets.getSystemWindowInsetBottom() - consumedBottom); } } if (insets != null) { insets = insets.consumeStableInsets(); } return insets; } Loading services/core/java/com/android/server/wm/WindowStateAnimator.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static com.android.server.wm.WindowManagerService.DEBUG_ANIM; import static com.android.server.wm.WindowManagerService.DEBUG_LAYERS; Loading Loading @@ -1271,9 +1272,10 @@ class WindowStateAnimator { // not always reporting the correct system decor rect. In such // cases, we take into account the specified content insets as well. if ((w.mSystemUiVisibility & SYSTEM_UI_FLAGS_LAYOUT_STABLE_FULLSCREEN) == SYSTEM_UI_FLAGS_LAYOUT_STABLE_FULLSCREEN) { == SYSTEM_UI_FLAGS_LAYOUT_STABLE_FULLSCREEN || (w.mAttrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) { // Don't apply the workaround to apps explicitly requesting // fullscreen layout. // fullscreen layout or when the bars are transparent. clipRect.intersect(mClipRect); } else { final int offsetTop = Math.max(clipRect.top, w.mContentInsets.top); Loading Loading
policy/src/com/android/internal/policy/impl/PhoneWindow.java +22 −7 Original line number Diff line number Diff line Loading @@ -2164,6 +2164,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { private int mLastBottomInset = 0; private int mLastRightInset = 0; private int mLastSystemUiVisibility = 0; private int mLastWindowSystemUiVisibility = 0; public DecorView(Context context, int featureId) { Loading Loading @@ -2749,6 +2750,12 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { updateColorViews(null /* insets */); } @Override public void onWindowSystemUiVisibilityChanged(int visible) { mLastWindowSystemUiVisibility = visible; updateColorViews(null /* insets */); } @Override public WindowInsets onApplyWindowInsets(WindowInsets insets) { mFrameOffsets.set(insets.getSystemWindowInsets()); Loading Loading @@ -2791,7 +2798,7 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { } WindowManager.LayoutParams attrs = getAttributes(); int sysUiVisibility = attrs.systemUiVisibility | attrs.subtreeSystemUiVisibility; int sysUiVisibility = attrs.systemUiVisibility | mLastWindowSystemUiVisibility; // When we expand the window with FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS, we still need // to ensure that the rest of the view hierarchy doesn't notice it, unless they've Loading @@ -2812,16 +2819,24 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { lp.rightMargin = consumedRight; lp.bottomMargin = consumedBottom; mContentRoot.setLayoutParams(lp); if (insets == null) { // The insets have changed, but we're not currently in the process // of dispatching them. requestApplyInsets(); } } if (insets != null) { insets = insets.consumeStableInsets().replaceSystemWindowInsets( insets = insets.replaceSystemWindowInsets( insets.getSystemWindowInsetLeft(), insets.getSystemWindowInsetTop(), insets.getSystemWindowInsetRight() - consumedRight, insets.getSystemWindowInsetBottom() - consumedBottom ); insets.getSystemWindowInsetBottom() - consumedBottom); } } if (insets != null) { insets = insets.consumeStableInsets(); } return insets; } Loading
services/core/java/com/android/server/wm/WindowStateAnimator.java +4 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.server.wm; import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS; import static android.view.WindowManager.LayoutParams.TYPE_APPLICATION_STARTING; import static com.android.server.wm.WindowManagerService.DEBUG_ANIM; import static com.android.server.wm.WindowManagerService.DEBUG_LAYERS; Loading Loading @@ -1271,9 +1272,10 @@ class WindowStateAnimator { // not always reporting the correct system decor rect. In such // cases, we take into account the specified content insets as well. if ((w.mSystemUiVisibility & SYSTEM_UI_FLAGS_LAYOUT_STABLE_FULLSCREEN) == SYSTEM_UI_FLAGS_LAYOUT_STABLE_FULLSCREEN) { == SYSTEM_UI_FLAGS_LAYOUT_STABLE_FULLSCREEN || (w.mAttrs.flags & FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS) != 0) { // Don't apply the workaround to apps explicitly requesting // fullscreen layout. // fullscreen layout or when the bars are transparent. clipRect.intersect(mClipRect); } else { final int offsetTop = Math.max(clipRect.top, w.mContentInsets.top); Loading