[Settings] Stop listening data connected intent for presenting reset APN dialog
Suspening the monitering of intent(TelephonyIntents.ACTION_ANY_DATA_CONNECTION_STATE_CHANGED) during the stage of resetting default APN, since its more like a noice once the reset progress stared (since user pressed the menu button). Bug: 190127964 Test: local Change-Id: I524fb4a3b06b50706556b8e68cb36dc5efbd9a07
This commit is contained in:
@@ -467,6 +467,9 @@ public class ApnSettings extends RestrictedSettingsFragment
|
||||
}
|
||||
|
||||
private boolean restoreDefaultApn() {
|
||||
// Callback of data connection change could be some noise during the stage of restore.
|
||||
mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_NONE);
|
||||
|
||||
showDialog(DIALOG_RESTORE_DEFAULTAPN);
|
||||
mRestoreDefaultApnMode = true;
|
||||
|
||||
@@ -517,6 +520,7 @@ public class ApnSettings extends RestrictedSettingsFragment
|
||||
getResources().getString(
|
||||
R.string.restore_default_apn_completed),
|
||||
Toast.LENGTH_LONG).show();
|
||||
restartPhoneStateListener(mSubId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user