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

Commit 17323a0f authored by Matt Pietal's avatar Matt Pietal
Browse files

Force transition to GONE...

...if keyguard is told to directly hide without going away.
Fixes cases where the message:
"Hiding keyguard while occluded. Just hide the keyguard view and exit."
is logged.

Fixes: 337174431
Test: manual - unlock
Flag: None
Change-Id: I8d01e818394b65bd7f961415eb70fa0733a78568
parent 7a24648a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3214,6 +3214,10 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
        mHideAnimationRun = false;
        adjustStatusBarLocked();
        sendUserPresentBroadcast();

        if (!KeyguardWmStateRefactor.isEnabled()) {
            mKeyguardInteractor.dismissKeyguard();
        }
    }

    private Configuration.Builder createInteractionJankMonitorConf(int cuj) {
+6 −0
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ constructor(
    keyguardTransitionInteractor: KeyguardTransitionInteractor,
    sceneInteractorProvider: Provider<SceneInteractor>,
    private val fromGoneTransitionInteractor: Provider<FromGoneTransitionInteractor>,
    private val fromLockscreenTransitionInteractor: Provider<FromLockscreenTransitionInteractor>,
    sharedNotificationContainerInteractor: Provider<SharedNotificationContainerInteractor>,
    @Application applicationScope: CoroutineScope,
) {
@@ -425,6 +426,11 @@ constructor(
        fromGoneTransitionInteractor.get().showKeyguard()
    }

    /** Temporary shim, until [KeyguardWmStateRefactor] is enabled */
    fun dismissKeyguard() {
        fromLockscreenTransitionInteractor.get().dismissKeyguard()
    }

    companion object {
        private const val TAG = "KeyguardInteractor"
    }
+1 −0
Original line number Diff line number Diff line
@@ -216,6 +216,7 @@ public class QuickSettingsControllerImplBaseTest extends SysuiTestCase {
                keyguardTransitionInteractor,
                () -> sceneInteractor,
                () -> mKosmos.getFromGoneTransitionInteractor(),
                () -> mKosmos.getFromLockscreenTransitionInteractor(),
                () -> mKosmos.getSharedNotificationContainerInteractor(),
                mTestScope);

+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ public class KeyguardStatusBarViewControllerTest extends SysuiTestCase {
                keyguardTransitionInteractor,
                () -> mKosmos.getSceneInteractor(),
                () -> mKosmos.getFromGoneTransitionInteractor(),
                () -> mKosmos.getFromLockscreenTransitionInteractor(),
                () -> mKosmos.getSharedNotificationContainerInteractor(),
                mTestScope);
        mViewModel =
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ object KeyguardInteractorFactory {
        shadeRepository: FakeShadeRepository = FakeShadeRepository(),
        sceneInteractor: SceneInteractor = mock(),
        fromGoneTransitionInteractor: FromGoneTransitionInteractor = mock(),
        fromLockscreenTransitionInteractor: FromLockscreenTransitionInteractor = mock(),
        sharedNotificationContainerInteractor: SharedNotificationContainerInteractor? = null,
        powerInteractor: PowerInteractor = PowerInteractorFactory.create().powerInteractor,
        testScope: CoroutineScope = TestScope(),
@@ -98,6 +99,7 @@ object KeyguardInteractorFactory {
                keyguardTransitionInteractor = keyguardTransitionInteractor,
                sceneInteractorProvider = { sceneInteractor },
                fromGoneTransitionInteractor = { fromGoneTransitionInteractor },
                fromLockscreenTransitionInteractor = { fromLockscreenTransitionInteractor },
                sharedNotificationContainerInteractor = { sncInteractor },
                applicationScope = testScope,
            ),
Loading