Merge "Settings: Fix sometimes reset progress dialog not dismissed" am: d6d6c5c020
am: 02701dd8b1
am: a1e66c3aca
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2049363 Change-Id: Id1f56b98aaf7fc3d076eb56e54f660a50765352d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -150,7 +150,10 @@ public class ResetNetworkConfirm extends InstrumentedFragment {
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Boolean succeeded) {
|
||||
mProgressDialog.dismiss();
|
||||
if (mProgressDialog != null && mProgressDialog.isShowing()) {
|
||||
mProgressDialog.dismiss();
|
||||
}
|
||||
|
||||
if (succeeded) {
|
||||
Toast.makeText(mContext, R.string.reset_network_complete_toast, Toast.LENGTH_SHORT)
|
||||
.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.show();
|
||||
|
||||
|
Reference in New Issue
Block a user