diff options
author | 2024-11-06 01:05:51 +0000 | |
---|---|---|
committer | 2024-11-06 01:05:51 +0000 | |
commit | c8e11e11e79c4844e88b642162c2fc40a7c9ab2c (patch) | |
tree | 51573cb9a260ce18f89a6c71612c708d10381dd0 | |
parent | 0eb8cd0f16782b94744e84fdeea0779ac21b90cd (diff) | |
parent | 834966e35ed7116200ee4ab7ef75c943eaf07233 (diff) |
Merge "Guard new occlude/unocclude logic behind aconfig flag." into main
-rw-r--r-- | libs/WindowManager/Shell/src/com/android/wm/shell/keyguard/KeyguardTransitionHandler.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/keyguard/KeyguardTransitionHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/keyguard/KeyguardTransitionHandler.java index 3ad9950fdd52..b618bf1215ac 100644 --- a/libs/WindowManager/Shell/src/com/android/wm/shell/keyguard/KeyguardTransitionHandler.java +++ b/libs/WindowManager/Shell/src/com/android/wm/shell/keyguard/KeyguardTransitionHandler.java @@ -26,6 +26,7 @@ import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_APPEARING; import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_GOING_AWAY; import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_LOCKED; import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_OCCLUDING; +import static android.view.WindowManager.TRANSIT_FLAG_KEYGUARD_UNOCCLUDING; import static android.view.WindowManager.TRANSIT_SLEEP; import static android.view.WindowManager.TRANSIT_TO_BACK; import static android.view.WindowManager.TRANSIT_TO_FRONT; @@ -52,6 +53,7 @@ import android.window.WindowContainerToken; import android.window.WindowContainerTransaction; import com.android.internal.protolog.ProtoLog; +import com.android.window.flags.Flags; import com.android.wm.shell.common.ShellExecutor; import com.android.wm.shell.common.TaskStackListenerCallback; import com.android.wm.shell.common.TaskStackListenerImpl; @@ -71,6 +73,9 @@ import com.android.wm.shell.transition.Transitions.TransitionFinishCallback; public class KeyguardTransitionHandler implements Transitions.TransitionHandler, KeyguardChangeListener, TaskStackListenerCallback { + private static final boolean ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS = + Flags.ensureKeyguardDoesTransitionStarting(); + private static final String TAG = "KeyguardTransition"; private final Transitions mTransitions; @@ -325,6 +330,10 @@ public class KeyguardTransitionHandler } private static boolean isKeyguardOccluding(@NonNull TransitionInfo info) { + if (!ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS) { + return (info.getFlags() & TRANSIT_FLAG_KEYGUARD_OCCLUDING) != 0; + } + for (int i = 0; i < info.getChanges().size(); i++) { TransitionInfo.Change change = info.getChanges().get(i); if (change.hasFlags(TransitionInfo.FLAG_IS_TASK_DISPLAY_AREA) @@ -336,6 +345,10 @@ public class KeyguardTransitionHandler } private static boolean isKeyguardUnoccluding(@NonNull TransitionInfo info) { + if (!ENABLE_NEW_KEYGUARD_SHELL_TRANSITIONS) { + return (info.getFlags() & TRANSIT_FLAG_KEYGUARD_UNOCCLUDING) != 0; + } + for (int i = 0; i < info.getChanges().size(); i++) { TransitionInfo.Change change = info.getChanges().get(i); if (change.hasFlags(TransitionInfo.FLAG_IS_TASK_DISPLAY_AREA) |