Loading packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt +12 −5 Original line number Original line Diff line number Diff line Loading @@ -128,15 +128,22 @@ class ControlActionCoordinatorImpl @Inject constructor( } } private fun bouncerOrRun(action: Action) { private fun bouncerOrRun(action: Action) { if (!keyguardStateController.isUnlocked()) { if (keyguardStateController.isShowing()) { var closeGlobalActions = !keyguardStateController.isUnlocked() if (closeGlobalActions) { context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) // pending actions will only run after the control state has been refreshed // pending actions will only run after the control state has been refreshed pendingAction = action pendingAction = action } activityStarter.dismissKeyguardThenExecute({ activityStarter.dismissKeyguardThenExecute({ Log.d(ControlsUiController.TAG, "Device unlocked, invoking controls action") Log.d(ControlsUiController.TAG, "Device unlocked, invoking controls action") if (closeGlobalActions) { globalActionsComponent.handleShowGlobalActionsMenu() globalActionsComponent.handleShowGlobalActionsMenu() } else { action.invoke() } true true }, { pendingAction = null }, true /* afterKeyguardGone */) }, { pendingAction = null }, true /* afterKeyguardGone */) } else { } else { Loading packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -2637,10 +2637,10 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } } private boolean shouldShowControls() { private boolean shouldShowControls() { return (mKeyguardStateController.isUnlocked() || mShowLockScreenCardsAndControls) boolean showOnLockScreen = mShowLockScreenCardsAndControls && mLockPatternUtils && controlsAvailable() .getStrongAuthForUser(getCurrentUser().id) != STRONG_AUTH_REQUIRED_AFTER_BOOT; && mLockPatternUtils.getStrongAuthForUser(getCurrentUser().id) return controlsAvailable() != STRONG_AUTH_REQUIRED_AFTER_BOOT; && (mKeyguardStateController.isUnlocked() || showOnLockScreen); } } private boolean controlsAvailable() { private boolean controlsAvailable() { Loading Loading
packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt +12 −5 Original line number Original line Diff line number Diff line Loading @@ -128,15 +128,22 @@ class ControlActionCoordinatorImpl @Inject constructor( } } private fun bouncerOrRun(action: Action) { private fun bouncerOrRun(action: Action) { if (!keyguardStateController.isUnlocked()) { if (keyguardStateController.isShowing()) { var closeGlobalActions = !keyguardStateController.isUnlocked() if (closeGlobalActions) { context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) // pending actions will only run after the control state has been refreshed // pending actions will only run after the control state has been refreshed pendingAction = action pendingAction = action } activityStarter.dismissKeyguardThenExecute({ activityStarter.dismissKeyguardThenExecute({ Log.d(ControlsUiController.TAG, "Device unlocked, invoking controls action") Log.d(ControlsUiController.TAG, "Device unlocked, invoking controls action") if (closeGlobalActions) { globalActionsComponent.handleShowGlobalActionsMenu() globalActionsComponent.handleShowGlobalActionsMenu() } else { action.invoke() } true true }, { pendingAction = null }, true /* afterKeyguardGone */) }, { pendingAction = null }, true /* afterKeyguardGone */) } else { } else { Loading
packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -2637,10 +2637,10 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } } private boolean shouldShowControls() { private boolean shouldShowControls() { return (mKeyguardStateController.isUnlocked() || mShowLockScreenCardsAndControls) boolean showOnLockScreen = mShowLockScreenCardsAndControls && mLockPatternUtils && controlsAvailable() .getStrongAuthForUser(getCurrentUser().id) != STRONG_AUTH_REQUIRED_AFTER_BOOT; && mLockPatternUtils.getStrongAuthForUser(getCurrentUser().id) return controlsAvailable() != STRONG_AUTH_REQUIRED_AFTER_BOOT; && (mKeyguardStateController.isUnlocked() || showOnLockScreen); } } private boolean controlsAvailable() { private boolean controlsAvailable() { Loading