From a6a485807996b55c1b68a9c937d818d23b160166 Mon Sep 17 00:00:00 2001 From: Jayachandran C Date: Wed, 5 Feb 2020 15:37:05 -0800 Subject: [PATCH] Make DEFAULT_PREFERRED_NETWORK_MODE @hide for now This API also needs to expose the possible values which would need more work hence we will drop this for now and re-work for next release This CL also fixes a bug to use correct RIL constant Bug: 148514283 Bug: 148484234 Test: Verified that the eSIM works on DSDS atest packages/services/Telephony/tests/ atest frameworks/opt/telephony/tests/telephonytests/ Change-Id: Ifd7b17cc2445c9cbe4c6ba688838a1b07eb13599 Merged-In: Ifd7b17cc2445c9cbe4c6ba688838a1b07eb13599 --- api/system-current.txt | 1 - telephony/java/android/telephony/TelephonyManager.java | 3 +-- .../java/com/android/internal/telephony/RILConstants.java | 5 +---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/api/system-current.txt b/api/system-current.txt index 44fc4c238e81b..b187a783882ef 100755 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -9209,7 +9209,6 @@ package android.telephony { field public static final int CARRIER_PRIVILEGE_STATUS_HAS_ACCESS = 1; // 0x1 field public static final int CARRIER_PRIVILEGE_STATUS_NO_ACCESS = 0; // 0x0 field public static final int CARRIER_PRIVILEGE_STATUS_RULES_NOT_LOADED = -1; // 0xffffffff - field public static final int DEFAULT_PREFERRED_NETWORK_MODE = 0; // 0x0 field public static final String EXTRA_ANOMALY_DESCRIPTION = "android.telephony.extra.ANOMALY_DESCRIPTION"; field public static final String EXTRA_ANOMALY_ID = "android.telephony.extra.ANOMALY_ID"; field @Deprecated public static final String EXTRA_APN_PROTOCOL = "apnProto"; diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 0e08daf70c1d1..da161426a4a92 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -7640,9 +7640,8 @@ public class TelephonyManager { * * @hide */ - @SystemApi public static final int DEFAULT_PREFERRED_NETWORK_MODE = - RILConstants.DEFAULT_PREFERRED_NETWORK_MODE; + RILConstants.PREFERRED_NETWORK_MODE; /** * Get the preferred network type. diff --git a/telephony/java/com/android/internal/telephony/RILConstants.java b/telephony/java/com/android/internal/telephony/RILConstants.java index 9a69022696f36..d524299d7ede0 100644 --- a/telephony/java/com/android/internal/telephony/RILConstants.java +++ b/telephony/java/com/android/internal/telephony/RILConstants.java @@ -233,14 +233,11 @@ public interface RILConstants { /** NR 5G, LTE, TD-SCDMA, CDMA, EVDO, GSM and WCDMA */ int NETWORK_MODE_NR_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = 33; - /** Default preferred network mode */ - int DEFAULT_PREFERRED_NETWORK_MODE = NETWORK_MODE_WCDMA_PREF; - @UnsupportedAppUsage int PREFERRED_NETWORK_MODE = Optional.of(TelephonyProperties.default_network()) .filter(list -> !list.isEmpty()) .map(list -> list.get(0)) - .orElse(DEFAULT_PREFERRED_NETWORK_MODE); + .orElse(NETWORK_MODE_WCDMA_PREF); int BAND_MODE_UNSPECIFIED = 0; //"unspecified" (selected by baseband automatically) int BAND_MODE_EURO = 1; //"EURO band" (GSM-900 / DCS-1800 / WCDMA-IMT-2000)