Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a15f4a46 authored by Romain Guy's avatar Romain Guy Committed by Android (Google) Code Review
Browse files

Merge "Prevent crash when dismissing a PopupWindow that didn't have time to show up. Bug #2520981"

parents 2babee66 92be82e6
Loading
Loading
Loading
Loading
+12 −10
Original line number Diff line number Diff line
@@ -1048,8 +1048,9 @@ public class PopupWindow {
        if (isShowing() && mPopupView != null) {
            unregisterForScrollChanged();

            try {
                mWindowManager.removeView(mPopupView);                

            } finally {
                if (mPopupView != mContentView && mPopupView instanceof ViewGroup) {
                    ((ViewGroup) mPopupView).removeView(mContentView);
                }
@@ -1061,6 +1062,7 @@ public class PopupWindow {
                }
            }
        }
    }

    /**
     * Sets the listener to be called when the window is dismissed.