Loading src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java +11 −3 Original line number Diff line number Diff line Loading @@ -915,7 +915,7 @@ public class SubscriptionInfoUpdater extends Handler { i.putExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON, reason); SubscriptionManager.putPhoneIdAndSubIdExtra(i, slotId); logd("Broadcasting intent ACTION_SIM_STATE_CHANGED " + state + " reason " + reason + " for mCardIndex: " + slotId); " for phone: " + slotId); IntentBroadcaster.getInstance().broadcastStickyIntent(i, slotId); } Loading @@ -927,8 +927,12 @@ public class SubscriptionInfoUpdater extends Handler { i.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); i.putExtra(TelephonyManager.EXTRA_SIM_STATE, state); SubscriptionManager.putPhoneIdAndSubIdExtra(i, phoneId); // TODO(b/130664115) we manually populate this intent with the slotId. In the future we // should do a review of whether to make this public int slotId = UiccController.getInstance().getSlotIdFromPhoneId(phoneId); i.putExtra(PhoneConstants.SLOT_KEY, slotId); logd("Broadcasting intent ACTION_SIM_CARD_STATE_CHANGED " + simStateString(state) + " for phone: " + phoneId); + " for phone: " + phoneId + " slot: " + slotId); mContext.sendBroadcast(i, Manifest.permission.READ_PRIVILEGED_PHONE_STATE); TelephonyMetrics.getInstance().updateSimState(phoneId, state); } Loading @@ -947,8 +951,12 @@ public class SubscriptionInfoUpdater extends Handler { i.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); i.putExtra(TelephonyManager.EXTRA_SIM_STATE, state); SubscriptionManager.putPhoneIdAndSubIdExtra(i, phoneId); // TODO(b/130664115) we populate this intent with the actual slotId. In the future we // should do a review of whether to make this public int slotId = UiccController.getInstance().getSlotIdFromPhoneId(phoneId); i.putExtra(PhoneConstants.SLOT_KEY, slotId); logd("Broadcasting intent ACTION_SIM_APPLICATION_STATE_CHANGED " + simStateString(state) + " for phone: " + phoneId); + " for phone: " + phoneId + " slot: " + slotId); mContext.sendBroadcast(i, Manifest.permission.READ_PRIVILEGED_PHONE_STATE); TelephonyMetrics.getInstance().updateSimState(phoneId, state); } Loading src/java/com/android/internal/telephony/uicc/UiccController.java +10 −2 Original line number Diff line number Diff line Loading @@ -253,8 +253,16 @@ public class UiccController extends Handler { return -1; } private int getSlotIdFromPhoneId(int phoneId) { /** * Return the physical slot id associated with the given phoneId, or INVALID_SLOT_ID. * @param phoneId the phoneId to check */ public int getSlotIdFromPhoneId(int phoneId) { try { return mPhoneIdToSlotId[phoneId]; } catch (ArrayIndexOutOfBoundsException e) { return INVALID_SLOT_ID; } } @UnsupportedAppUsage Loading Loading
src/java/com/android/internal/telephony/SubscriptionInfoUpdater.java +11 −3 Original line number Diff line number Diff line Loading @@ -915,7 +915,7 @@ public class SubscriptionInfoUpdater extends Handler { i.putExtra(IccCardConstants.INTENT_KEY_LOCKED_REASON, reason); SubscriptionManager.putPhoneIdAndSubIdExtra(i, slotId); logd("Broadcasting intent ACTION_SIM_STATE_CHANGED " + state + " reason " + reason + " for mCardIndex: " + slotId); " for phone: " + slotId); IntentBroadcaster.getInstance().broadcastStickyIntent(i, slotId); } Loading @@ -927,8 +927,12 @@ public class SubscriptionInfoUpdater extends Handler { i.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); i.putExtra(TelephonyManager.EXTRA_SIM_STATE, state); SubscriptionManager.putPhoneIdAndSubIdExtra(i, phoneId); // TODO(b/130664115) we manually populate this intent with the slotId. In the future we // should do a review of whether to make this public int slotId = UiccController.getInstance().getSlotIdFromPhoneId(phoneId); i.putExtra(PhoneConstants.SLOT_KEY, slotId); logd("Broadcasting intent ACTION_SIM_CARD_STATE_CHANGED " + simStateString(state) + " for phone: " + phoneId); + " for phone: " + phoneId + " slot: " + slotId); mContext.sendBroadcast(i, Manifest.permission.READ_PRIVILEGED_PHONE_STATE); TelephonyMetrics.getInstance().updateSimState(phoneId, state); } Loading @@ -947,8 +951,12 @@ public class SubscriptionInfoUpdater extends Handler { i.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); i.putExtra(TelephonyManager.EXTRA_SIM_STATE, state); SubscriptionManager.putPhoneIdAndSubIdExtra(i, phoneId); // TODO(b/130664115) we populate this intent with the actual slotId. In the future we // should do a review of whether to make this public int slotId = UiccController.getInstance().getSlotIdFromPhoneId(phoneId); i.putExtra(PhoneConstants.SLOT_KEY, slotId); logd("Broadcasting intent ACTION_SIM_APPLICATION_STATE_CHANGED " + simStateString(state) + " for phone: " + phoneId); + " for phone: " + phoneId + " slot: " + slotId); mContext.sendBroadcast(i, Manifest.permission.READ_PRIVILEGED_PHONE_STATE); TelephonyMetrics.getInstance().updateSimState(phoneId, state); } Loading
src/java/com/android/internal/telephony/uicc/UiccController.java +10 −2 Original line number Diff line number Diff line Loading @@ -253,8 +253,16 @@ public class UiccController extends Handler { return -1; } private int getSlotIdFromPhoneId(int phoneId) { /** * Return the physical slot id associated with the given phoneId, or INVALID_SLOT_ID. * @param phoneId the phoneId to check */ public int getSlotIdFromPhoneId(int phoneId) { try { return mPhoneIdToSlotId[phoneId]; } catch (ArrayIndexOutOfBoundsException e) { return INVALID_SLOT_ID; } } @UnsupportedAppUsage Loading