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

Commit f40b71e7 authored by Matt Pietal's avatar Matt Pietal Committed by Android (Google) Code Review
Browse files

Merge "Fix swipe up to unlock, then swipe down" into main

parents 87793a41 9c6110ae
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ class KeyguardInteractorTest : SysuiTestCase() {
    private val testScope = kosmos.testScope
    private val repository by lazy { kosmos.fakeKeyguardRepository }
    private val sceneInteractor by lazy { kosmos.sceneInteractor }
    private val fromGoneTransitionInteractor by lazy { kosmos.fromGoneTransitionInteractor }
    private val commandQueue by lazy { FakeCommandQueue() }
    private val bouncerRepository = FakeKeyguardBouncerRepository()
    private val shadeRepository = FakeShadeRepository()
@@ -79,6 +80,7 @@ class KeyguardInteractorTest : SysuiTestCase() {
            shadeRepository = shadeRepository,
            keyguardTransitionInteractor = kosmos.keyguardTransitionInteractor,
            sceneInteractorProvider = { sceneInteractor },
            fromGoneTransitionInteractor = { fromGoneTransitionInteractor },
        )
    }

+6 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@ import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STR
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_AFTER_USER_LOCKDOWN;
import static com.android.internal.widget.LockPatternUtils.StrongAuthTracker.STRONG_AUTH_REQUIRED_FOR_UNATTENDED_UPDATE;
import static com.android.systemui.DejankUtils.whitelistIpcs;
import static com.android.systemui.Flags.migrateClocksToBlueprint;
import static com.android.systemui.Flags.notifyPowerManagerUserActivityBackground;
import static com.android.systemui.Flags.refactorGetCurrentUser;
import static com.android.systemui.keyguard.ui.viewmodel.LockscreenToDreamingTransitionViewModel.DREAMING_ANIMATION_DURATION_MS;
@@ -3401,6 +3402,11 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                mSurfaceBehindRemoteAnimationFinishedCallback = null;
            }
        }

        // Ensure that keyguard becomes visible if the going away animation is canceled
        if (showKeyguard && !KeyguardWmStateRefactor.isEnabled() && migrateClocksToBlueprint()) {
            mKeyguardInteractor.showKeyguard();
        }
    }

    private void adjustStatusBarLocked() {
+4 −0
Original line number Diff line number Diff line
@@ -71,6 +71,10 @@ constructor(
        listenForGoneToDreamingLockscreenHosted()
    }

    fun showKeyguard() {
        scope.launch { startTransitionTo(KeyguardState.LOCKSCREEN) }
    }

    // Primarily for when the user chooses to lock down the device
    private fun listenForGoneToLockscreenOrHub() {
        if (KeyguardWmStateRefactor.isEnabled) {
+6 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ constructor(
    shadeRepository: ShadeRepository,
    keyguardTransitionInteractor: KeyguardTransitionInteractor,
    sceneInteractorProvider: Provider<SceneInteractor>,
    private val fromGoneTransitionInteractor: Provider<FromGoneTransitionInteractor>,
) {
    // TODO(b/296118689): move to a repository
    private val _sharedNotificationContainerBounds = MutableStateFlow(NotificationContainerBounds())
@@ -383,6 +384,11 @@ constructor(
        repository.topClippingBounds.value = top
    }

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

    companion object {
        private const val TAG = "KeyguardInteractor"
    }
+2 −1
Original line number Diff line number Diff line
@@ -196,7 +196,8 @@ public class NotificationShadeWindowControllerImplTest extends SysuiTestCase {
                new ConfigurationInteractor(configurationRepository),
                shadeRepository,
                keyguardTransitionInteractor,
                () -> sceneInteractor);
                () -> sceneInteractor,
                () -> mKosmos.getFromGoneTransitionInteractor());
        CommunalInteractor communalInteractor = mKosmos.getCommunalInteractor();

        mFromLockscreenTransitionInteractor = mKosmos.getFromLockscreenTransitionInteractor();
Loading