summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Robin Lee <rgl@google.com> 2023-10-03 09:33:17 +0000
committer Cherrypicker Worker <android-build-cherrypicker-worker@google.com> 2023-10-03 14:02:54 +0000
commitdd8b940888ce99183b85da05331362b51a65fe88 (patch)
tree5c4934e259ecd4135552bdea163975201d8d05df
parentbd33753f8ca84afec595e56c3fc487c8ef4d8b33 (diff)
Don't play transitions if keyguard didn't register
This could happen: (a) if something went wrong in early setup (b) if SysUI crashed and received transitions while restarting Bug: 302538471 (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8a20c08f0db20b3461903ecd387bd63b5dd7f149) Merged-In: Iff0f1c4af9e1da96b7bbd04bd45da9f5330fd9b1 Change-Id: Iff0f1c4af9e1da96b7bbd04bd45da9f5330fd9b1
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/keyguard/KeyguardTransitionHandler.java8
1 files changed, 7 insertions, 1 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 b71c48e16acb..53b5bd7ceb94 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
@@ -159,9 +159,15 @@ public class KeyguardTransitionHandler implements Transitions.TransitionHandler
@NonNull SurfaceControl.Transaction startTransaction,
@NonNull SurfaceControl.Transaction finishTransaction,
@NonNull TransitionFinishCallback finishCallback) {
+
+ if (remoteHandler == null) {
+ ProtoLog.e(ShellProtoLogGroup.WM_SHELL_TRANSITIONS,
+ "missing handler for keyguard %s transition", description);
+ return false;
+ }
+
ProtoLog.v(ShellProtoLogGroup.WM_SHELL_TRANSITIONS,
"start keyguard %s transition, info = %s", description, info);
-
try {
mStartedTransitions.put(transition,
new StartedTransition(info, finishTransaction, remoteHandler));