Merge "PopupWindow dismiss() can get into a recursive loop." into ics-mr0

This commit is contained in:
Svetoslav Ganov
2011-11-11 00:00:02 -08:00
committed by Android (Google) Code Review

View File

@@ -1248,6 +1248,8 @@ public class PopupWindow {
*/
public void dismiss() {
if (isShowing() && mPopupView != null) {
mIsShowing = false;
unregisterForScrollChanged();
try {
@@ -1257,7 +1259,6 @@ public class PopupWindow {
((ViewGroup) mPopupView).removeView(mContentView);
}
mPopupView = null;
mIsShowing = false;
if (mOnDismissListener != null) {
mOnDismissListener.onDismiss();