summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chen Xu <fionaxu@google.com> 2018-10-02 04:26:23 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2018-10-02 04:26:23 +0000
commit45db25d74238db3bfeb8b3d98ae294ba1b7ce16d (patch)
treed8e78ff13b1047ade8dc7893dd2680c5f5afd955
parent9166e8937443f891cb20d8821d17ce5af33793ea (diff)
parent379e5310b78c64bf2865a14cf9d9f27149606593 (diff)
Merge "using the correct intent extra for subId"
-rw-r--r--services/core/java/com/android/server/TelephonyRegistry.java2
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneConstants.java4
2 files changed, 6 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/TelephonyRegistry.java b/services/core/java/com/android/server/TelephonyRegistry.java
index 0955beda1df5..0f9fe83ba6a5 100644
--- a/services/core/java/com/android/server/TelephonyRegistry.java
+++ b/services/core/java/com/android/server/TelephonyRegistry.java
@@ -1644,6 +1644,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
intent.putExtras(data);
// Pass the subscription along with the intent.
intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
+ intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId);
intent.putExtra(PhoneConstants.SLOT_KEY, phoneId);
mContext.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
@@ -1698,6 +1699,7 @@ class TelephonyRegistry extends ITelephonyRegistry.Stub {
if (subId != SubscriptionManager.INVALID_SUBSCRIPTION_ID) {
intent.setAction(PhoneConstants.ACTION_SUBSCRIPTION_PHONE_STATE_CHANGED);
intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId);
+ intent.putExtra(SubscriptionManager.EXTRA_SUBSCRIPTION_INDEX, subId);
}
// If the phoneId is invalid, the broadcast is for overall call state.
if (phoneId != SubscriptionManager.INVALID_PHONE_INDEX) {
diff --git a/telephony/java/com/android/internal/telephony/PhoneConstants.java b/telephony/java/com/android/internal/telephony/PhoneConstants.java
index f9de776f9a7b..21f3b92c6c4f 100644
--- a/telephony/java/com/android/internal/telephony/PhoneConstants.java
+++ b/telephony/java/com/android/internal/telephony/PhoneConstants.java
@@ -176,6 +176,10 @@ public class PhoneConstants {
// FIXME: This is used to pass a subId via intents, we need to look at its usage, which is
// FIXME: extensive, and see if this should be an array of all active subId's or ...?
+ /**
+ * @Deprecated use {@link android.telephony.SubscriptionManager#EXTRA_SUBSCRIPTION_INDEX}
+ * instead.
+ */
public static final String SUBSCRIPTION_KEY = "subscription";
public static final String SUB_SETTING = "subSettings";