Merge "Replaced reference to setPreferredNetworkType" am: c1ec7f1fea
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1393368 Change-Id: I252c98b9f0f17c42cd8b38d724a68d22db3626ca
This commit is contained in:
@@ -81,8 +81,6 @@ public class EnabledNetworkModePreferenceController extends
|
|||||||
public int getAvailabilityStatus(int subId) {
|
public int getAvailabilityStatus(int subId) {
|
||||||
boolean visible;
|
boolean visible;
|
||||||
final PersistableBundle carrierConfig = mCarrierConfigManager.getConfigForSubId(subId);
|
final PersistableBundle carrierConfig = mCarrierConfigManager.getConfigForSubId(subId);
|
||||||
final TelephonyManager telephonyManager = TelephonyManager
|
|
||||||
.from(mContext).createForSubscriptionId(subId);
|
|
||||||
if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
|
if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
|
||||||
visible = false;
|
visible = false;
|
||||||
} else if (carrierConfig == null) {
|
} else if (carrierConfig == null) {
|
||||||
@@ -130,13 +128,14 @@ public class EnabledNetworkModePreferenceController extends
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceChange(Preference preference, Object object) {
|
public boolean onPreferenceChange(Preference preference, Object object) {
|
||||||
final int settingsMode = Integer.parseInt((String) object);
|
final int newPreferredNetworkMode = Integer.parseInt((String) object);
|
||||||
|
|
||||||
if (mTelephonyManager.setPreferredNetworkType(mSubId, settingsMode)) {
|
if (mTelephonyManager.setPreferredNetworkTypeBitmask(
|
||||||
|
MobileNetworkUtils.getRafFromNetworkType(newPreferredNetworkMode))) {
|
||||||
Settings.Global.putInt(mContext.getContentResolver(),
|
Settings.Global.putInt(mContext.getContentResolver(),
|
||||||
Settings.Global.PREFERRED_NETWORK_MODE + mSubId,
|
Settings.Global.PREFERRED_NETWORK_MODE + mSubId,
|
||||||
settingsMode);
|
newPreferredNetworkMode);
|
||||||
updatePreferenceValueAndSummary((ListPreference) preference, settingsMode);
|
updatePreferenceValueAndSummary((ListPreference) preference, newPreferredNetworkMode);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -760,4 +760,151 @@ public class MobileNetworkUtils {
|
|||||||
}
|
}
|
||||||
return activeSubIds;
|
return activeSubIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Imported from {@link android.telephony.RadioAccessFamily}
|
||||||
|
*/
|
||||||
|
public static long getRafFromNetworkType(int type) {
|
||||||
|
switch (type) {
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_WCDMA_PREF:
|
||||||
|
return TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_GSM_ONLY:
|
||||||
|
return TelephonyManagerConstants.GSM;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_WCDMA_ONLY:
|
||||||
|
return TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_GSM_UMTS:
|
||||||
|
return TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_CDMA_EVDO:
|
||||||
|
return TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_ONLY:
|
||||||
|
return TelephonyManagerConstants.LTE;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_WCDMA:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_CDMA_NO_EVDO:
|
||||||
|
return TelephonyManagerConstants.CDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_EVDO_NO_CDMA:
|
||||||
|
return TelephonyManagerConstants.EVDO;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_GLOBAL:
|
||||||
|
return TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_TDSCDMA_ONLY:
|
||||||
|
return TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_TDSCDMA_WCDMA:
|
||||||
|
return TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_TDSCDMA_GSM:
|
||||||
|
return TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.GSM;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA_GSM:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.GSM;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_TDSCDMA_GSM_WCDMA:
|
||||||
|
return TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA_WCDMA:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
|
||||||
|
return TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA:
|
||||||
|
return TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_ONLY):
|
||||||
|
return TelephonyManagerConstants.NR;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_CDMA_EVDO):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_GSM_WCDMA):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_CDMA_EVDO_GSM_WCDMA):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_WCDMA):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_TDSCDMA):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_TDSCDMA_GSM):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.GSM;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_TDSCDMA_WCDMA):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_TDSCDMA_GSM_WCDMA):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
case (TelephonyManagerConstants.NETWORK_MODE_NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA):
|
||||||
|
return TelephonyManagerConstants.NR
|
||||||
|
| TelephonyManagerConstants.LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_TD_SCDMA
|
||||||
|
| TelephonyManagerConstants.CDMA
|
||||||
|
| TelephonyManagerConstants.EVDO
|
||||||
|
| TelephonyManagerConstants.GSM
|
||||||
|
| TelephonyManagerConstants.WCDMA;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return TelephonyManager.NETWORK_TYPE_BITMASK_UNKNOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -49,8 +49,6 @@ public class PreferredNetworkModePreferenceController extends TelephonyBasePrefe
|
|||||||
@Override
|
@Override
|
||||||
public int getAvailabilityStatus(int subId) {
|
public int getAvailabilityStatus(int subId) {
|
||||||
final PersistableBundle carrierConfig = mCarrierConfigManager.getConfigForSubId(subId);
|
final PersistableBundle carrierConfig = mCarrierConfigManager.getConfigForSubId(subId);
|
||||||
final TelephonyManager telephonyManager = TelephonyManager
|
|
||||||
.from(mContext).createForSubscriptionId(subId);
|
|
||||||
boolean visible;
|
boolean visible;
|
||||||
if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
|
if (subId == SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
|
||||||
visible = false;
|
visible = false;
|
||||||
@@ -81,14 +79,15 @@ public class PreferredNetworkModePreferenceController extends TelephonyBasePrefe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onPreferenceChange(Preference preference, Object object) {
|
public boolean onPreferenceChange(Preference preference, Object object) {
|
||||||
final int settingsMode = Integer.parseInt((String) object);
|
final int newPreferredNetworkMode = Integer.parseInt((String) object);
|
||||||
|
|
||||||
if (mTelephonyManager.setPreferredNetworkType(mSubId, settingsMode)) {
|
if (mTelephonyManager.setPreferredNetworkTypeBitmask(
|
||||||
|
MobileNetworkUtils.getRafFromNetworkType(newPreferredNetworkMode))) {
|
||||||
Settings.Global.putInt(mContext.getContentResolver(),
|
Settings.Global.putInt(mContext.getContentResolver(),
|
||||||
Settings.Global.PREFERRED_NETWORK_MODE + mSubId,
|
Settings.Global.PREFERRED_NETWORK_MODE + mSubId,
|
||||||
settingsMode);
|
newPreferredNetworkMode);
|
||||||
final ListPreference listPreference = (ListPreference) preference;
|
final ListPreference listPreference = (ListPreference) preference;
|
||||||
listPreference.setSummary(getPreferredNetworkModeSummaryResId(settingsMode));
|
listPreference.setSummary(getPreferredNetworkModeSummaryResId(newPreferredNetworkMode));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,6 +18,8 @@ package com.android.settings.network.telephony;
|
|||||||
|
|
||||||
import android.telephony.TelephonyManager;
|
import android.telephony.TelephonyManager;
|
||||||
|
|
||||||
|
import android.telephony.TelephonyManager;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains hidden constants copied from the platform.
|
* Contains hidden constants copied from the platform.
|
||||||
*/
|
*/
|
||||||
@@ -203,6 +205,35 @@ public class TelephonyConstants {
|
|||||||
* NR 5G, LTE, TD-SCDMA, CDMA, EVDO, GSM and WCDMA
|
* NR 5G, LTE, TD-SCDMA, CDMA, EVDO, GSM and WCDMA
|
||||||
*/
|
*/
|
||||||
public static final int NETWORK_MODE_NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 33;
|
public static final int NETWORK_MODE_NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 33;
|
||||||
|
|
||||||
|
|
||||||
|
// Grouping of RAFs
|
||||||
|
// imported from {@link android.telephony.RadioAccessFamily}
|
||||||
|
// 2G
|
||||||
|
public static final long GSM = TelephonyManager.NETWORK_TYPE_BITMASK_GSM
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_GPRS
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_EDGE;
|
||||||
|
public static final long CDMA = TelephonyManager.NETWORK_TYPE_BITMASK_CDMA
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_1xRTT;
|
||||||
|
|
||||||
|
// 3G
|
||||||
|
public static final long EVDO = TelephonyManager.NETWORK_TYPE_BITMASK_EVDO_0
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_EVDO_A
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_EVDO_B
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_EHRPD;
|
||||||
|
public static final long HS = TelephonyManager.NETWORK_TYPE_BITMASK_HSUPA
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_HSDPA
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_HSPA
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_HSPAP;
|
||||||
|
public static final long WCDMA = HS | TelephonyManager.NETWORK_TYPE_BITMASK_UMTS;
|
||||||
|
|
||||||
|
// 4G
|
||||||
|
public static final long LTE = TelephonyManager.NETWORK_TYPE_BITMASK_LTE
|
||||||
|
| TelephonyManager.NETWORK_TYPE_BITMASK_LTE_CA;
|
||||||
|
|
||||||
|
// 5G
|
||||||
|
public static final long NR = TelephonyManager.NETWORK_TYPE_BITMASK_NR;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -20,6 +20,7 @@ import static androidx.lifecycle.Lifecycle.Event.ON_START;
|
|||||||
|
|
||||||
import static com.android.settings.core.BasePreferenceController.AVAILABLE;
|
import static com.android.settings.core.BasePreferenceController.AVAILABLE;
|
||||||
import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE;
|
import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE;
|
||||||
|
import static com.android.settings.network.telephony.MobileNetworkUtils.getRafFromNetworkType;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
@@ -392,8 +393,8 @@ public class EnabledNetworkModePreferenceControllerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void onPreferenceChange_updateSuccess() {
|
public void onPreferenceChange_updateSuccess() {
|
||||||
doReturn(true).when(mTelephonyManager).setPreferredNetworkType(SUB_ID,
|
doReturn(true).when(mTelephonyManager).setPreferredNetworkTypeBitmask(
|
||||||
TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA);
|
getRafFromNetworkType(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA));
|
||||||
|
|
||||||
mController.onPreferenceChange(mPreference,
|
mController.onPreferenceChange(mPreference,
|
||||||
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA));
|
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA));
|
||||||
@@ -405,8 +406,8 @@ public class EnabledNetworkModePreferenceControllerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void onPreferenceChange_updateFail() {
|
public void onPreferenceChange_updateFail() {
|
||||||
doReturn(false).when(mTelephonyManager).setPreferredNetworkType(SUB_ID,
|
doReturn(false).when(mTelephonyManager).setPreferredNetworkTypeBitmask(
|
||||||
TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA);
|
getRafFromNetworkType(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA));
|
||||||
|
|
||||||
mController.onPreferenceChange(mPreference,
|
mController.onPreferenceChange(mPreference,
|
||||||
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA));
|
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_GSM_WCDMA));
|
||||||
|
@@ -18,6 +18,7 @@ package com.android.settings.network.telephony;
|
|||||||
|
|
||||||
import static com.android.settings.core.BasePreferenceController.AVAILABLE;
|
import static com.android.settings.core.BasePreferenceController.AVAILABLE;
|
||||||
import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE;
|
import static com.android.settings.core.BasePreferenceController.CONDITIONALLY_UNAVAILABLE;
|
||||||
|
import static com.android.settings.network.telephony.MobileNetworkUtils.getRafFromNetworkType;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
|
|
||||||
@@ -140,8 +141,8 @@ public class PreferredNetworkModePreferenceControllerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void onPreferenceChange_updateSuccess() {
|
public void onPreferenceChange_updateSuccess() {
|
||||||
doReturn(true).when(mTelephonyManager).setPreferredNetworkType(SUB_ID,
|
doReturn(true).when(mTelephonyManager).setPreferredNetworkTypeBitmask(
|
||||||
TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA);
|
getRafFromNetworkType(TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA));
|
||||||
|
|
||||||
mController.onPreferenceChange(mPreference,
|
mController.onPreferenceChange(mPreference,
|
||||||
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA));
|
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA));
|
||||||
@@ -153,8 +154,8 @@ public class PreferredNetworkModePreferenceControllerTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void onPreferenceChange_updateFail() {
|
public void onPreferenceChange_updateFail() {
|
||||||
doReturn(false).when(mTelephonyManager).setPreferredNetworkType(SUB_ID,
|
doReturn(false).when(mTelephonyManager).setPreferredNetworkTypeBitmask(
|
||||||
TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA);
|
getRafFromNetworkType(TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA));
|
||||||
|
|
||||||
mController.onPreferenceChange(mPreference,
|
mController.onPreferenceChange(mPreference,
|
||||||
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA));
|
String.valueOf(TelephonyManagerConstants.NETWORK_MODE_LTE_TDSCDMA));
|
||||||
|
Reference in New Issue
Block a user