Merge "Settings: Fix sometimes reset progress dialog not dismissed"
This commit is contained in:
@@ -150,7 +150,10 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPostExecute(Boolean succeeded) {
|
protected void onPostExecute(Boolean succeeded) {
|
||||||
mProgressDialog.dismiss();
|
if (mProgressDialog != null && mProgressDialog.isShowing()) {
|
||||||
|
mProgressDialog.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
if (succeeded) {
|
if (succeeded) {
|
||||||
Toast.makeText(mContext, R.string.reset_network_complete_toast, Toast.LENGTH_SHORT)
|
Toast.makeText(mContext, R.string.reset_network_complete_toast, Toast.LENGTH_SHORT)
|
||||||
.show();
|
.show();
|
||||||
@@ -189,6 +192,12 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Should dismiss the progress dialog firstly if it is showing
|
||||||
|
// Or not the progress dialog maybe not dismissed in fast clicking.
|
||||||
|
if (mProgressDialog != null && mProgressDialog.isShowing()) {
|
||||||
|
mProgressDialog.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
mProgressDialog = getProgressDialog(mActivity);
|
mProgressDialog = getProgressDialog(mActivity);
|
||||||
mProgressDialog.show();
|
mProgressDialog.show();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user