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

Commit 21d07b95 authored by Irfan Sheriff's avatar Irfan Sheriff
Browse files

Update view on UI thread

Bug: 6970872
Change-Id: I05bec7cb8a8292de522cbfe11c0ecd5a79375014
parent 4641f4b5
Loading
Loading
Loading
Loading
+23 −18
Original line number Diff line number Diff line
@@ -201,13 +201,16 @@ public class WpsDialog extends AlertDialog {
        }
    }

    private void updateDialog(DialogState state, String msg) {
    private void updateDialog(final DialogState state, final String msg) {
        if (mDialogState.ordinal() >= state.ordinal()) {
            //ignore.
            return;
        }
        mDialogState = state;

        mHandler.post(new Runnable() {
                @Override
                public void run() {
                    switch(state) {
                        case WPS_COMPLETE:
                            mTimeoutBar.setVisibility(View.GONE);
@@ -226,6 +229,8 @@ public class WpsDialog extends AlertDialog {
                    }
                    mTextView.setText(msg);
                }
            });
   }

    private void handleEvent(Context context, Intent intent) {
        String action = intent.getAction();