summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sarah Chin <sarahchin@google.com> 2020-02-29 04:49:13 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2020-02-29 04:49:13 +0000
commitbe776fed5ea193ab44e375b42cd1d7f303f88f8b (patch)
tree6ff88c46b1c92a14fc0ba9ccb040c5253485d37b
parent823539be2066a20ef1f79517ae32c066c7859138 (diff)
parent1f39ebd9e66154d3c65dd56c2d2fb878fa008c4d (diff)
Merge "API review: setNetworkSelectionModeManual" into rvc-dev
-rw-r--r--api/current.txt1
-rwxr-xr-xapi/system-current.txt1
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java12
3 files changed, 6 insertions, 8 deletions
diff --git a/api/current.txt b/api/current.txt
index a60fcd57da56..13af1d47cf4e 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -48237,6 +48237,7 @@ package android.telephony {
method public boolean setLine1NumberForDisplay(String, String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setNetworkSelectionModeAutomatic();
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setNetworkSelectionModeManual(String, boolean);
+ method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setNetworkSelectionModeManual(@NonNull String, boolean, int);
method public boolean setOperatorBrandOverride(String);
method public boolean setPreferredNetworkTypeToGlobal();
method public void setPreferredOpportunisticDataSubscription(int, boolean, @Nullable java.util.concurrent.Executor, @Nullable java.util.function.Consumer<java.lang.Integer>);
diff --git a/api/system-current.txt b/api/system-current.txt
index 2c9343ffd827..37534a0582de 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -11777,7 +11777,6 @@ package android.telephony {
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setDataRoamingEnabled(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public int setIccLockEnabled(boolean, @NonNull String);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public void setMultiSimCarrierRestriction(boolean);
- method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setNetworkSelectionModeManual(@NonNull String, int, boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setOpportunisticNetworkState(boolean);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setPreferredNetworkTypeBitmask(long);
method @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public boolean setRadio(boolean);
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index da828ea6a957..51e777e4db4e 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -7949,21 +7949,19 @@ public class TelephonyManager {
* app has carrier privileges (see {@link #hasCarrierPrivileges}).
*
* @param operatorNumeric the PLMN ID of the network to select.
+ * @param persistSelection whether the selection will persist until reboot.
+ * If true, only allows attaching to the selected PLMN until reboot; otherwise,
+ * attach to the chosen PLMN and resume normal network selection next time.
* @param ran the initial suggested radio access network type.
* If registration fails, the RAN is not available after, the RAN is not within the
- * network types specified by {@link #setPreferredNetworkTypeBitmask}, or the value is
+ * network types specified by the preferred network types, or the value is
* {@link AccessNetworkConstants.AccessNetworkType#UNKNOWN}, modem will select
* the next best RAN for network registration.
- * @param persistSelection whether the selection will persist until reboot.
- * If true, only allows attaching to the selected PLMN until reboot; otherwise,
- * attach to the chosen PLMN and resume normal network selection next time.
* @return {@code true} on success; {@code false} on any failure.
- * @hide
*/
@RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE)
- @SystemApi
public boolean setNetworkSelectionModeManual(@NonNull String operatorNumeric,
- @AccessNetworkConstants.RadioAccessNetworkType int ran, boolean persistSelection) {
+ boolean persistSelection, @AccessNetworkConstants.RadioAccessNetworkType int ran) {
return setNetworkSelectionModeManual(new OperatorInfo("" /* operatorAlphaLong */,
"" /* operatorAlphaShort */, operatorNumeric, ran), persistSelection);
}