diff options
author | 2015-09-29 13:54:44 -0700 | |
---|---|---|
committer | 2015-09-29 13:58:46 -0700 | |
commit | a8be1b99ec6c9ad675d80717c25a57fed0aea923 (patch) | |
tree | dd5f907dad981123af3de04e9a51868b9ec42c55 | |
parent | f05de8f3b245ba5d788831e41684668d215968dd (diff) |
Carry over app token when preserving window
Otherwise the token in the window's attr will be null after relaunch.
When this attr is updated with WindowManagerGlobal, setStoppedState()
will no longer find the view from the token.
bug: 24404382
Change-Id: Ib6935b03346a84dd023e224f72896041fda9dcd5
-rw-r--r-- | core/java/com/android/internal/policy/PhoneWindow.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/com/android/internal/policy/PhoneWindow.java b/core/java/com/android/internal/policy/PhoneWindow.java index 2e4d9b50b7be..41c92576ffea 100644 --- a/core/java/com/android/internal/policy/PhoneWindow.java +++ b/core/java/com/android/internal/policy/PhoneWindow.java @@ -337,6 +337,10 @@ public class PhoneWindow extends Window implements MenuBuilder.Callback { mElevation = preservedWindow.getElevation(); mLoadEleveation = false; mForceDecorInstall = true; + // If we're preserving window, carry over the app token from the preserved + // window, as we'll be skipping the addView in handleResumeActivity(), and + // the token will not be updated as for a new window. + getAttributes().token = preservedWindow.getAttributes().token; } } |