Loading core/java/android/view/WindowManager.java +14 −1 Original line number Original line Diff line number Diff line Loading @@ -1692,6 +1692,15 @@ public interface WindowManager extends ViewManager { @RequiresPermission(permission.STATUS_BAR_SERVICE) @RequiresPermission(permission.STATUS_BAR_SERVICE) public static final int PRIVATE_FLAG_IS_SCREEN_DECOR = 0x00400000; public static final int PRIVATE_FLAG_IS_SCREEN_DECOR = 0x00400000; /** * Flag to indicate that the status bar window is now in an explicit expanded state, meaning * that status bar will not be hidden by any window with flag {@link #FLAG_FULLSCREEN} or * {@link View#SYSTEM_UI_FLAG_FULLSCREEN} set. * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. * @hide */ public static final int PRIVATE_FLAG_STATUS_BAR_EXPANDED = 0x00800000; /** /** * Control flags that are private to the platform. * Control flags that are private to the platform. * @hide * @hide Loading Loading @@ -1780,7 +1789,11 @@ public interface WindowManager extends ViewManager { @ViewDebug.FlagToString( @ViewDebug.FlagToString( mask = PRIVATE_FLAG_IS_SCREEN_DECOR, mask = PRIVATE_FLAG_IS_SCREEN_DECOR, equals = PRIVATE_FLAG_IS_SCREEN_DECOR, equals = PRIVATE_FLAG_IS_SCREEN_DECOR, name = "IS_SCREEN_DECOR") name = "IS_SCREEN_DECOR"), @ViewDebug.FlagToString( mask = PRIVATE_FLAG_STATUS_BAR_EXPANDED, equals = PRIVATE_FLAG_STATUS_BAR_EXPANDED, name = "STATUS_BAR_EXPANDED") }) }) @TestApi @TestApi public int privateFlags; public int privateFlags; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -180,6 +180,15 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D mLpChanged.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; mLpChanged.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; } } private void applyExpandedFlag(State state) { if (state.panelExpanded || state.isKeyguardShowingAndNotOccluded() || state.bouncerShowing || ENABLE_REMOTE_INPUT && state.remoteInputActive) { mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED; } else { mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED; } } private void applyHeight(State state) { private void applyHeight(State state) { boolean expanded = isExpanded(state); boolean expanded = isExpanded(state); if (state.forcePluginOpen) { if (state.forcePluginOpen) { Loading Loading @@ -234,6 +243,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D applyKeyguardFlags(state); applyKeyguardFlags(state); applyForceStatusBarVisibleFlag(state); applyForceStatusBarVisibleFlag(state); applyFocusableFlag(state); applyFocusableFlag(state); applyExpandedFlag(state); adjustScreenOrientation(state); adjustScreenOrientation(state); applyHeight(state); applyHeight(state); applyUserActivityTimeout(state); applyUserActivityTimeout(state); Loading services/core/java/com/android/server/policy/BarController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -196,7 +196,7 @@ public class BarController { } } protected boolean skipAnimation() { protected boolean skipAnimation() { return false; return !mWin.isDrawnLw(); } } private int computeStateLw(boolean wasVis, boolean wasAnim, WindowState win, boolean change) { private int computeStateLw(boolean wasVis, boolean wasAnim, WindowState win, boolean change) { Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −6 Original line number Original line Diff line number Diff line Loading @@ -76,6 +76,7 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CO import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT; Loading Loading @@ -4684,8 +4685,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { navTranslucent &= areTranslucentBarsAllowed(); navTranslucent &= areTranslucentBarsAllowed(); } } boolean statusBarExpandedNotKeyguard = !isKeyguardShowing && mStatusBar != null boolean statusBarExpandedNotKeyguard = !isKeyguardShowing && mStatusBar != null && mStatusBar.getAttrs().height == MATCH_PARENT && (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0; && mStatusBar.getAttrs().width == MATCH_PARENT; // When the navigation bar isn't visible, we put up a fake input window to catch all // When the navigation bar isn't visible, we put up a fake input window to catch all // touch events. This way we can detect when the user presses anywhere to bring back the // touch events. This way we can detect when the user presses anywhere to bring back the Loading Loading @@ -5688,7 +5688,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } // Take note if a window wants to acquire a sleep token. // Take note if a window wants to acquire a sleep token. if (win.isVisibleLw() && (attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0 if ((attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0 && win.canAcquireSleepToken()) { && win.canAcquireSleepToken()) { mWindowSleepTokenNeeded = true; mWindowSleepTokenNeeded = true; } } Loading Loading @@ -5744,9 +5744,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { mStatusBarController.setShowTransparent(true /* transparent */); mStatusBarController.setShowTransparent(true /* transparent */); } } WindowManager.LayoutParams statusBarAttrs = mStatusBar.getAttrs(); boolean statusBarExpanded = boolean statusBarExpanded = statusBarAttrs.height == MATCH_PARENT (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0; && statusBarAttrs.width == MATCH_PARENT; boolean topAppHidesStatusBar = topAppHidesStatusBar(); boolean topAppHidesStatusBar = topAppHidesStatusBar(); if (mForceStatusBar || mForceStatusBarFromKeyguard || mForceStatusBarTransparent if (mForceStatusBar || mForceStatusBarFromKeyguard || mForceStatusBarTransparent || statusBarExpanded) { || statusBarExpanded) { Loading Loading
core/java/android/view/WindowManager.java +14 −1 Original line number Original line Diff line number Diff line Loading @@ -1692,6 +1692,15 @@ public interface WindowManager extends ViewManager { @RequiresPermission(permission.STATUS_BAR_SERVICE) @RequiresPermission(permission.STATUS_BAR_SERVICE) public static final int PRIVATE_FLAG_IS_SCREEN_DECOR = 0x00400000; public static final int PRIVATE_FLAG_IS_SCREEN_DECOR = 0x00400000; /** * Flag to indicate that the status bar window is now in an explicit expanded state, meaning * that status bar will not be hidden by any window with flag {@link #FLAG_FULLSCREEN} or * {@link View#SYSTEM_UI_FLAG_FULLSCREEN} set. * This can only be set by {@link LayoutParams#TYPE_STATUS_BAR}. * @hide */ public static final int PRIVATE_FLAG_STATUS_BAR_EXPANDED = 0x00800000; /** /** * Control flags that are private to the platform. * Control flags that are private to the platform. * @hide * @hide Loading Loading @@ -1780,7 +1789,11 @@ public interface WindowManager extends ViewManager { @ViewDebug.FlagToString( @ViewDebug.FlagToString( mask = PRIVATE_FLAG_IS_SCREEN_DECOR, mask = PRIVATE_FLAG_IS_SCREEN_DECOR, equals = PRIVATE_FLAG_IS_SCREEN_DECOR, equals = PRIVATE_FLAG_IS_SCREEN_DECOR, name = "IS_SCREEN_DECOR") name = "IS_SCREEN_DECOR"), @ViewDebug.FlagToString( mask = PRIVATE_FLAG_STATUS_BAR_EXPANDED, equals = PRIVATE_FLAG_STATUS_BAR_EXPANDED, name = "STATUS_BAR_EXPANDED") }) }) @TestApi @TestApi public int privateFlags; public int privateFlags; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowManager.java +10 −0 Original line number Original line Diff line number Diff line Loading @@ -180,6 +180,15 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D mLpChanged.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; mLpChanged.softInputMode = WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE; } } private void applyExpandedFlag(State state) { if (state.panelExpanded || state.isKeyguardShowingAndNotOccluded() || state.bouncerShowing || ENABLE_REMOTE_INPUT && state.remoteInputActive) { mLpChanged.privateFlags |= LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED; } else { mLpChanged.privateFlags &= ~LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED; } } private void applyHeight(State state) { private void applyHeight(State state) { boolean expanded = isExpanded(state); boolean expanded = isExpanded(state); if (state.forcePluginOpen) { if (state.forcePluginOpen) { Loading Loading @@ -234,6 +243,7 @@ public class StatusBarWindowManager implements RemoteInputController.Callback, D applyKeyguardFlags(state); applyKeyguardFlags(state); applyForceStatusBarVisibleFlag(state); applyForceStatusBarVisibleFlag(state); applyFocusableFlag(state); applyFocusableFlag(state); applyExpandedFlag(state); adjustScreenOrientation(state); adjustScreenOrientation(state); applyHeight(state); applyHeight(state); applyUserActivityTimeout(state); applyUserActivityTimeout(state); Loading
services/core/java/com/android/server/policy/BarController.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -196,7 +196,7 @@ public class BarController { } } protected boolean skipAnimation() { protected boolean skipAnimation() { return false; return !mWin.isDrawnLw(); } } private int computeStateLw(boolean wasVis, boolean wasAnim, WindowState win, boolean change) { private int computeStateLw(boolean wasVis, boolean wasAnim, WindowState win, boolean change) { Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +5 −6 Original line number Original line Diff line number Diff line Loading @@ -76,6 +76,7 @@ import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CO import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_SCREEN_DECOR; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SHOW_FOR_ALL_USERS; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_STATUS_BAR_EXPANDED; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_SYSTEM_ERROR; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_CROSSFADE; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT; import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_JUMPCUT; Loading Loading @@ -4684,8 +4685,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { navTranslucent &= areTranslucentBarsAllowed(); navTranslucent &= areTranslucentBarsAllowed(); } } boolean statusBarExpandedNotKeyguard = !isKeyguardShowing && mStatusBar != null boolean statusBarExpandedNotKeyguard = !isKeyguardShowing && mStatusBar != null && mStatusBar.getAttrs().height == MATCH_PARENT && (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0; && mStatusBar.getAttrs().width == MATCH_PARENT; // When the navigation bar isn't visible, we put up a fake input window to catch all // When the navigation bar isn't visible, we put up a fake input window to catch all // touch events. This way we can detect when the user presses anywhere to bring back the // touch events. This way we can detect when the user presses anywhere to bring back the Loading Loading @@ -5688,7 +5688,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } // Take note if a window wants to acquire a sleep token. // Take note if a window wants to acquire a sleep token. if (win.isVisibleLw() && (attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0 if ((attrs.privateFlags & PRIVATE_FLAG_ACQUIRES_SLEEP_TOKEN) != 0 && win.canAcquireSleepToken()) { && win.canAcquireSleepToken()) { mWindowSleepTokenNeeded = true; mWindowSleepTokenNeeded = true; } } Loading Loading @@ -5744,9 +5744,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { mStatusBarController.setShowTransparent(true /* transparent */); mStatusBarController.setShowTransparent(true /* transparent */); } } WindowManager.LayoutParams statusBarAttrs = mStatusBar.getAttrs(); boolean statusBarExpanded = boolean statusBarExpanded = statusBarAttrs.height == MATCH_PARENT (mStatusBar.getAttrs().privateFlags & PRIVATE_FLAG_STATUS_BAR_EXPANDED) != 0; && statusBarAttrs.width == MATCH_PARENT; boolean topAppHidesStatusBar = topAppHidesStatusBar(); boolean topAppHidesStatusBar = topAppHidesStatusBar(); if (mForceStatusBar || mForceStatusBarFromKeyguard || mForceStatusBarTransparent if (mForceStatusBar || mForceStatusBarFromKeyguard || mForceStatusBarTransparent || statusBarExpanded) { || statusBarExpanded) { Loading