summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api/current.txt1
-rw-r--r--telephony/java/android/telephony/SubscriptionManager.java11
2 files changed, 7 insertions, 5 deletions
diff --git a/api/current.txt b/api/current.txt
index 8a235b19046b..1333e4a6c475 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -45231,6 +45231,7 @@ package android.telephony {
method @NonNull @RequiresPermission(android.Manifest.permission.MODIFY_PHONE_STATE) public android.os.ParcelUuid createSubscriptionGroup(@NonNull java.util.List<java.lang.Integer>);
method @Deprecated public static android.telephony.SubscriptionManager from(android.content.Context);
method public java.util.List<android.telephony.SubscriptionInfo> getAccessibleSubscriptionInfoList();
+ method public static int getActiveDataSubscriptionId();
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public android.telephony.SubscriptionInfo getActiveSubscriptionInfo(int);
method @RequiresPermission(android.Manifest.permission.READ_PHONE_STATE) public int getActiveSubscriptionInfoCount();
method public int getActiveSubscriptionInfoCountMax();
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java
index dfcfed715523..1770671b2380 100644
--- a/telephony/java/android/telephony/SubscriptionManager.java
+++ b/telephony/java/android/telephony/SubscriptionManager.java
@@ -3182,13 +3182,14 @@ public class SubscriptionManager {
}
/**
- * Get active data subscription id.
- * See {@link PhoneStateListener#onActiveDataSubscriptionIdChanged(int)} for the details.
+ * Get active data subscription id. Active data subscription refers to the subscription
+ * currently chosen to provide cellular internet connection to the user. This may be
+ * different from getDefaultDataSubscriptionId(). Eg. Opportunistics data
*
- * @return Active data subscription id
+ * See {@link PhoneStateListener#onActiveDataSubscriptionIdChanged(int)} for the details.
*
- * //TODO: Refactor this API in b/134702460
- * @hide
+ * @return Active data subscription id if any is chosen, or
+ * SubscriptionManager.INVALID_SUBSCRIPTION_ID if not.
*/
public static int getActiveDataSubscriptionId() {
try {