Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a15c24b2 authored by Arun Voddu's avatar Arun Voddu Committed by Gerrit Code Review
Browse files

Merge "NPE fix when reading the port index from uiccslot in logger" into main

parents f2cdabbb 187ab7df
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -833,12 +833,14 @@ public class UiccController extends Handler {
            UiccSlot slot = UiccController.getInstance().getUiccSlotForPhone(phoneId);
            int slotId = UiccController.getInstance().getSlotIdFromPhoneId(phoneId);
            intent.putExtra(PhoneConstants.SLOT_KEY, slotId);
            int portIndex = -1;
            if (slot != null) {
                intent.putExtra(PhoneConstants.PORT_KEY, slot.getPortIndexFromPhoneId(phoneId));
                portIndex = slot.getPortIndexFromPhoneId(phoneId);
                intent.putExtra(PhoneConstants.PORT_KEY, portIndex);
            }
            Rlog.d(LOG_TAG, "Broadcasting intent ACTION_SIM_CARD_STATE_CHANGED "
                    + TelephonyManager.simStateToString(state) + " for phone: " + phoneId
                    + " slot: " + slotId + " port: " + slot.getPortIndexFromPhoneId(phoneId));
                    + " slot: " + slotId + " port: " + portIndex);
            mContext.sendBroadcast(intent, Manifest.permission.READ_PRIVILEGED_PHONE_STATE);
            TelephonyMetrics.getInstance().updateSimState(phoneId, state);
        }