Merge "The phone didn't reload the allowed Network Type"

This commit is contained in:
SongFerng Wang
2021-03-21 16:45:59 +00:00
committed by Gerrit Code Review
8 changed files with 95 additions and 58 deletions

View File

@@ -10096,7 +10096,7 @@ package android.telephony {
} }
public static interface TelephonyCallback.AllowedNetworkTypesListener { public static interface TelephonyCallback.AllowedNetworkTypesListener {
method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void onAllowedNetworkTypesChanged(@NonNull java.util.Map<java.lang.Integer,java.lang.Long>); method @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) public void onAllowedNetworkTypesChanged(int, long);
} }
public static interface TelephonyCallback.CallAttributesListener { public static interface TelephonyCallback.CallAttributesListener {

View File

@@ -1577,7 +1577,7 @@ public class PhoneStateListener {
// default implementation empty // default implementation empty
} }
public void onAllowedNetworkTypesChanged(Map allowedNetworkTypesList) { public void onAllowedNetworkTypesChanged(int reason, long allowedNetworkType) {
// default implementation empty // default implementation empty
} }

View File

@@ -544,9 +544,6 @@ public class TelephonyCallback {
/** /**
* Event for changes to allowed network list based on all active subscriptions. * Event for changes to allowed network list based on all active subscriptions.
* *
* <p>Requires permission {@link android.Manifest.permission#READ_PHONE_STATE} or the calling
* app has carrier privileges (see {@link TelephonyManager#hasCarrierPrivileges}).
*
* @hide * @hide
* @see AllowedNetworkTypesListener#onAllowedNetworkTypesChanged * @see AllowedNetworkTypesListener#onAllowedNetworkTypesChanged
*/ */
@@ -1287,30 +1284,34 @@ public class TelephonyCallback {
public interface AllowedNetworkTypesListener { public interface AllowedNetworkTypesListener {
/** /**
* Callback invoked when the current allowed network type list has changed on the * Callback invoked when the current allowed network type list has changed on the
* registered subscription. * registered subscription for a specified reason.
* Note, the registered subscription is associated with {@link TelephonyManager} object * Note, the registered subscription is associated with {@link TelephonyManager} object
* on which * on which {@link TelephonyManager#registerTelephonyCallback(Executor, TelephonyCallback)}
* {@link TelephonyManager#registerTelephonyCallback(Executor, TelephonyCallback)}
* was called. * was called.
* If this TelephonyManager object was created with * If this TelephonyManager object was created with
* {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the * {@link TelephonyManager#createForSubscriptionId(int)}, then the callback applies to the
* given subscription ID. Otherwise, this callback applies to * given subscription ID. Otherwise, this callback applies to
* {@link SubscriptionManager#getDefaultSubscriptionId()}. * {@link SubscriptionManager#getDefaultSubscriptionId()}.
* *
* @param allowedNetworkTypesList Map associating all allowed network type reasons * @param reason an allowed network type reasons.
* ({@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER}, * @see TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER
* {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_POWER}, * @see TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_POWER
* {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER}, and * @see TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER
* {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G}) with reason's allowed * @see TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G
* network type values. *
* @param allowedNetworkType an allowed network type bitmask value. (for example,
* the long bitmask value is {{@link TelephonyManager#NETWORK_TYPE_BITMASK_NR}|
* {@link TelephonyManager#NETWORK_TYPE_BITMASK_LTE}})
*
* For example: * For example:
* map{{TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER, long type value}, * If the latest allowed network type is changed by user, then the system
* {TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_POWER, long type value}, * notifies the {@link TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_USER} and
* {TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_CARRIER, long type value}, * long type value}.
* {TelephonyManager#ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G, long type value}}
*/ */
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
void onAllowedNetworkTypesChanged(@NonNull Map<Integer, Long> allowedNetworkTypesList); void onAllowedNetworkTypesChanged(
@TelephonyManager.AllowedNetworkTypesReason int reason,
@TelephonyManager.NetworkTypeBitMask long allowedNetworkType);
} }
/** /**
@@ -1741,14 +1742,15 @@ public class TelephonyCallback {
enabled, reason))); enabled, reason)));
} }
public void onAllowedNetworkTypesChanged(Map allowedNetworkTypesList) { public void onAllowedNetworkTypesChanged(int reason, long allowedNetworkType) {
AllowedNetworkTypesListener listener = AllowedNetworkTypesListener listener =
(AllowedNetworkTypesListener) mTelephonyCallbackWeakRef.get(); (AllowedNetworkTypesListener) mTelephonyCallbackWeakRef.get();
if (listener == null) return; if (listener == null) return;
Binder.withCleanCallingIdentity( Binder.withCleanCallingIdentity(
() -> mExecutor.execute( () -> mExecutor.execute(
() -> listener.onAllowedNetworkTypesChanged(allowedNetworkTypesList))); () -> listener.onAllowedNetworkTypesChanged(reason,
allowedNetworkType)));
} }
public void onLinkCapacityEstimateChanged( public void onLinkCapacityEstimateChanged(

View File

@@ -825,16 +825,18 @@ public class TelephonyRegistryManager {
} }
/** /**
* Notify emergency number list changed on certain subscription. * Notify the allowed network types has changed for a specific subscription and the specific
* * reason.
* @param slotIndex for which emergency number list changed. Can be derived from subId except * @param slotIndex for which allowed network types changed.
* when subId is invalid. * @param subId for which allowed network types changed.
* @param subId for which emergency number list changed. * @param reason an allowed network type reasons.
* @param allowedNetworkType an allowed network type bitmask value.
*/ */
public void notifyAllowedNetworkTypesChanged(int slotIndex, int subId, public void notifyAllowedNetworkTypesChanged(int slotIndex, int subId,
Map<Integer, Long> allowedNetworkTypeList) { int reason, long allowedNetworkType) {
try { try {
sRegistry.notifyAllowedNetworkTypesChanged(slotIndex, subId, allowedNetworkTypeList); sRegistry.notifyAllowedNetworkTypesChanged(slotIndex, subId, reason,
allowedNetworkType);
} catch (RemoteException ex) { } catch (RemoteException ex) {
// system process is dead // system process is dead
} }

View File

@@ -72,6 +72,6 @@ oneway interface IPhoneStateListener {
void onBarringInfoChanged(in BarringInfo barringInfo); void onBarringInfoChanged(in BarringInfo barringInfo);
void onPhysicalChannelConfigChanged(in List<PhysicalChannelConfig> configs); void onPhysicalChannelConfigChanged(in List<PhysicalChannelConfig> configs);
void onDataEnabledChanged(boolean enabled, int reason); void onDataEnabledChanged(boolean enabled, int reason);
void onAllowedNetworkTypesChanged(in Map allowedNetworkTypeList); void onAllowedNetworkTypesChanged(in int reason, in long allowedNetworkType);
void onLinkCapacityEstimateChanged(in List<LinkCapacityEstimate> linkCapacityEstimateList); void onLinkCapacityEstimateChanged(in List<LinkCapacityEstimate> linkCapacityEstimateList);
} }

View File

@@ -95,8 +95,7 @@ interface ITelephonyRegistry {
void notifyPhysicalChannelConfigForSubscriber(in int subId, void notifyPhysicalChannelConfigForSubscriber(in int subId,
in List<PhysicalChannelConfig> configs); in List<PhysicalChannelConfig> configs);
void notifyDataEnabled(in int phoneId, int subId, boolean enabled, int reason); void notifyDataEnabled(in int phoneId, int subId, boolean enabled, int reason);
void notifyAllowedNetworkTypesChanged(in int phoneId, in int subId, void notifyAllowedNetworkTypesChanged(in int phoneId, in int subId, in int reason, in long allowedNetworkType);
in Map allowedNetworkTypeList);
void notifyLinkCapacityEstimateChanged(in int phoneId, in int subId, void notifyLinkCapacityEstimateChanged(in int phoneId, in int subId,
in List<LinkCapacityEstimate> linkCapacityEstimateList); in List<LinkCapacityEstimate> linkCapacityEstimateList);
} }

View File

@@ -319,7 +319,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
private int[] mDataEnabledReason; private int[] mDataEnabledReason;
private Map<Integer, Long> mAllowedNetworkTypesList; private int[] mAllowedNetworkTypeReason;
private long[] mAllowedNetworkTypeValue;
private List<List<LinkCapacityEstimate>> mLinkCapacityEstimateLists; private List<List<LinkCapacityEstimate>> mLinkCapacityEstimateLists;
@@ -388,7 +389,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
private boolean isPrivilegedPhoneStatePermissionRequired(Set<Integer> events) { private boolean isPrivilegedPhoneStatePermissionRequired(Set<Integer> events) {
return events.contains(TelephonyCallback.EVENT_SRVCC_STATE_CHANGED) return events.contains(TelephonyCallback.EVENT_SRVCC_STATE_CHANGED)
|| events.contains(TelephonyCallback.EVENT_VOICE_ACTIVATION_STATE_CHANGED) || events.contains(TelephonyCallback.EVENT_VOICE_ACTIVATION_STATE_CHANGED)
|| events.contains(TelephonyCallback.EVENT_RADIO_POWER_STATE_CHANGED); || events.contains(TelephonyCallback.EVENT_RADIO_POWER_STATE_CHANGED)
|| events.contains(TelephonyCallback.EVENT_ALLOWED_NETWORK_TYPE_LIST_CHANGED);
} }
private static final int MSG_USER_SWITCHED = 1; private static final int MSG_USER_SWITCHED = 1;
@@ -532,6 +534,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
mTelephonyDisplayInfos = copyOf(mTelephonyDisplayInfos, mNumPhones); mTelephonyDisplayInfos = copyOf(mTelephonyDisplayInfos, mNumPhones);
mIsDataEnabled= copyOf(mIsDataEnabled, mNumPhones); mIsDataEnabled= copyOf(mIsDataEnabled, mNumPhones);
mDataEnabledReason = copyOf(mDataEnabledReason, mNumPhones); mDataEnabledReason = copyOf(mDataEnabledReason, mNumPhones);
mAllowedNetworkTypeReason = copyOf(mAllowedNetworkTypeReason, mNumPhones);
mAllowedNetworkTypeValue = copyOf(mAllowedNetworkTypeValue, mNumPhones);
// ds -> ss switch. // ds -> ss switch.
if (mNumPhones < oldNumPhones) { if (mNumPhones < oldNumPhones) {
@@ -577,6 +581,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig.Builder().build()); mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig.Builder().build());
mIsDataEnabled[i] = false; mIsDataEnabled[i] = false;
mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER; mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER;
mAllowedNetworkTypeReason[i] = -1;
mAllowedNetworkTypeValue[i] = -1;
mLinkCapacityEstimateLists.add(i, new ArrayList<>()); mLinkCapacityEstimateLists.add(i, new ArrayList<>());
} }
} }
@@ -637,10 +643,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
mBarringInfo = new ArrayList<>(); mBarringInfo = new ArrayList<>();
mTelephonyDisplayInfos = new TelephonyDisplayInfo[numPhones]; mTelephonyDisplayInfos = new TelephonyDisplayInfo[numPhones];
mPhysicalChannelConfigs = new ArrayList<>(); mPhysicalChannelConfigs = new ArrayList<>();
mAllowedNetworkTypeReason = new int[numPhones];
mAllowedNetworkTypeValue = new long[numPhones];
mIsDataEnabled = new boolean[numPhones]; mIsDataEnabled = new boolean[numPhones];
mDataEnabledReason = new int[numPhones]; mDataEnabledReason = new int[numPhones];
mAllowedNetworkTypesList = new HashMap<>();
mLinkCapacityEstimateLists = new ArrayList<>(); mLinkCapacityEstimateLists = new ArrayList<>();
for (int i = 0; i < numPhones; i++) { for (int i = 0; i < numPhones; i++) {
mCallState[i] = TelephonyManager.CALL_STATE_IDLE; mCallState[i] = TelephonyManager.CALL_STATE_IDLE;
mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE; mDataActivity[i] = TelephonyManager.DATA_ACTIVITY_NONE;
@@ -673,6 +681,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig.Builder().build()); mPhysicalChannelConfigs.add(i, new PhysicalChannelConfig.Builder().build());
mIsDataEnabled[i] = false; mIsDataEnabled[i] = false;
mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER; mDataEnabledReason[i] = TelephonyManager.DATA_ENABLED_REASON_USER;
mAllowedNetworkTypeReason[i] = -1;
mAllowedNetworkTypeValue[i] = -1;
mLinkCapacityEstimateLists.add(i, new ArrayList<>()); mLinkCapacityEstimateLists.add(i, new ArrayList<>());
} }
@@ -1174,14 +1184,6 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
remove(r.binder); remove(r.binder);
} }
} }
if (events.contains(
TelephonyCallback.EVENT_ALLOWED_NETWORK_TYPE_LIST_CHANGED)) {
try {
r.callback.onAllowedNetworkTypesChanged(mAllowedNetworkTypesList);
} catch (RemoteException ex) {
remove(r.binder);
}
}
if (events.contains( if (events.contains(
TelephonyCallback.EVENT_LINK_CAPACITY_ESTIMATE_CHANGED)) { TelephonyCallback.EVENT_LINK_CAPACITY_ESTIMATE_CHANGED)) {
try { try {
@@ -2443,18 +2445,19 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
* *
* @param phoneId the phone id. * @param phoneId the phone id.
* @param subId the subId. * @param subId the subId.
* @param allowedNetworkTypesList Map associating all allowed network type reasons with reason's * @param reason the allowed network type reason.
* allowed network type values. * @param allowedNetworkType the allowed network type value.
*/ */
public void notifyAllowedNetworkTypesChanged(int phoneId, int subId, public void notifyAllowedNetworkTypesChanged(int phoneId, int subId, int reason,
Map allowedNetworkTypesList) { long allowedNetworkType) {
if (!checkNotifyPermission("notifyAllowedNetworkTypesChanged()")) { if (!checkNotifyPermission("notifyAllowedNetworkTypesChanged()")) {
return; return;
} }
synchronized (mRecords) { synchronized (mRecords) {
if (validatePhoneId(phoneId)) { if (validatePhoneId(phoneId)) {
mAllowedNetworkTypesList = allowedNetworkTypesList; mAllowedNetworkTypeReason[phoneId] = reason;
mAllowedNetworkTypeValue[phoneId] = allowedNetworkType;
for (Record r : mRecords) { for (Record r : mRecords) {
if (r.matchTelephonyCallbackEvent( if (r.matchTelephonyCallbackEvent(
@@ -2462,10 +2465,12 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
&& idMatch(r.subId, subId, phoneId)) { && idMatch(r.subId, subId, phoneId)) {
try { try {
if (VDBG) { if (VDBG) {
log("notifyAllowedNetworkTypesChanged: AllowedNetworkTypesList= " log("notifyAllowedNetworkTypesChanged: reason= " + reason
+ mAllowedNetworkTypesList.toString()); + ", allowed network type:"
+ TelephonyManager.convertNetworkTypeBitmaskToString(
allowedNetworkType));
} }
r.callback.onAllowedNetworkTypesChanged(mAllowedNetworkTypesList); r.callback.onAllowedNetworkTypesChanged(reason, allowedNetworkType);
} catch (RemoteException ex) { } catch (RemoteException ex) {
mRemoveList.add(r.binder); mRemoveList.add(r.binder);
} }
@@ -2556,6 +2561,8 @@ public class TelephonyRegistry extends ITelephonyRegistry.Stub {
pw.println("mTelephonyDisplayInfo=" + mTelephonyDisplayInfos[i]); pw.println("mTelephonyDisplayInfo=" + mTelephonyDisplayInfos[i]);
pw.println("mIsDataEnabled=" + mIsDataEnabled); pw.println("mIsDataEnabled=" + mIsDataEnabled);
pw.println("mDataEnabledReason=" + mDataEnabledReason); pw.println("mDataEnabledReason=" + mDataEnabledReason);
pw.println("mAllowedNetworkTypeReason=" + mAllowedNetworkTypeReason[i]);
pw.println("mAllowedNetworkTypeValue=" + mAllowedNetworkTypeValue[i]);
pw.println("mLinkCapacityEstimateList=" + mLinkCapacityEstimateLists.get(i)); pw.println("mLinkCapacityEstimateList=" + mLinkCapacityEstimateLists.get(i));
pw.decreaseIndent(); pw.decreaseIndent();
} }

View File

@@ -129,6 +129,8 @@ import java.util.Objects;
import java.util.UUID; import java.util.UUID;
import java.util.concurrent.Executor; import java.util.concurrent.Executor;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
/** /**
* Provides access to information about the telephony services on * Provides access to information about the telephony services on
@@ -3116,6 +3118,10 @@ public class TelephonyManager {
return NETWORK_TYPE_BITMASK_LTE_CA; return NETWORK_TYPE_BITMASK_LTE_CA;
case NETWORK_TYPE_NR: case NETWORK_TYPE_NR:
return NETWORK_TYPE_BITMASK_NR; return NETWORK_TYPE_BITMASK_NR;
case NETWORK_TYPE_IWLAN:
return NETWORK_TYPE_BITMASK_IWLAN;
case NETWORK_TYPE_IDEN:
return (1 << (NETWORK_TYPE_IDEN - 1));
default: default:
return NETWORK_TYPE_BITMASK_UNKNOWN; return NETWORK_TYPE_BITMASK_UNKNOWN;
} }
@@ -8270,8 +8276,8 @@ public class TelephonyManager {
public static final int ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G = 3; public static final int ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G = 3;
/** /**
* Set the allowed network types of the device and * Set the allowed network types of the device and provide the reason triggering the allowed
* provide the reason triggering the allowed network change. * network change.
* This can be called for following reasons * This can be called for following reasons
* <ol> * <ol>
* <li>Allowed network types control by USER {@link #ALLOWED_NETWORK_TYPES_REASON_USER} * <li>Allowed network types control by USER {@link #ALLOWED_NETWORK_TYPES_REASON_USER}
@@ -8283,6 +8289,11 @@ public class TelephonyManager {
* </ol> * </ol>
* This API will result in allowing an intersection of allowed network types for all reasons, * This API will result in allowing an intersection of allowed network types for all reasons,
* including the configuration done through other reasons. * including the configuration done through other reasons.
*
* The functionality of this API with the parameter
* {@link #ALLOWED_NETWORK_TYPES_REASON_CARRIER} is the same as the API
* {@link TelephonyManager#setAllowedNetworkTypes}. Use this API instead of
* {@link TelephonyManager#setAllowedNetworkTypes}.
* <p> * <p>
* If {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported} * If {@link android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported}
* ({@link TelephonyManager#CAPABILITY_ALLOWED_NETWORK_TYPES_USED}) returns true, then * ({@link TelephonyManager#CAPABILITY_ALLOWED_NETWORK_TYPES_USED}) returns true, then
@@ -8326,21 +8337,17 @@ public class TelephonyManager {
* {@link #getAllowedNetworkTypesForReason} returns allowed network type for a * {@link #getAllowedNetworkTypesForReason} returns allowed network type for a
* specific reason. * specific reason.
* *
* <p>Requires Permission:
* {@link android.Manifest.permission#READ_PRIVILEGED_PHONE_STATE READ_PRIVILEGED_PHONE_STATE}
* or that the calling app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param reason the reason the allowed network type change is taking place * @param reason the reason the allowed network type change is taking place
* @return the allowed network type bitmask * @return the allowed network type bitmask
* @throws IllegalStateException if the Telephony process is not currently available. * @throws IllegalStateException if the Telephony process is not currently available.
* @throws IllegalArgumentException if invalid AllowedNetworkTypesReason is passed. * @throws IllegalArgumentException if invalid AllowedNetworkTypesReason is passed.
* @hide * @hide
*/ */
@SystemApi
@RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE)
@RequiresFeature( @RequiresFeature(
enforcement = "android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported", enforcement = "android.telephony.TelephonyManager#isRadioInterfaceCapabilitySupported",
value = TelephonyManager.CAPABILITY_ALLOWED_NETWORK_TYPES_USED) value = TelephonyManager.CAPABILITY_ALLOWED_NETWORK_TYPES_USED)
@SystemApi
public @NetworkTypeBitMask long getAllowedNetworkTypesForReason( public @NetworkTypeBitMask long getAllowedNetworkTypesForReason(
@AllowedNetworkTypesReason int reason) { @AllowedNetworkTypesReason int reason) {
if (!isValidAllowedNetworkTypesReason(reason)) { if (!isValidAllowedNetworkTypesReason(reason)) {
@@ -8384,6 +8391,25 @@ public class TelephonyManager {
return NETWORK_STANDARDS_FAMILY_BITMASK_3GPP | NETWORK_STANDARDS_FAMILY_BITMASK_3GPP2; return NETWORK_STANDARDS_FAMILY_BITMASK_3GPP | NETWORK_STANDARDS_FAMILY_BITMASK_3GPP2;
} }
/**
* Returns a string representation of the allowed network types{@link NetworkTypeBitMask}.
*
* @param networkTypeBitmask The bitmask of allowed network types.
* @return the name of the allowed network types
* @hide
*/
public static String convertNetworkTypeBitmaskToString(
@NetworkTypeBitMask long networkTypeBitmask) {
String networkTypeName = IntStream.rangeClosed(NETWORK_TYPE_GPRS, NETWORK_TYPE_NR)
.filter(x -> {
return (networkTypeBitmask & getBitMaskForNetworkType(x))
== getBitMaskForNetworkType(x);
})
.mapToObj(x -> getNetworkTypeName(x))
.collect(Collectors.joining("|"));
return TextUtils.isEmpty(networkTypeName) ? "UNKNOWN" : networkTypeName;
}
/** /**
* Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA. * Set the preferred network type to global mode which includes LTE, CDMA, EvDo and GSM/WCDMA.
* *
@@ -12091,6 +12117,7 @@ public class TelephonyManager {
NETWORK_TYPE_BITMASK_LTE, NETWORK_TYPE_BITMASK_LTE,
NETWORK_TYPE_BITMASK_LTE_CA, NETWORK_TYPE_BITMASK_LTE_CA,
NETWORK_TYPE_BITMASK_NR, NETWORK_TYPE_BITMASK_NR,
NETWORK_TYPE_BITMASK_IWLAN
}) })
public @interface NetworkTypeBitMask {} public @interface NetworkTypeBitMask {}