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

Commit f9d5ee55 authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am 5b972e73: Merge "Don\'t check whether dismiss() is called on the UI thread...

am 5b972e73: Merge "Don\'t check whether dismiss() is called on the UI thread Bug #6436642" into jb-dev

* commit '5b972e73':
  Don't check whether dismiss() is called on the UI thread Bug #6436642
parents 81c0f9df 5b972e73
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -103,7 +103,6 @@ public class Dialog implements DialogInterface, Window.Callback,
    private boolean mShowing = false;
    private boolean mCanceled = false;

    private final Thread mUiThread;
    private final Handler mHandler = new Handler();

    private static final int DISMISS = 0x43;
@@ -162,7 +161,6 @@ public class Dialog implements DialogInterface, Window.Callback,
        w.setCallback(this);
        w.setWindowManager(mWindowManager, null, null);
        w.setGravity(Gravity.CENTER);
        mUiThread = Thread.currentThread();
        mListenersHandler = new ListenersHandler(this);
    }
    
@@ -299,12 +297,7 @@ public class Dialog implements DialogInterface, Window.Callback,
     * that in {@link #onStop}.
     */
    public void dismiss() {
        if (Thread.currentThread() != mUiThread) {
        mHandler.post(mDismissAction);
        } else {
            mHandler.removeCallbacks(mDismissAction);
            mDismissAction.run();
        }
    }

    void dismissDialog() {