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
This commit is contained in:
Winson Chung
2017-03-21 09:29:04 -07:00
parent 914c4ab1ed
commit 7200eda462

View File

@@ -295,7 +295,9 @@ public class PipMenuActivity extends Activity {
if (animationFinishedRunnable != null) {
animationFinishedRunnable.run();
}
setVisible(false);
if (!isDestroyed()) {
setVisible(false);
}
}
});
mMenuContainerAnimator.addUpdateListener(mMenuBgUpdateListener);