From fe577d3c4d8053607d3c70e8b403e0b37d005801 Mon Sep 17 00:00:00 2001 From: Malcolm Chen Date: Mon, 18 Mar 2019 17:26:43 -0700 Subject: [PATCH] Better description and parameter name of setPreferredDataSubscriptionId Bug: 128455935 128456058 Test: build Change-Id: I41ae6752756d998739fd7635bcc7765f255806d7 Merged-In: I41ae6752756d998739fd7635bcc7765f255806d7 --- api/current.txt | 2 +- telephony/java/android/telephony/SubscriptionManager.java | 4 +++- telephony/java/android/telephony/TelephonyManager.java | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/api/current.txt b/api/current.txt index c4d65eead7ce3..9004773fa4f25 100755 --- a/api/current.txt +++ b/api/current.txt @@ -43247,7 +43247,7 @@ package android.telephony { field public static final int PHONE_TYPE_GSM = 1; // 0x1 field public static final int PHONE_TYPE_NONE = 0; // 0x0 field public static final int PHONE_TYPE_SIP = 3; // 0x3 - field public static final int SET_OPPORTUNISTIC_SUB_INVALID_PARAMETER = 2; // 0x2 + field public static final int SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION = 2; // 0x2 field public static final int SET_OPPORTUNISTIC_SUB_SUCCESS = 0; // 0x0 field public static final int SET_OPPORTUNISTIC_SUB_VALIDATION_FAILED = 1; // 0x1 field public static final int SIM_STATE_ABSENT = 1; // 0x1 diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index f24bade312045..9982b9bb7068b 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -2596,7 +2596,9 @@ public class SubscriptionManager { * {@link SubscriptionManager#DEFAULT_SUBSCRIPTION_ID}, it means * it's unset and {@link SubscriptionManager#getDefaultDataSubscriptionId()} * is used to determine which modem is preferred. - * @param needValidation whether validation is needed before switch happens. + * @param needValidation whether Telephony will wait until the network is validated by + * connectivity service before switching data to it. More details see + * {@link NetworkCapabilities#NET_CAPABILITY_VALIDATED}. * @param executor The executor of where the callback will execute. * @param callback Callback will be triggered once it succeeds or failed. * See {@link TelephonyManager.SetOpportunisticSubscriptionResult} diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index 5e0a7a69854ed..159667584b00d 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -10329,7 +10329,7 @@ public class TelephonyManager { @IntDef(prefix = {"SET_OPPORTUNISTIC_SUB"}, value = { SET_OPPORTUNISTIC_SUB_SUCCESS, SET_OPPORTUNISTIC_SUB_VALIDATION_FAILED, - SET_OPPORTUNISTIC_SUB_INVALID_PARAMETER}) + SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION}) public @interface SetOpportunisticSubscriptionResult {} /** @@ -10343,9 +10343,9 @@ public class TelephonyManager { public static final int SET_OPPORTUNISTIC_SUB_VALIDATION_FAILED = 1; /** - * The parameter passed in is invalid. + * The subscription is not valid. It must be an active opportunistic subscription. */ - public static final int SET_OPPORTUNISTIC_SUB_INVALID_PARAMETER = 2; + public static final int SET_OPPORTUNISTIC_SUB_INACTIVE_SUBSCRIPTION = 2; /** @hide */ @Retention(RetentionPolicy.SOURCE)