Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4d4d8c1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Controls UI - Blank activity when launched on lock screen" into rvc-dev...

Merge "Controls UI - Blank activity when launched on lock screen" into rvc-dev am: 18b5f5fa am: 5a879396

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004850

Change-Id: I079a7c251d4743c0ecf487c447e2b44b73573a7d
parents dbdee936 5a879396
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -128,15 +128,22 @@ class ControlActionCoordinatorImpl @Inject constructor(
        }

    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))

                // 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")
                if (closeGlobalActions) {
                    globalActionsComponent.handleShowGlobalActionsMenu()
                } else {
                    action.invoke()
                }
                true
            }, { pendingAction = null }, true /* afterKeyguardGone */)
        } else {
+4 −4
Original line number Diff line number Diff line
@@ -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() {