From 1e034fe79a164a12385b077e2aad9ebfaab5e389 Mon Sep 17 00:00:00 2001 From: Pavel Zhamaitsiak Date: Thu, 12 Mar 2015 12:36:17 -0700 Subject: [PATCH] Remove WFC Roaming setting Bug 19682545 Change-Id: I0adc7a20c411dd1fea3e2b79bcd5e159537a65c0 --- res/values/strings.xml | 4 --- res/xml/wifi_calling_settings.xml | 5 --- .../android/settings/WifiCallingSettings.java | 35 +------------------ 3 files changed, 1 insertion(+), 43 deletions(-) diff --git a/res/values/strings.xml b/res/values/strings.xml index 8e29e5ddc64..25d0cc6c2c9 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1908,10 +1908,6 @@ Cellular preferred (Uses Wi-Fi only if cell network isn\'t available) Wi-Fi only (Never uses cell network. Can\'t make or receive calls if Wi-Fi isn\'t available) - - WFC handoff while roaming - - Allow Wi-Fi voice calls handoff to cell network when roaming diff --git a/res/xml/wifi_calling_settings.xml b/res/xml/wifi_calling_settings.xml index 37a2d285ba6..ca4e560e422 100644 --- a/res/xml/wifi_calling_settings.xml +++ b/res/xml/wifi_calling_settings.xml @@ -26,9 +26,4 @@ android:entryValues="@array/wifi_calling_mode_values" android:dialogTitle="@string/wifi_calling_mode_dialog_title" /> - - diff --git a/src/com/android/settings/WifiCallingSettings.java b/src/com/android/settings/WifiCallingSettings.java index dacdc7b0a95..25f1e58aacb 100644 --- a/src/com/android/settings/WifiCallingSettings.java +++ b/src/com/android/settings/WifiCallingSettings.java @@ -25,7 +25,6 @@ import android.content.IntentFilter; import android.os.Bundle; import android.preference.ListPreference; import android.preference.Preference; -import android.preference.SwitchPreference; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; import android.util.Log; @@ -38,8 +37,7 @@ import com.android.settings.widget.SwitchBar; /** * "Wi-Fi Calling settings" screen. This preference screen lets you - * enable/disable Wi-Fi Calling, change mode, enable/disable - * handover while on roaming. + * enable/disable Wi-Fi Calling and change Wi-Fi Calling mode. */ public class WifiCallingSettings extends SettingsPreferenceFragment implements SwitchBar.OnSwitchChangeListener, @@ -49,13 +47,11 @@ public class WifiCallingSettings extends SettingsPreferenceFragment //String keys for preference lookup private static final String BUTTON_WFC_MODE = "wifi_calling_mode"; - private static final String BUTTON_WFC_ROAM = "wifi_calling_roam"; //UI objects private SwitchBar mSwitchBar; private Switch mSwitch; private ListPreference mButtonWfcMode; - private SwitchPreference mButtonWfcRoam; private final PhoneStateListener mPhoneStateListener = new PhoneStateListener() { /* @@ -77,18 +73,9 @@ public class WifiCallingSettings extends SettingsPreferenceFragment && isNonTtyOrTtyOnVolteEnabled); Preference pref = getPreferenceScreen().findPreference(BUTTON_WFC_MODE); - int wfcMode = ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY; if (pref != null) { pref.setEnabled(isWfcEnabled && (state == TelephonyManager.CALL_STATE_IDLE)); - ListPreference prefWfcMode = (ListPreference) pref; - wfcMode = Integer.valueOf(prefWfcMode.getValue()).intValue(); - } - pref = getPreferenceScreen().findPreference(BUTTON_WFC_ROAM); - if (pref != null) { - pref.setEnabled(isWfcEnabled - && (wfcMode != ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY) - && (state == TelephonyManager.CALL_STATE_IDLE)); } } }; @@ -154,9 +141,6 @@ public class WifiCallingSettings extends SettingsPreferenceFragment mButtonWfcMode = (ListPreference) findPreference(BUTTON_WFC_MODE); mButtonWfcMode.setOnPreferenceChangeListener(this); - mButtonWfcRoam = (SwitchPreference) findPreference(BUTTON_WFC_ROAM); - mButtonWfcRoam.setOnPreferenceChangeListener(this); - mIntentFilter = new IntentFilter(); mIntentFilter.addAction(ImsPhone.REGISTRATION_ERROR); } @@ -183,10 +167,6 @@ public class WifiCallingSettings extends SettingsPreferenceFragment mButtonWfcMode.setValue(Integer.toString(wfcMode)); mButtonWfcMode.setSummary(getWfcModeSummary(context, wfcMode)); - mButtonWfcRoam.setChecked(wfcEnabled - && (wfcMode != ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY) - && ImsManager.isWfcRoamingEnabledByUser(context)); - context.registerReceiver(mIntentReceiver, mIntentFilter); Intent intent = getActivity().getIntent(); @@ -223,10 +203,6 @@ public class WifiCallingSettings extends SettingsPreferenceFragment int wfcMode = ImsManager.getWfcMode(context); mButtonWfcMode.setSummary(getWfcModeSummary(context, wfcMode)); mButtonWfcMode.setEnabled(isChecked); - boolean wfcHandoffEnabled = (wfcMode != ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY); - mButtonWfcRoam.setEnabled(isChecked && wfcHandoffEnabled); - mButtonWfcRoam.setChecked(isChecked && wfcHandoffEnabled - && ImsManager.isWfcRoamingEnabledByUser(context)); } @Override @@ -240,15 +216,6 @@ public class WifiCallingSettings extends SettingsPreferenceFragment ImsManager.setWfcMode(context, buttonMode); mButtonWfcMode.setSummary(getWfcModeSummary(context, buttonMode)); } - boolean wfcHandoffEnabled = - (buttonMode != ImsConfig.WfcModeFeatureValueConstants.WIFI_ONLY); - mButtonWfcRoam.setEnabled(wfcHandoffEnabled); - mButtonWfcRoam.setChecked(wfcHandoffEnabled && - ImsManager.isWfcRoamingEnabledByUser(context)); - } else if (preference == mButtonWfcRoam) { - SwitchPreference wfcRoamPref = (SwitchPreference) preference; - wfcRoamPref.setChecked(!wfcRoamPref.isChecked()); - ImsManager.setWfcRoamingSetting(context, wfcRoamPref.isChecked()); } return true; }