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

Commit 915c0eb8 authored by Matt Pietal's avatar Matt Pietal
Browse files

Background the call to keyguard going away

This matches the other invocation of going away, and prevents a race
condition with set keyguard showing.

Fixes: 397668310
Test: manual - fold and swipe to unlock in quick succession
Flag: EXEMPT bugfix
Change-Id: I82fd3e6f7036af90ec6ed0a89e9b6db6bc9add88
parent 0a40deba
Loading
Loading
Loading
Loading
+23 −20
Original line number Diff line number Diff line
@@ -1847,6 +1847,7 @@ public class KeyguardViewMediator implements CoreStartable,
        // explicitly DO NOT want to call
        // mKeyguardViewControllerLazy.get().setKeyguardGoingAwayState(false)
        // here, since that will mess with the device lock state.
        mKeyguardStateController.notifyKeyguardGoingAway(false);
        mUpdateMonitor.dispatchKeyguardGoingAway(false);

        notifyStartedGoingToSleep();
@@ -2994,7 +2995,6 @@ public class KeyguardViewMediator implements CoreStartable,
                startKeyguardTransition(showing, aodShowing);
            } else {
                try {

                    mActivityTaskManagerService.setLockScreenShown(showing, aodShowing);
                } catch (RemoteException ignored) {
                }
@@ -3650,7 +3650,6 @@ public class KeyguardViewMediator implements CoreStartable,
            return;
        }

        try {
        int flags = KEYGUARD_GOING_AWAY_FLAG_NO_WINDOW_ANIMATIONS
                | KEYGUARD_GOING_AWAY_FLAG_WITH_WALLPAPER;

@@ -3667,14 +3666,18 @@ public class KeyguardViewMediator implements CoreStartable,
        if (!KeyguardWmStateRefactor.isEnabled()) {
            // Handled in WmLockscreenVisibilityManager.
            mGoingAwayRequestedForUserId = mSelectedUserInteractor.getSelectedUserId();
            final int goingAwayFlags = flags;
            mUiBgExecutor.execute(() -> {
                Log.d(TAG, "keyguardGoingAway requested for userId: "
                        + mGoingAwayRequestedForUserId);
                mActivityTaskManagerService.keyguardGoingAway(flags);
            }
                try {
                    mActivityTaskManagerService.keyguardGoingAway(goingAwayFlags);
                } catch (RemoteException e) {
                    mSurfaceBehindRemoteAnimationRequested = false;
                    Log.e(TAG, "Failed to report keyguardGoingAway", e);
                }
            });
        }
    }

    /** Hides the surface behind the keyguard by re-showing the keyguard/activity lock screen. */