summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ben Lin <linben@google.com> 2020-11-23 17:08:26 -0800
committer Ben Lin <linben@google.com> 2020-11-23 17:08:26 -0800
commit645e988e1d786f0e68cc0fb99360d35837c70c34 (patch)
treec8362ed528cb615ed6588f6312c8f25c957d0c51
parentc092761a4b05d889c7ac9bb43e7539ad72771212 (diff)
PiP: Safeguard in calling on menu view in case it's not created.
In case SystemUI crashes, there is a possibility that we can call on showMenu() upon SysUI restart without the menu instance created. We should at least not crash SysUI again for this. Bug: 173683353 Test: None Change-Id: I67c11ffaf9f7e6972cc4b005f07f8fc6897ac5c1
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuActivityController.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuActivityController.java b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuActivityController.java
index 1d5430008501..d4217553ef2d 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuActivityController.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuActivityController.java
@@ -239,7 +239,9 @@ public class PipMenuActivityController {
+ " callers=\n" + Debug.getCallers(5, " "));
}
- maybeCreateSyncApplier();
+ if (!maybeCreateSyncApplier()) {
+ return;
+ }
mPipMenuView.showMenu(menuState, stackBounds, allowMenuTimeout, willResizeMenu, withDelay,
showResizeHandle);