Merge "Update getMergedSubscriberIds to pass subId"

This commit is contained in:
Jordan Liu
2019-05-13 18:16:18 +00:00
committed by Gerrit Code Review
2 changed files with 18 additions and 6 deletions

View File

@@ -3783,10 +3783,12 @@ public class TelephonyManager {
} }
/** /**
* Return the set of subscriber IDs that should be considered as "merged * Return the set of subscriber IDs that should be considered "merged together" for data usage
* together" for data usage purposes. This is commonly {@code null} to * purposes. This is commonly {@code null} to indicate no merging is required. Any returned
* indicate no merging is required. Any returned subscribers are sorted in a * subscribers are sorted in a deterministic order.
* deterministic order. * <p>
* The returned set of subscriber IDs will include the subscriber ID corresponding to this
* TelephonyManager's subId.
* *
* @hide * @hide
*/ */
@@ -3795,7 +3797,7 @@ public class TelephonyManager {
try { try {
ITelephony telephony = getITelephony(); ITelephony telephony = getITelephony();
if (telephony != null) if (telephony != null)
return telephony.getMergedSubscriberIds(getOpPackageName()); return telephony.getMergedSubscriberIds(getSubId(), getOpPackageName());
} catch (RemoteException ex) { } catch (RemoteException ex) {
} catch (NullPointerException ex) { } catch (NullPointerException ex) {
} }

View File

@@ -1051,7 +1051,17 @@ interface ITelephony {
*/ */
String getLine1AlphaTagForDisplay(int subId, String callingPackage); String getLine1AlphaTagForDisplay(int subId, String callingPackage);
String[] getMergedSubscriberIds(String callingPackage); /**
* Return the set of subscriber IDs that should be considered "merged together" for data usage
* purposes. This is commonly {@code null} to indicate no merging is required. Any returned
* subscribers are sorted in a deterministic order.
* <p>
* The returned set of subscriber IDs will include the subscriber ID corresponding to this
* TelephonyManager's subId.
*
* @hide
*/
String[] getMergedSubscriberIds(int subId, String callingPackage);
/** /**
* Override the operator branding for the current ICCID. * Override the operator branding for the current ICCID.