Loading packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +10 −0 Original line number Diff line number Diff line Loading @@ -2399,6 +2399,16 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, */ private void handleDismiss(IKeyguardDismissCallback callback, CharSequence message) { if (mShowing) { if (KeyguardWmStateRefactor.isEnabled()) { Log.d(TAG, "Dismissing keyguard with keyguard_wm_refactor_enabled: " + "cancelDoKeyguardLaterLocked"); // This won't get canceled in onKeyguardExitFinished() if the refactor is enabled, // which can lead to the keyguard re-showing. Cancel here for now; this can be // removed once we migrate the logic that posts doKeyguardLater in the first place. cancelDoKeyguardLaterLocked(); } if (callback != null) { mDismissCallbackRegistry.addCallback(callback); } Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractor.kt +7 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,13 @@ constructor( } } /** Starts a transition to dismiss the keyguard from the OCCLUDED state. */ fun dismissFromOccluded() { scope.launch { startTransitionTo(KeyguardState.GONE, ownerReason = "Dismiss from occluded") } } private fun listenForOccludedToGone() { if (KeyguardWmStateRefactor.isEnabled) { // We don't think OCCLUDED to GONE is possible. You should always have to go via a Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractor.kt +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ constructor( private val fromAlternateBouncerTransitionInteractor: dagger.Lazy<FromAlternateBouncerTransitionInteractor>, private val fromDozingTransitionInteractor: dagger.Lazy<FromDozingTransitionInteractor>, private val fromOccludedTransitionInteractor: dagger.Lazy<FromOccludedTransitionInteractor>, private val sceneInteractor: SceneInteractor, ) { private val transitionMap = mutableMapOf<Edge.StateToState, MutableSharedFlow<TransitionStep>>() Loading Loading @@ -418,6 +419,7 @@ constructor( fromAlternateBouncerTransitionInteractor.get().dismissAlternateBouncer() AOD -> fromAodTransitionInteractor.get().dismissAod() DOZING -> fromDozingTransitionInteractor.get().dismissFromDozing() KeyguardState.OCCLUDED -> fromOccludedTransitionInteractor.get().dismissFromOccluded() KeyguardState.GONE -> Log.i( TAG, Loading packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractor.kt +20 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,14 @@ constructor( KeyguardState.ALTERNATE_BOUNCER -> { fromAlternateBouncerInteractor.surfaceBehindVisibility } KeyguardState.OCCLUDED -> { // OCCLUDED -> GONE occurs when an app is on top of the keyguard, and then // requests manual dismissal of the keyguard in the background. The app will // remain visible on top of the stack throughout this transition, so we // should not trigger the keyguard going away animation by returning // surfaceBehindVisibility = true. flowOf(false) } else -> flowOf(null) } } Loading Loading @@ -253,6 +261,18 @@ constructor( ) { // Dreams dismiss keyguard and return to GONE if they can. false } else if ( startedWithPrev.newValue.from == KeyguardState.OCCLUDED && startedWithPrev.newValue.to == KeyguardState.GONE ) { // OCCLUDED -> GONE directly, without transiting a *_BOUNCER state, occurs // when an app uses intent flags to launch over an insecure keyguard without // dismissing it, and then manually requests keyguard dismissal while // OCCLUDED. This transition is not user-visible; the device unlocks in the // background and the app remains on top, while we're now GONE. In this case // we should simply tell WM that the lockscreen is no longer visible, and // *not* play the going away animation or related animations. false } else { // Otherwise, use the visibility of the current state. KeyguardState.lockscreenVisibleInState(currentState) Loading packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorKosmos.kt +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ val Kosmos.keyguardTransitionInteractor: KeyguardTransitionInteractor by fromAodTransitionInteractor = { fromAodTransitionInteractor }, fromAlternateBouncerTransitionInteractor = { fromAlternateBouncerTransitionInteractor }, fromDozingTransitionInteractor = { fromDozingTransitionInteractor }, fromOccludedTransitionInteractor = { fromOccludedTransitionInteractor }, sceneInteractor = sceneInteractor ) } Loading
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +10 −0 Original line number Diff line number Diff line Loading @@ -2399,6 +2399,16 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable, */ private void handleDismiss(IKeyguardDismissCallback callback, CharSequence message) { if (mShowing) { if (KeyguardWmStateRefactor.isEnabled()) { Log.d(TAG, "Dismissing keyguard with keyguard_wm_refactor_enabled: " + "cancelDoKeyguardLaterLocked"); // This won't get canceled in onKeyguardExitFinished() if the refactor is enabled, // which can lead to the keyguard re-showing. Cancel here for now; this can be // removed once we migrate the logic that posts doKeyguardLater in the first place. cancelDoKeyguardLaterLocked(); } if (callback != null) { mDismissCallbackRegistry.addCallback(callback); } Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/FromOccludedTransitionInteractor.kt +7 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,13 @@ constructor( } } /** Starts a transition to dismiss the keyguard from the OCCLUDED state. */ fun dismissFromOccluded() { scope.launch { startTransitionTo(KeyguardState.GONE, ownerReason = "Dismiss from occluded") } } private fun listenForOccludedToGone() { if (KeyguardWmStateRefactor.isEnabled) { // We don't think OCCLUDED to GONE is possible. You should always have to go via a Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractor.kt +2 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ constructor( private val fromAlternateBouncerTransitionInteractor: dagger.Lazy<FromAlternateBouncerTransitionInteractor>, private val fromDozingTransitionInteractor: dagger.Lazy<FromDozingTransitionInteractor>, private val fromOccludedTransitionInteractor: dagger.Lazy<FromOccludedTransitionInteractor>, private val sceneInteractor: SceneInteractor, ) { private val transitionMap = mutableMapOf<Edge.StateToState, MutableSharedFlow<TransitionStep>>() Loading Loading @@ -418,6 +419,7 @@ constructor( fromAlternateBouncerTransitionInteractor.get().dismissAlternateBouncer() AOD -> fromAodTransitionInteractor.get().dismissAod() DOZING -> fromDozingTransitionInteractor.get().dismissFromDozing() KeyguardState.OCCLUDED -> fromOccludedTransitionInteractor.get().dismissFromOccluded() KeyguardState.GONE -> Log.i( TAG, Loading
packages/SystemUI/src/com/android/systemui/keyguard/domain/interactor/WindowManagerLockscreenVisibilityInteractor.kt +20 −0 Original line number Diff line number Diff line Loading @@ -93,6 +93,14 @@ constructor( KeyguardState.ALTERNATE_BOUNCER -> { fromAlternateBouncerInteractor.surfaceBehindVisibility } KeyguardState.OCCLUDED -> { // OCCLUDED -> GONE occurs when an app is on top of the keyguard, and then // requests manual dismissal of the keyguard in the background. The app will // remain visible on top of the stack throughout this transition, so we // should not trigger the keyguard going away animation by returning // surfaceBehindVisibility = true. flowOf(false) } else -> flowOf(null) } } Loading Loading @@ -253,6 +261,18 @@ constructor( ) { // Dreams dismiss keyguard and return to GONE if they can. false } else if ( startedWithPrev.newValue.from == KeyguardState.OCCLUDED && startedWithPrev.newValue.to == KeyguardState.GONE ) { // OCCLUDED -> GONE directly, without transiting a *_BOUNCER state, occurs // when an app uses intent flags to launch over an insecure keyguard without // dismissing it, and then manually requests keyguard dismissal while // OCCLUDED. This transition is not user-visible; the device unlocks in the // background and the app remains on top, while we're now GONE. In this case // we should simply tell WM that the lockscreen is no longer visible, and // *not* play the going away animation or related animations. false } else { // Otherwise, use the visibility of the current state. KeyguardState.lockscreenVisibleInState(currentState) Loading
packages/SystemUI/tests/utils/src/com/android/systemui/keyguard/domain/interactor/KeyguardTransitionInteractorKosmos.kt +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ val Kosmos.keyguardTransitionInteractor: KeyguardTransitionInteractor by fromAodTransitionInteractor = { fromAodTransitionInteractor }, fromAlternateBouncerTransitionInteractor = { fromAlternateBouncerTransitionInteractor }, fromDozingTransitionInteractor = { fromDozingTransitionInteractor }, fromOccludedTransitionInteractor = { fromOccludedTransitionInteractor }, sceneInteractor = sceneInteractor ) }