diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2012-04-27 15:41:24 -0700 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2012-04-27 16:17:43 -0700 |
| commit | 4478de3c02c1fb2f4f888e696ee1b13721e936d9 (patch) | |
| tree | 3b989d09e19a245ddf053dbf920cf54112a8adab /core/java/android/view/WindowManagerImpl.java | |
| parent | f5d70fd2add31cdb2e4ca1e931b47db95fa4b3e0 (diff) | |
Clear IMM references when window dismissed.
Match behavior of removeViewLocked(), where InputMethodManager clears
any strong references to Views, and also clear mCurRootView. Without
this, IMM can leak a DecorView instance after the user has left the
application.
Bug: 6413553
Change-Id: Iad09cf5dbb7f6f156fd39ed243431432e00f8945
Diffstat (limited to 'core/java/android/view/WindowManagerImpl.java')
| -rw-r--r-- | core/java/android/view/WindowManagerImpl.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/java/android/view/WindowManagerImpl.java b/core/java/android/view/WindowManagerImpl.java index a0f104103b71..6442406fff40 100644 --- a/core/java/android/view/WindowManagerImpl.java +++ b/core/java/android/view/WindowManagerImpl.java @@ -340,6 +340,14 @@ public class WindowManagerImpl implements WindowManager { View curView = root.getView(); root.mAddNesting = 0; + + if (view != null) { + InputMethodManager imm = InputMethodManager.getInstance(view.getContext()); + if (imm != null) { + imm.windowDismissed(mViews[index].getWindowToken()); + } + } + root.die(true); finishRemoveViewLocked(curView, index); if (curView == view) { |
