diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-06-26 17:53:36 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-26 17:53:36 +0000 |
commit | 5a879396df0adb56e3f98b5e43e47b46bc8c3fe3 (patch) | |
tree | 491debd6a0f64ae3fcec5a3969f003a639cd45f5 | |
parent | 72cc7b34fc6e85c998a718e14bf59ef400a900f3 (diff) | |
parent | 18b5f5fa35c4bb121aa458c5f82e0a5f749b2938 (diff) |
Merge "Controls UI - Blank activity when launched on lock screen" into rvc-dev am: 18b5f5fa35
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004850
Change-Id: I2ccf96354b1230f57740a74c05893da47d08ee40
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt | 17 | ||||
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java | 8 |
2 files changed, 16 insertions, 9 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt index c073642afa4e..22d6b6bb75c3 100644 --- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt +++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlActionCoordinatorImpl.kt @@ -128,15 +128,22 @@ class ControlActionCoordinatorImpl @Inject constructor( } private fun bouncerOrRun(action: Action) { - if (!keyguardStateController.isUnlocked()) { - context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) + if (keyguardStateController.isShowing()) { + var closeGlobalActions = !keyguardStateController.isUnlocked() + if (closeGlobalActions) { + context.sendBroadcast(Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)) - // pending actions will only run after the control state has been refreshed - pendingAction = action + // pending actions will only run after the control state has been refreshed + pendingAction = action + } activityStarter.dismissKeyguardThenExecute({ Log.d(ControlsUiController.TAG, "Device unlocked, invoking controls action") - globalActionsComponent.handleShowGlobalActionsMenu() + if (closeGlobalActions) { + globalActionsComponent.handleShowGlobalActionsMenu() + } else { + action.invoke() + } true }, { pendingAction = null }, true /* afterKeyguardGone */) } else { diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java index eed52004923d..b2e91643bed2 100644 --- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java +++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java @@ -2637,10 +2637,10 @@ public class GlobalActionsDialog implements DialogInterface.OnDismissListener, } private boolean shouldShowControls() { - return (mKeyguardStateController.isUnlocked() || mShowLockScreenCardsAndControls) - && controlsAvailable() - && mLockPatternUtils.getStrongAuthForUser(getCurrentUser().id) - != STRONG_AUTH_REQUIRED_AFTER_BOOT; + boolean showOnLockScreen = mShowLockScreenCardsAndControls && mLockPatternUtils + .getStrongAuthForUser(getCurrentUser().id) != STRONG_AUTH_REQUIRED_AFTER_BOOT; + return controlsAvailable() + && (mKeyguardStateController.isUnlocked() || showOnLockScreen); } private boolean controlsAvailable() { |