Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 500d89c6 authored by Ling Ma's avatar Ling Ma Committed by Android Build Coastguard Worker
Browse files

Add ALLOWED_NETWORK_TYPES_REASON_TEST

For testing only.

Bug: 342510763
Test: manual verified
Flag: TEST_ONLY
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9966056a942ce31da39c10cc1982dec53db93246)
Merged-In: I7d1c61a337346979504c09ec47d4f81f98e19d7d
Change-Id: I7d1c61a337346979504c09ec47d4f81f98e19d7d
parent 96150ed2
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -132,6 +132,7 @@ import com.android.internal.telephony.OperatorInfo;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.flags.Flags;
import com.android.internal.telephony.flags.Flags;
import com.android.internal.telephony.util.TelephonyUtils;
import com.android.telephony.Rlog;
import com.android.telephony.Rlog;
import java.io.IOException;
import java.io.IOException;
@@ -9975,6 +9976,7 @@ public class TelephonyManager {
            ALLOWED_NETWORK_TYPES_REASON_POWER,
            ALLOWED_NETWORK_TYPES_REASON_POWER,
            ALLOWED_NETWORK_TYPES_REASON_CARRIER,
            ALLOWED_NETWORK_TYPES_REASON_CARRIER,
            ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G,
            ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G,
            ALLOWED_NETWORK_TYPES_REASON_TEST,
    })
    })
    @Retention(RetentionPolicy.SOURCE)
    @Retention(RetentionPolicy.SOURCE)
    public @interface AllowedNetworkTypesReason {
    public @interface AllowedNetworkTypesReason {
@@ -10012,6 +10014,14 @@ public class TelephonyManager {
    @SystemApi
    @SystemApi
    public static final int ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G = 3;
    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
     * Set the allowed network types of the device and provide the reason triggering the allowed
     * network change.
     * network change.
@@ -10118,6 +10128,8 @@ public class TelephonyManager {
            case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER:
            case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_CARRIER:
            case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G:
            case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_ENABLE_2G:
                return true;
                return true;
            case TelephonyManager.ALLOWED_NETWORK_TYPES_REASON_TEST:
                return TelephonyUtils.IS_DEBUGGABLE;
        }
        }
        return false;
        return false;
    }
    }