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
This commit is contained in:
Ben Lin
2020-11-23 17:08:26 -08:00
parent c092761a4b
commit 645e988e1d

View File

@@ -239,7 +239,9 @@ public class PipMenuActivityController {
+ " callers=\n" + Debug.getCallers(5, " "));
}
maybeCreateSyncApplier();
if (!maybeCreateSyncApplier()) {
return;
}
mPipMenuView.showMenu(menuState, stackBounds, allowMenuTimeout, willResizeMenu, withDelay,
showResizeHandle);