diff options
| author | 2024-04-03 15:54:24 +0000 | |
|---|---|---|
| committer | 2024-04-03 15:54:24 +0000 | |
| commit | 5941ae085e49758b3d0f51e1eae2ed428ef09af2 (patch) | |
| tree | 85000420c07c07f1f5ccbfd4346c85c4cc688bea | |
| parent | c7b314bde324322fb89fc57df24a5c6836176179 (diff) | |
| parent | ff0df2eca8b5eb63febfd1f87100a4f9265e55f5 (diff) | |
Merge "[flexiglass] Show bouncer when needed." into main
2 files changed, 35 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt index 893887fad176..d88b3dcac598 100644 --- a/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt +++ b/packages/SystemUI/src/com/android/systemui/bouncer/domain/interactor/PrimaryBouncerInteractor.kt @@ -45,6 +45,7 @@ import com.android.systemui.keyguard.DismissCallbackRegistry import com.android.systemui.keyguard.data.repository.TrustRepository import com.android.systemui.plugins.ActivityStarter import com.android.systemui.res.R +import com.android.systemui.scene.shared.flag.SceneContainerFlag import com.android.systemui.shared.system.SysUiStatsLog import com.android.systemui.statusbar.policy.KeyguardStateController import com.android.systemui.user.domain.interactor.SelectedUserInteractor @@ -158,6 +159,10 @@ constructor( /** Show the bouncer if necessary and set the relevant states. */ @JvmOverloads fun show(isScrimmed: Boolean) { + // When the scene container framework is enabled, instead of calling this, call + // SceneInteractor#changeScene(Scenes.Bouncer, ...). + SceneContainerFlag.assertInLegacyMode() + if (primaryBouncerView.delegate == null && !Flags.composeBouncer()) { Log.d( TAG, diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java index afd2415ad7a8..5f26702ad867 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarKeyguardViewManager.java @@ -662,7 +662,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb * show if any subsequent events are to be handled. */ if (beginShowingBouncer(event)) { - mPrimaryBouncerInteractor.show(/* isScrimmed= */false); + if (SceneContainerFlag.isEnabled()) { + mSceneInteractorLazy.get().changeScene( + Scenes.Bouncer, "StatusBarKeyguardViewManager.onPanelExpansionChanged"); + } else { + mPrimaryBouncerInteractor.show(/* isScrimmed= */false); + } } if (!primaryBouncerIsOrWillBeShowing()) { @@ -716,7 +721,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb // The keyguard might be showing (already). So we need to hide it. if (!primaryBouncerIsShowing()) { mCentralSurfaces.hideKeyguard(); - mPrimaryBouncerInteractor.show(true); + if (SceneContainerFlag.isEnabled()) { + mSceneInteractorLazy.get().changeScene( + Scenes.Bouncer, "StatusBarKeyguardViewManager.showBouncerOrKeyguard"); + } else { + mPrimaryBouncerInteractor.show(/* isScrimmed= */ true); + } } else { Log.e(TAG, "Attempted to show the sim bouncer when it is already showing."); } @@ -778,7 +788,12 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb public void showPrimaryBouncer(boolean scrimmed) { hideAlternateBouncer(false); if (mKeyguardStateController.isShowing() && !isBouncerShowing()) { - mPrimaryBouncerInteractor.show(scrimmed); + if (SceneContainerFlag.isEnabled()) { + mSceneInteractorLazy.get().changeScene( + Scenes.Bouncer, "StatusBarKeyguardViewManager.showPrimaryBouncer"); + } else { + mPrimaryBouncerInteractor.show(scrimmed); + } } updateStates(); } @@ -873,13 +888,23 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb if (afterKeyguardGone) { // we'll handle the dismiss action after keyguard is gone, so just show the // bouncer - mPrimaryBouncerInteractor.show(/* isScrimmed= */true); + if (SceneContainerFlag.isEnabled()) { + mSceneInteractorLazy.get().changeScene( + Scenes.Bouncer, "StatusBarKeyguardViewManager.dismissWithAction"); + } else { + mPrimaryBouncerInteractor.show(/* isScrimmed= */ true); + } } else { // after authentication success, run dismiss action with the option to defer // hiding the keyguard based on the return value of the OnDismissAction mPrimaryBouncerInteractor.setDismissAction( mAfterKeyguardGoneAction, mKeyguardGoneCancelAction); - mPrimaryBouncerInteractor.show(/* isScrimmed= */true); + if (SceneContainerFlag.isEnabled()) { + mSceneInteractorLazy.get().changeScene( + Scenes.Bouncer, "StatusBarKeyguardViewManager.dismissWithAction"); + } else { + mPrimaryBouncerInteractor.show(/* isScrimmed= */ true); + } // bouncer will handle the dismiss action, so we no longer need to track it here mAfterKeyguardGoneAction = null; mKeyguardGoneCancelAction = null; |