Merge "Clean up SubMgr#getOpportunisticSubscriptions."
am: 103d515c80
Change-Id: I5dc75bd9b1a8e64df547f621e6792e4816167be7
This commit is contained in:
@@ -42842,7 +42842,7 @@ package android.telephony {
|
||||
method public static int getDefaultSmsSubscriptionId();
|
||||
method public static int getDefaultSubscriptionId();
|
||||
method public static int getDefaultVoiceSubscriptionId();
|
||||
method public java.util.List<android.telephony.SubscriptionInfo> getOpportunisticSubscriptions(int);
|
||||
method public java.util.List<android.telephony.SubscriptionInfo> getOpportunisticSubscriptions();
|
||||
method public static int getSlotIndex(int);
|
||||
method public static int[] getSubscriptionIds(int);
|
||||
method public java.util.List<android.telephony.SubscriptionPlan> getSubscriptionPlans(int);
|
||||
|
||||
@@ -2313,22 +2313,27 @@ public class SubscriptionManager {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get opportunistic data Profiles.
|
||||
* Return opportunistic subscriptions that can be visible to the caller.
|
||||
* Opportunistic subscriptions are for opportunistic networks, which are cellular
|
||||
* networks with limited capabilities and coverage, for example, CBRS.
|
||||
*
|
||||
* Provide all available user downloaded profiles on phone which are used only for
|
||||
* opportunistic data.
|
||||
* @param slotIndex slot on which the profiles are queried from.
|
||||
* @return the list of opportunistic subscription info. If none exists, an empty list.
|
||||
* <p>Requires Permission:
|
||||
* {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
|
||||
* or that the calling app has carrier privileges (see
|
||||
* {@link TelephonyManager#hasCarrierPrivileges}).
|
||||
*
|
||||
* @return the list of opportunistic subscription info. If none exists, an empty list.
|
||||
*/
|
||||
@SuppressAutoDoc // Blocked by b/72967236 - no support for carrier privileges
|
||||
@RequiresPermission(android.Manifest.permission.READ_PHONE_STATE)
|
||||
public @NonNull List<SubscriptionInfo> getOpportunisticSubscriptions(int slotIndex) {
|
||||
public @NonNull List<SubscriptionInfo> getOpportunisticSubscriptions() {
|
||||
String pkgForDebug = mContext != null ? mContext.getOpPackageName() : "<unknown>";
|
||||
List<SubscriptionInfo> subInfoList = null;
|
||||
|
||||
try {
|
||||
ISub iSub = ISub.Stub.asInterface(ServiceManager.getService("isub"));
|
||||
if (iSub != null) {
|
||||
subInfoList = iSub.getOpportunisticSubscriptions(slotIndex, pkgForDebug);
|
||||
subInfoList = iSub.getOpportunisticSubscriptions(pkgForDebug);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
// ignore it
|
||||
|
||||
@@ -196,10 +196,10 @@ interface ISub {
|
||||
/**
|
||||
* Get User downloaded Profiles.
|
||||
*
|
||||
* Provide all available user downloaded profile on the phone.
|
||||
* @param slotId on which phone the switch will operate on
|
||||
* Return opportunistic subscriptions that can be visible to the caller.
|
||||
* @return the list of opportunistic subscription info. If none exists, an empty list.
|
||||
*/
|
||||
List<SubscriptionInfo> getOpportunisticSubscriptions(int slotId, String callingPackage);
|
||||
List<SubscriptionInfo> getOpportunisticSubscriptions(String callingPackage);
|
||||
|
||||
int getSlotIndex(int subId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user