From: Pavel Zhamaitsiak Date: Thu, 12 Mar 2015 22:29:11 +0000 (-0700) Subject: Disable Wi-Fi Calling when getting "registration error" intent. X-Git-Tag: android-x86-6.0-r1~623^2~1^2~3^2~5 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e861691;p=android-x86%2Fpackages-apps-Settings.git Disable Wi-Fi Calling when getting "registration error" intent. Bug: 19698057 Change-Id: I403417e08f84014fb9bd9f213fd2b8644e2a6541 --- diff --git a/src/com/android/settings/WifiCallingSettings.java b/src/com/android/settings/WifiCallingSettings.java index 25f1e58aac..8e2c7ed9fb 100644 --- a/src/com/android/settings/WifiCallingSettings.java +++ b/src/com/android/settings/WifiCallingSettings.java @@ -118,7 +118,7 @@ public class WifiCallingSettings extends SettingsPreferenceFragment @Override public void onReceive(Context context, Intent intent) { String action = intent.getAction(); - if (action.equals(ImsPhone.REGISTRATION_ERROR)) { + if (action.equals(ImsManager.ACTION_IMS_REGISTRATION_ERROR)) { // If this fragment is active then we are immediately // showing alert on screen. There is no need to add // notification in this case. @@ -127,6 +127,9 @@ public class WifiCallingSettings extends SettingsPreferenceFragment // not show notification, we are changing result code here. setResultCode(Activity.RESULT_CANCELED); + // UX requirement is to disable WFC in case of "permanent" registration failures. + mSwitch.setChecked(false); + showAlert(intent); } } @@ -142,7 +145,7 @@ public class WifiCallingSettings extends SettingsPreferenceFragment mButtonWfcMode.setOnPreferenceChangeListener(this); mIntentFilter = new IntentFilter(); - mIntentFilter.addAction(ImsPhone.REGISTRATION_ERROR); + mIntentFilter.addAction(ImsManager.ACTION_IMS_REGISTRATION_ERROR); } @Override