aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-05-09 03:07:56 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-05-09 03:07:56 +0000
commitdd3ad95c31939027d5c689f80d9c9646057b68be (patch)
treeb2a7ad3de52671685ee85f8d9ead0ccaab64eb85
parentc27b86efccbc2cbc6c8fd83a157acc248ad95380 (diff)
parent2e7a510ef76598cfc4687a72c7b5dbadb3e7723e (diff)
downloadims-dd3ad95c31939027d5c689f80d9c9646057b68be.tar.gz
Snap for 5546586 from 2e7a510ef76598cfc4687a72c7b5dbadb3e7723e to qt-release
Change-Id: I0de760620bb8369eb86b2f94b88803eeb39916e3
-rw-r--r--src/java/com/android/ims/ImsManager.java32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/java/com/android/ims/ImsManager.java b/src/java/com/android/ims/ImsManager.java
index cad82836..ab56d291 100644
--- a/src/java/com/android/ims/ImsManager.java
+++ b/src/java/com/android/ims/ImsManager.java
@@ -960,29 +960,18 @@ public class ImsManager {
TelephonyManager tm = (TelephonyManager)
mContext.getSystemService(Context.TELEPHONY_SERVICE);
boolean isRoaming = tm.isNetworkRoaming(subId);
- setWfcNonPersistent(enabled, getWfcMode(isRoaming), isRoaming);
- }
-
- /**
- * @deprecated Does not take into account roaming state of the network, use
- * {@link #setWfcNonPersistent(boolean, int, boolean)}.
- */
- public void setWfcNonPersistent(boolean enabled, int wfcMode) {
- TelephonyManager tm = (TelephonyManager)
- mContext.getSystemService(Context.TELEPHONY_SERVICE);
- boolean isRoaming = tm.isNetworkRoaming(getSubId());
- setWfcNonPersistent(enabled, wfcMode, isRoaming);
+ setWfcNonPersistent(enabled, getWfcMode(isRoaming));
}
/**
* Non-persistently change WFC enabled setting and WFC mode for slot
*
+ * @param enabled If true, WFC and WFC while roaming will be enabled for the associated
+ * subscription, if supported by the carrier. If false, WFC will be disabled for
+ * the associated subscription.
* @param wfcMode The WFC preference if WFC is enabled
- * @param isNetworkRoaming Whether or not the network is currently roaming. If true, the roaming
- * enabled setting set by the user will be delivered to the ImsService. If false, roaming
- * over WFC config will be disabled.
*/
- public void setWfcNonPersistent(boolean enabled, int wfcMode, boolean isNetworkRoaming) {
+ public void setWfcNonPersistent(boolean enabled, int wfcMode) {
// Force IMS to register over LTE when turning off WFC
int imsWfcModeFeatureValue =
enabled ? wfcMode : ImsMmTelManager.WIFI_MODE_CELLULAR_PREFERRED;
@@ -993,10 +982,9 @@ public class ImsManager {
// Set the mode and roaming enabled settings before turning on IMS
setWfcModeInternal(imsWfcModeFeatureValue);
- // If isNetworkRoaming or enabled is false, shortcut to false because of the ImsService
+ // If enabled is false, shortcut to false because of the ImsService
// implementation for WFC roaming, otherwise use the correct user's setting.
- setWfcRoamingSettingInternal(enabled && isNetworkRoaming
- && isWfcRoamingEnabledByUser());
+ setWfcRoamingSettingInternal(enabled && isWfcRoamingEnabledByUser());
if (enabled) {
log("setWfcSetting() : turnOnIms");
@@ -1174,12 +1162,6 @@ public class ImsManager {
// call setWfcModeInternal when roaming == telephony roaming status. Otherwise, ignore.
if (roaming == tm.isNetworkRoaming(getSubId())) {
setWfcModeInternal(wfcMode);
- // if roaming is false, shortcut and just set the setting to false. If WFC is not
- // enabled at all by the user, then just shortcut to false as well, because the current
- // ImsService implementation expects the roaming setting to be alsofalse if WFC is
- // false. Otherwise, use the user's setting.
- setWfcRoamingSettingInternal(roaming && isWfcEnabledByUser()
- && isWfcRoamingEnabledByUser());
}
}