Skip to content

Commit b82d074

Browse files
author
Craig Mautner
committed
Remove Popup immediately rather than defer it.
Delaying the popup by using removeView instead of removeViewImmediate caused an error when the removal was actually executed after the parent window was deleted along with the popup. Fixes bug 6407801. Change-Id: Ieb17d58467aaf16e1a24f47187f52766d694ba32
1 parent ae14715 commit b82d074

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/java/android/widget/PopupWindow.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,13 +1253,13 @@ public void dismiss() {
12531253
unregisterForScrollChanged();
12541254

12551255
try {
1256-
mWindowManager.removeView(mPopupView);
1256+
mWindowManager.removeViewImmediate(mPopupView);
12571257
} finally {
12581258
if (mPopupView != mContentView && mPopupView instanceof ViewGroup) {
12591259
((ViewGroup) mPopupView).removeView(mContentView);
12601260
}
12611261
mPopupView = null;
1262-
1262+
12631263
if (mOnDismissListener != null) {
12641264
mOnDismissListener.onDismiss();
12651265
}

0 commit comments

Comments
 (0)