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

Commit ccfd872b authored by Lucas Silva's avatar Lucas Silva
Browse files

Fix lockscreen flash when closing activities

When closing activities over the lockscreen, transition directly to the
hub by snapping in the hub. This prevents flashing the lockscreen.

Fixes: 340954631
Test: see videos on bug, verified with timers and media activities
Flag: com.android.systemui.communal_hub
Change-Id: Id06341bf88ead966eba6d3e0a26d8e4f0e692864
parent 0d4eb64a
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.systemui.communal.ui.viewmodel
import android.graphics.Color
import com.android.systemui.communal.domain.interactor.CommunalInteractor
import com.android.systemui.communal.domain.interactor.CommunalSceneInteractor
import com.android.systemui.communal.shared.model.CommunalScenes
import com.android.systemui.communal.util.CommunalColors
import com.android.systemui.dagger.SysUISingleton
import com.android.systemui.dagger.qualifiers.Application
@@ -58,9 +59,17 @@ constructor(
    dreamToGlanceableHubTransitionViewModel: DreamingToGlanceableHubTransitionViewModel,
    glanceableHubToDreamTransitionViewModel: GlanceableHubToDreamingTransitionViewModel,
    communalInteractor: CommunalInteractor,
    communalSceneInteractor: CommunalSceneInteractor,
    private val communalSceneInteractor: CommunalSceneInteractor,
    keyguardTransitionInteractor: KeyguardTransitionInteractor
) {
    /**
     * Snaps to [CommunalScenes.Communal], showing the glanceable hub immediately without any
     * transition.
     */
    fun snapToCommunal() {
        communalSceneInteractor.snapToScene(CommunalScenes.Communal)
    }

    // Show UMO on glanceable hub immediately on transition into glanceable hub
    private val showUmoFromOccludedToGlanceableHub: Flow<Boolean> =
        keyguardTransitionInteractor
+2 −0
Original line number Diff line number Diff line
@@ -1278,6 +1278,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
                            initAlphaForAnimationTargets(wallpapers);
                            if (isDream) {
                                mDreamViewModel.get().startTransitionFromDream();
                            } else {
                                mCommunalTransitionViewModel.get().snapToCommunal();
                            }
                            mUnoccludeFinishedCallback = finishedCallback;
                            return;