Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +31 −1 Original line number Diff line number Diff line Loading @@ -709,6 +709,8 @@ public class StatusBar extends SystemUI implements DemoMode, private KeyguardMonitorImpl mKeyguardMonitor; private BatteryController mBatteryController; private boolean mPanelExpanded; private boolean mKeyguardRequested; private boolean mIsKeyguard; private LogMaker mStatusBarStateLog; private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger(); private NotificationIconAreaController mNotificationIconAreaController; Loading Loading @@ -4058,6 +4060,30 @@ public class StatusBar extends SystemUI implements DemoMode, } public void showKeyguard() { mKeyguardRequested = true; updateIsKeyguard(); } public boolean hideKeyguard() { mKeyguardRequested = false; return updateIsKeyguard(); } private boolean updateIsKeyguard() { // For dozing, keyguard needs to be shown whenever the device is non-interactive. Otherwise // there's no surface we can show to the user. boolean keyguardForDozing = mDozingRequested && !mDeviceInteractive; boolean shouldBeKeyguard = mKeyguardRequested || keyguardForDozing; if (shouldBeKeyguard && !mIsKeyguard) { showKeyguardImpl(); } else if (!shouldBeKeyguard && mIsKeyguard) { return hideKeyguardImpl(); } return false; } public void showKeyguardImpl() { mIsKeyguard = true; if (mLaunchTransitionFadingAway) { mNotificationPanel.animate().cancel(); onLaunchTransitionFadingEnded(); Loading Loading @@ -4211,7 +4237,8 @@ public class StatusBar extends SystemUI implements DemoMode, /** * @return true if we would like to stay in the shade, false if it should go away entirely */ public boolean hideKeyguard() { public boolean hideKeyguardImpl() { mIsKeyguard = false; Trace.beginSection("StatusBar#hideKeyguard"); boolean staying = mLeaveOpenOnKeyguardHide; setBarState(StatusBarState.SHADE); Loading Loading @@ -4890,6 +4917,7 @@ public class StatusBar extends SystemUI implements DemoMode, } }); } updateIsKeyguard(); } public void onStartedWakingUp() { Loading @@ -4898,6 +4926,7 @@ public class StatusBar extends SystemUI implements DemoMode, mVisualStabilityManager.setScreenOn(true); mNotificationPanel.setTouchDisabled(false); updateVisibleToUser(); updateIsKeyguard(); } public void onScreenTurningOn() { Loading Loading @@ -5012,6 +5041,7 @@ public class StatusBar extends SystemUI implements DemoMode, || mFingerprintUnlockController.getMode() == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING; mStatusBarWindowManager.setDozing(mDozing); mStatusBarKeyguardViewManager.setDozing(mDozing); updateDozingState(); Trace.endSection(); } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +15 −6 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb protected boolean mShowing; protected boolean mOccluded; protected boolean mRemoteInputActive; private boolean mDozing; protected boolean mFirstUpdate = true; protected boolean mLastShowing; Loading @@ -91,6 +92,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb private boolean mLastBouncerShowing; private boolean mLastBouncerDismissible; protected boolean mLastRemoteInputActive; private boolean mLastDozing; private OnDismissAction mAfterKeyguardGoneAction; private final ArrayList<Runnable> mAfterKeyguardGoneRunnables = new ArrayList<>(); Loading Loading @@ -239,6 +241,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb updateStates(); } public void setDozing(boolean dozing) { mDozing = dozing; updateStates(); } public void onScreenTurnedOff() { mScreenTurnedOn = false; mStatusBar.onScreenTurnedOff(); Loading Loading @@ -481,11 +488,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb private long getNavBarShowDelay() { if (mStatusBar.isKeyguardFadingAway()) { return mStatusBar.getKeyguardFadingAwayDelay(); } else { // Keyguard is not going away, thus we are showing the navigation bar because the // bouncer is appearing. } else if (mBouncer.isShowing()) { return NAV_BAR_SHOW_DELAY_BOUNCER; } else { // No longer dozing, or remote input is active. No delay. return 0; } } Loading Loading @@ -553,6 +560,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mLastBouncerShowing = bouncerShowing; mLastBouncerDismissible = bouncerDismissible; mLastRemoteInputActive = remoteInputActive; mLastDozing = mDozing; mStatusBar.onKeyguardViewManagerStatesUpdated(); } Loading @@ -561,14 +569,15 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb * @return Whether the navigation bar should be made visible based on the current state. */ protected boolean isNavBarVisible() { return !(mShowing && !mOccluded) || mBouncer.isShowing() || mRemoteInputActive; return !(mShowing && !mOccluded) && !mDozing || mBouncer.isShowing() || mRemoteInputActive; } /** * @return Whether the navigation bar was made visible based on the last known state. */ protected boolean getLastNavBarVisible() { return !(mLastShowing && !mLastOccluded) || mLastBouncerShowing || mLastRemoteInputActive; return !(mLastShowing && !mLastOccluded) && !mLastDozing || mLastBouncerShowing || mLastRemoteInputActive; } public boolean shouldDismissOnMenuPressed() { Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +31 −1 Original line number Diff line number Diff line Loading @@ -709,6 +709,8 @@ public class StatusBar extends SystemUI implements DemoMode, private KeyguardMonitorImpl mKeyguardMonitor; private BatteryController mBatteryController; private boolean mPanelExpanded; private boolean mKeyguardRequested; private boolean mIsKeyguard; private LogMaker mStatusBarStateLog; private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger(); private NotificationIconAreaController mNotificationIconAreaController; Loading Loading @@ -4058,6 +4060,30 @@ public class StatusBar extends SystemUI implements DemoMode, } public void showKeyguard() { mKeyguardRequested = true; updateIsKeyguard(); } public boolean hideKeyguard() { mKeyguardRequested = false; return updateIsKeyguard(); } private boolean updateIsKeyguard() { // For dozing, keyguard needs to be shown whenever the device is non-interactive. Otherwise // there's no surface we can show to the user. boolean keyguardForDozing = mDozingRequested && !mDeviceInteractive; boolean shouldBeKeyguard = mKeyguardRequested || keyguardForDozing; if (shouldBeKeyguard && !mIsKeyguard) { showKeyguardImpl(); } else if (!shouldBeKeyguard && mIsKeyguard) { return hideKeyguardImpl(); } return false; } public void showKeyguardImpl() { mIsKeyguard = true; if (mLaunchTransitionFadingAway) { mNotificationPanel.animate().cancel(); onLaunchTransitionFadingEnded(); Loading Loading @@ -4211,7 +4237,8 @@ public class StatusBar extends SystemUI implements DemoMode, /** * @return true if we would like to stay in the shade, false if it should go away entirely */ public boolean hideKeyguard() { public boolean hideKeyguardImpl() { mIsKeyguard = false; Trace.beginSection("StatusBar#hideKeyguard"); boolean staying = mLeaveOpenOnKeyguardHide; setBarState(StatusBarState.SHADE); Loading Loading @@ -4890,6 +4917,7 @@ public class StatusBar extends SystemUI implements DemoMode, } }); } updateIsKeyguard(); } public void onStartedWakingUp() { Loading @@ -4898,6 +4926,7 @@ public class StatusBar extends SystemUI implements DemoMode, mVisualStabilityManager.setScreenOn(true); mNotificationPanel.setTouchDisabled(false); updateVisibleToUser(); updateIsKeyguard(); } public void onScreenTurningOn() { Loading Loading @@ -5012,6 +5041,7 @@ public class StatusBar extends SystemUI implements DemoMode, || mFingerprintUnlockController.getMode() == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING; mStatusBarWindowManager.setDozing(mDozing); mStatusBarKeyguardViewManager.setDozing(mDozing); updateDozingState(); Trace.endSection(); } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +15 −6 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb protected boolean mShowing; protected boolean mOccluded; protected boolean mRemoteInputActive; private boolean mDozing; protected boolean mFirstUpdate = true; protected boolean mLastShowing; Loading @@ -91,6 +92,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb private boolean mLastBouncerShowing; private boolean mLastBouncerDismissible; protected boolean mLastRemoteInputActive; private boolean mLastDozing; private OnDismissAction mAfterKeyguardGoneAction; private final ArrayList<Runnable> mAfterKeyguardGoneRunnables = new ArrayList<>(); Loading Loading @@ -239,6 +241,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb updateStates(); } public void setDozing(boolean dozing) { mDozing = dozing; updateStates(); } public void onScreenTurnedOff() { mScreenTurnedOn = false; mStatusBar.onScreenTurnedOff(); Loading Loading @@ -481,11 +488,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb private long getNavBarShowDelay() { if (mStatusBar.isKeyguardFadingAway()) { return mStatusBar.getKeyguardFadingAwayDelay(); } else { // Keyguard is not going away, thus we are showing the navigation bar because the // bouncer is appearing. } else if (mBouncer.isShowing()) { return NAV_BAR_SHOW_DELAY_BOUNCER; } else { // No longer dozing, or remote input is active. No delay. return 0; } } Loading Loading @@ -553,6 +560,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb mLastBouncerShowing = bouncerShowing; mLastBouncerDismissible = bouncerDismissible; mLastRemoteInputActive = remoteInputActive; mLastDozing = mDozing; mStatusBar.onKeyguardViewManagerStatesUpdated(); } Loading @@ -561,14 +569,15 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb * @return Whether the navigation bar should be made visible based on the current state. */ protected boolean isNavBarVisible() { return !(mShowing && !mOccluded) || mBouncer.isShowing() || mRemoteInputActive; return !(mShowing && !mOccluded) && !mDozing || mBouncer.isShowing() || mRemoteInputActive; } /** * @return Whether the navigation bar was made visible based on the last known state. */ protected boolean getLastNavBarVisible() { return !(mLastShowing && !mLastOccluded) || mLastBouncerShowing || mLastRemoteInputActive; return !(mLastShowing && !mLastOccluded) && !mLastDozing || mLastBouncerShowing || mLastRemoteInputActive; } public boolean shouldDismissOnMenuPressed() { Loading