From 7200eda462bc8391afd70e1b84e50350ba909eeb Mon Sep 17 00:00:00 2001 From: Winson Chung Date: Tue, 21 Mar 2017 09:29:04 -0700 Subject: [PATCH] Ensure we don't set visibility after action is destroyed. - The activity call to setVisible() does not check before using the decor view (which is reset once the activity is destroyed). Bug: 36469656 Test: Test PIP app which finishes in response to action handling Change-Id: I50e49bd6e9759c11edd71c0c5cac61939e3bf276 --- .../src/com/android/systemui/pip/phone/PipMenuActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java index e8ba8f3f4125f..db3cc6c93693c 100644 --- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java +++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMenuActivity.java @@ -295,7 +295,9 @@ public class PipMenuActivity extends Activity { if (animationFinishedRunnable != null) { animationFinishedRunnable.run(); } - setVisible(false); + if (!isDestroyed()) { + setVisible(false); + } } }); mMenuContainerAnimator.addUpdateListener(mMenuBgUpdateListener);