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

Commit 6a7e5c28 authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Dismiss immediately to maintain consistent state."

parents 2983acc0 92098c7c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -306,6 +306,7 @@ public class Dialog implements DialogInterface, Window.Callback,
     * method to do cleanup when the dialog is dismissed, instead implement
     * that in {@link #onStop}.
     */
    @Override
    public void dismiss() {
        if (Looper.myLooper() == mHandler.getLooper()) {
            dismissDialog();
@@ -325,7 +326,7 @@ public class Dialog implements DialogInterface, Window.Callback,
        }

        try {
            mWindowManager.removeView(mDecor);
            mWindowManager.removeViewImmediate(mDecor);
        } finally {
            if (mActionMode != null) {
                mActionMode.finish();
+3 −5
Original line number Diff line number Diff line
@@ -335,15 +335,13 @@ public final class WindowManagerGlobal {
            }
        }
        root.die(immediate);
    }

    void doRemoveView(ViewRootImpl root) {
        synchronized (mLock) {
            final View view = root.getView();
        if (view != null) {
            view.assignParent(null);
        }
    }

    void doRemoveView(ViewRootImpl root) {
        synchronized (mLock) {
            final int index = mRoots.indexOf(root);
            if (index >= 0) {
                mRoots.remove(index);