diff options
| author | 2024-08-28 11:35:52 -0700 | |
|---|---|---|
| committer | 2024-08-29 19:49:57 -0700 | |
| commit | 9966056a942ce31da39c10cc1982dec53db93246 (patch) | |
| tree | 0a282163e01e9f4ef42c1ce90f3c3b779c6ac904 | |
| parent | eea58e4b33eff2a92d5bd26f310c7ed2eb96c3ce (diff) | |
Add ALLOWED_NETWORK_TYPES_REASON_TEST
For testing only.
Bug: 342510763
Test: manual verified
Flag: TEST_ONLY
Change-Id: I7d1c61a337346979504c09ec47d4f81f98e19d7d
| -rw-r--r-- | telephony/java/android/telephony/TelephonyManager.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 7481daa8e396..bc709abbe76e 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -132,6 +132,7 @@ import com.android.internal.telephony.OperatorInfo; import com.android.internal.telephony.PhoneConstants; import com.android.internal.telephony.RILConstants; import com.android.internal.telephony.flags.Flags; +import com.android.internal.telephony.util.TelephonyUtils; import com.android.telephony.Rlog; import java.io.IOException; @@ -9975,6 +9976,7 @@ public class TelephonyManager { ALLOWED_NETWORK_TYPES_REASON_POWER, ALLOWED_NETWORK_TYPES_REASON_CARRIER, ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G, + ALLOWED_NETWORK_TYPES_REASON_TEST, }) @Retention(RetentionPolicy.SOURCE) public @interface AllowedNetworkTypesReason { @@ -10013,6 +10015,14 @@ public class TelephonyManager { public static final int ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G = 3; /** + * To indicate allowed network type change is requested by Testing purpose, should be default to + * {@link #getAllNetworkTypesBitmask} when done testing. + * + * @hide + */ + public static final int ALLOWED_NETWORK_TYPES_REASON_TEST = 4; + + /** * Set the allowed network types of the device and provide the reason triggering the allowed * network change. * <p>Requires permission: {@link android.Manifest.permission#MODIFY_PHONE_STATE} or @@ -10118,6 +10128,8 @@ public class TelephonyManager { case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER: case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G: return true; + case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_TEST: + return TelephonyUtils.IS_DEBUGGABLE; } return false; } |