From e06266d90907afeea8fe66e551a7034f96b1bd97 Mon Sep 17 00:00:00 2001 From: Ben Lin Date: Fri, 7 Feb 2020 16:26:40 -0800 Subject: [PATCH] Check for stackBounds nullness in showMenu. We already check for null when we start the activity, so just check for it also when we call #showMenu again with the menu activity already started. Bug: 129801133 Test: None Change-Id: Idd80d28b53615f1b403e1a6d6789d6daba74c630 --- .../android/systemui/pip/phone/PipMenuActivityController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java index f9b18cf17abe4..c7bfc06829b3d 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java +++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivityController.java @@ -280,7 +280,9 @@ public class PipMenuActivityController { if (mToActivityMessenger != null) { Bundle data = new Bundle(); data.putInt(EXTRA_MENU_STATE, menuState); - data.putParcelable(EXTRA_STACK_BOUNDS, stackBounds); + if (stackBounds != null) { + data.putParcelable(EXTRA_STACK_BOUNDS, stackBounds); + } data.putParcelable(EXTRA_MOVEMENT_BOUNDS, movementBounds); data.putBoolean(EXTRA_ALLOW_TIMEOUT, allowMenuTimeout); data.putBoolean(EXTRA_WILL_RESIZE_MENU, willResizeMenu);