* commit '5a2dce6092c9686f285652da42ca8d0556b7b17d': Update view on UI thread
This commit is contained in:
@@ -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()) {
|
if (mDialogState.ordinal() >= state.ordinal()) {
|
||||||
//ignore.
|
//ignore.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mDialogState = state;
|
mDialogState = state;
|
||||||
|
|
||||||
|
mHandler.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case WPS_COMPLETE:
|
case WPS_COMPLETE:
|
||||||
mTimeoutBar.setVisibility(View.GONE);
|
mTimeoutBar.setVisibility(View.GONE);
|
||||||
@@ -226,6 +229,8 @@ public class WpsDialog extends AlertDialog {
|
|||||||
}
|
}
|
||||||
mTextView.setText(msg);
|
mTextView.setText(msg);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void handleEvent(Context context, Intent intent) {
|
private void handleEvent(Context context, Intent intent) {
|
||||||
String action = intent.getAction();
|
String action = intent.getAction();
|
||||||
|
Reference in New Issue
Block a user