Skip to content

Commit

Permalink
Expose SubscriptionManager.getActiveDataSubscriptionId() as public API
Browse files Browse the repository at this point in the history
Bug: 134702460
Bug: 111498835
Test: make
Change-Id: I7875438876af890cdbe8943458a45b816c6f2887
  • Loading branch information
Jayachandran C committed Nov 8, 2019
1 parent 303c5dc commit 9ecb50e
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 @@ -44894,6 +44894,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 @@ -3202,13 +3202,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 9ecb50e

Please sign in to comment.