Skip to content

Commit

Permalink
Merge "Expose SubscriptionManager.getActiveDataSubscriptionId() as pu…
Browse files Browse the repository at this point in the history
…blic API"
  • Loading branch information
Jayachandran Chinnakkannu authored and Gerrit Code Review committed Nov 14, 2019
2 parents 2f7b351 + 9ecb50e commit 80496e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions api/current.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44947,6 +44947,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();
Expand Down
11 changes: 6 additions & 5 deletions telephony/java/android/telephony/SubscriptionManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -3228,13 +3228,14 @@ private int setSubscriptionPropertyHelper(int subId, String methodName,
}

/**
* 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 {
Expand Down

0 comments on commit 80496e9

Please sign in to comment.