summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-07-24 15:58:14 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-07-24 15:58:14 +0000
commit98112a97bca06c87d59abe15eb1759d8ccaa5f54 (patch)
treef914be0f88165feb39cada44d6e22a7d474bb0a4
parent8bcb282d71fed74f830d053ed8b9bb14a0f2ce7b (diff)
parentccfd872b6dcfd17185aef84fbfd67ce07a4db5d1 (diff)
Merge "Fix lockscreen flash when closing activities" into main
-rw-r--r--packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt11
-rw-r--r--packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java2
2 files changed, 12 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt
index e1408a065a37..bbd8596a76bd 100644
--- a/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt
+++ b/packages/SystemUI/src/com/android/systemui/communal/ui/viewmodel/CommunalTransitionViewModel.kt
@@ -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
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index e46a7cbf9bb0..0b3d0f7160f0 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -1278,6 +1278,8 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
initAlphaForAnimationTargets(wallpapers);
if (isDream) {
mDreamViewModel.get().startTransitionFromDream();
+ } else {
+ mCommunalTransitionViewModel.get().snapToCommunal();
}
mUnoccludeFinishedCallback = finishedCallback;
return;