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
This commit is contained in:
@@ -1253,13 +1253,13 @@ public class PopupWindow {
|
||||
unregisterForScrollChanged();
|
||||
|
||||
try {
|
||||
mWindowManager.removeView(mPopupView);
|
||||
mWindowManager.removeViewImmediate(mPopupView);
|
||||
} finally {
|
||||
if (mPopupView != mContentView && mPopupView instanceof ViewGroup) {
|
||||
((ViewGroup) mPopupView).removeView(mContentView);
|
||||
}
|
||||
mPopupView = null;
|
||||
|
||||
|
||||
if (mOnDismissListener != null) {
|
||||
mOnDismissListener.onDismiss();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user