From 26dd1a5f4f36346331418ab448cefc846098937f Mon Sep 17 00:00:00 2001 From: Jordan Liu Date: Thu, 2 May 2019 16:30:42 -0700 Subject: [PATCH] Update getMergedSubscriberIds to pass subId Bug: 131189269 Test: manual Change-Id: I0d237b646969442b71597e66c9cb491c02a144d3 --- .../java/android/telephony/TelephonyManager.java | 12 +++++++----- .../com/android/internal/telephony/ITelephony.aidl | 12 +++++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index aa9883d54a6af..328a0a7a9512f 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -3836,10 +3836,12 @@ public class TelephonyManager { } /** - * Return the set of subscriber IDs that should be considered as "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. + * 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. + *

+ * The returned set of subscriber IDs will include the subscriber ID corresponding to this + * TelephonyManager's subId. * * @hide */ @@ -3848,7 +3850,7 @@ public class TelephonyManager { try { ITelephony telephony = getITelephony(); if (telephony != null) - return telephony.getMergedSubscriberIds(getOpPackageName()); + return telephony.getMergedSubscriberIds(getSubId(), getOpPackageName()); } catch (RemoteException ex) { } catch (NullPointerException ex) { } diff --git a/telephony/java/com/android/internal/telephony/ITelephony.aidl b/telephony/java/com/android/internal/telephony/ITelephony.aidl index f226bb1fa5887..3991fea66a855 100644 --- a/telephony/java/com/android/internal/telephony/ITelephony.aidl +++ b/telephony/java/com/android/internal/telephony/ITelephony.aidl @@ -1051,7 +1051,17 @@ interface ITelephony { */ 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. + *

+ * 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.