From 656f6f8b664e1dc7ca659fe60565f28979ec3e65 Mon Sep 17 00:00:00 2001 From: Jordan Liu Date: Mon, 22 Apr 2019 13:58:02 -0700 Subject: [PATCH] Do not populate SLOT_KEY with wrong slot info The slotId is not necessarily the phoneId, so do not broadcast as if it is. SLOT_KEY is a hidden extra so this should not impact apps in general (if they need the old extra they can still use the hidden PHONE_KEY). For select broadcasts like SIM_CARD_STATE_CHANGED, we will manually populate the slot key. This is a temporary solution to b/130664115 and we should eventually review and consider making the SLOT_KEY public for some broadcasts. Bug: 130664115 Test: manual Change-Id: I84bd4c6bc4277e32cee9916dd18dd80948a808a0 (cherry picked from commit 21c3aeb49de064b011a452143f99b623acb94786) --- telephony/java/android/telephony/SubscriptionManager.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index d4f98743089ec..32105ad52753c 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -2064,7 +2064,6 @@ public class SubscriptionManager { } else { logd("putPhoneIdAndSubIdExtra: no valid subs"); intent.putExtra(PhoneConstants.PHONE_KEY, phoneId); - intent.putExtra(PhoneConstants.SLOT_KEY, phoneId); } } @@ -2075,9 +2074,6 @@ public class SubscriptionManager { intent.putExtra(PhoneConstants.SUBSCRIPTION_KEY, subId); intent.putExtra(EXTRA_SUBSCRIPTION_INDEX, subId); intent.putExtra(PhoneConstants.PHONE_KEY, phoneId); - //FIXME this is using phoneId and slotIndex interchangeably - //Eventually, this should be removed as it is not the slot id - intent.putExtra(PhoneConstants.SLOT_KEY, phoneId); } /**