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

Commit 8d20b190 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[flexiglass] Change to Lockscreen scene when legacy system says to." into main

parents a6053ee7 fb0168a8
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -156,6 +156,7 @@ constructor(
     * desired scene. Once enough of the transition has occurred, the [currentScene] will become
     * [toScene] (unless the transition is canceled by user action or another call to this method).
     */
    @JvmOverloads
    fun changeScene(
        toScene: SceneKey,
        loggingReason: String,
+12 −3
Original line number Diff line number Diff line
@@ -81,6 +81,9 @@ import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.navigationbar.TaskbarDelegate;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.scene.domain.interactor.SceneInteractor;
import com.android.systemui.scene.shared.flag.SceneContainerFlag;
import com.android.systemui.scene.shared.model.Scenes;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeExpansionChangeEvent;
import com.android.systemui.shade.ShadeExpansionListener;
@@ -157,6 +160,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
    private final AlternateBouncerInteractor mAlternateBouncerInteractor;
    private final BouncerView mPrimaryBouncerView;
    private final Lazy<ShadeController> mShadeController;
    private final Lazy<SceneInteractor> mSceneInteractorLazy;

    // Local cache of expansion events, to avoid duplicates
    private float mFraction = -1f;
@@ -381,7 +385,8 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
            Lazy<KeyguardDismissActionInteractor> keyguardDismissActionInteractorLazy,
            SelectedUserInteractor selectedUserInteractor,
            Lazy<KeyguardSurfaceBehindInteractor> surfaceBehindInteractor,
            JavaAdapter javaAdapter
            JavaAdapter javaAdapter,
            Lazy<SceneInteractor> sceneInteractorLazy
    ) {
        mContext = context;
        mViewMediatorCallback = callback;
@@ -415,6 +420,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
        mSelectedUserInteractor = selectedUserInteractor;
        mSurfaceBehindInteractor = surfaceBehindInteractor;
        mJavaAdapter = javaAdapter;
        mSceneInteractorLazy = sceneInteractorLazy;
    }

    KeyguardTransitionInteractor mKeyguardTransitionInteractor;
@@ -633,8 +639,11 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
    public void show(Bundle options) {
        Trace.beginSection("StatusBarKeyguardViewManager#show");
        mNotificationShadeWindowController.setKeyguardShowing(true);
        mKeyguardStateController.notifyKeyguardState(true,
                mKeyguardStateController.isOccluded());
        if (SceneContainerFlag.isEnabled()) {
            mSceneInteractorLazy.get().changeScene(
                    Scenes.Lockscreen, "StatusBarKeyguardViewManager.show");
        }
        mKeyguardStateController.notifyKeyguardState(true, mKeyguardStateController.isOccluded());
        reset(true /* hideBouncerWhenShowing */);
        SysUiStatsLog.write(SysUiStatsLog.KEYGUARD_STATE_CHANGED,
                SysUiStatsLog.KEYGUARD_STATE_CHANGED__STATE__SHOWN);
+5 −2
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.navigationbar.TaskbarDelegate;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import com.android.systemui.scene.domain.interactor.SceneInteractor;
import com.android.systemui.shade.NotificationShadeWindowView;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeExpansionChangeEvent;
@@ -224,7 +225,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
                        () -> mock(KeyguardDismissActionInteractor.class),
                        mSelectedUserInteractor,
                        () -> mock(KeyguardSurfaceBehindInteractor.class),
                        mock(JavaAdapter.class)) {
                        mock(JavaAdapter.class),
                        () -> mock(SceneInteractor.class)) {
                    @Override
                    public ViewRootImpl getViewRootImpl() {
                        return mViewRootImpl;
@@ -733,7 +735,8 @@ public class StatusBarKeyguardViewManagerTest extends SysuiTestCase {
                        () -> mock(KeyguardDismissActionInteractor.class),
                        mSelectedUserInteractor,
                        () -> mock(KeyguardSurfaceBehindInteractor.class),
                        mock(JavaAdapter.class)) {
                        mock(JavaAdapter.class),
                        () -> mock(SceneInteractor.class)) {
                    @Override
                    public ViewRootImpl getViewRootImpl() {
                        return mViewRootImpl;