这几天调试适配NFC部分热插NFC SIM激活SWP时。
发现,
总是无法成功,经过调试原来根本原因是SIM_STATE_CHANGED广播的Extra数据已经不再具有slotId, 拿不到。
接下来的流程跑步下去了。
发现QCOM 和MediaTek 基线都是如此。
异常log如下:
08-02 00:04:08.168 2463 2463 D NfcSimStateObserver: onReceive: android.intent.action.SIM_STATE_CHANGED
08-02 00:04:08.168 2463 2463 D NfcSimStateObserver: ACTION_SIM_STATE_CHANGED receiver with iccState = LOADED, simId = -1
08-02 00:04:08.168 2463 2463 D Nfc_SecureElementSelector: onSimStateChanged() - simId = -1 newPresenceState = 2 mUICC1State: Active mUICC2State: ? airplane: false
08-02 00:04:08.168 2463 2463 D Nfc_SecureElementSelector: onSimStateChanged() - simId not supported -1
08-02 00:04:08.507 2463 2463 D NfcSimStateObserver: onReceive: android.intent.action.SIM_STATE_CHANGED
08-02 00:04:08.507 2463 2463 D NfcSimStateObserver: ACTION_SIM_STATE_CHANGED receiver with iccState = LOADED, simId = -1
08-02 00:04:08.507 2463 2463 D Nfc_SecureElementSelector: onSimStateChanged() - simId = -1 newPresenceState = 2 mUICC1State: Active mUICC2State: ? airplane: false
08-02 00:04:08.507 2463 2463 D Nfc_SecureElementSelector: onSimStateChanged() - simId not supported -1
原来正常log如下:
08-09 06:49:57.206 4048 4048 D NfcSimStateObserver: onReceive: android.intent.action.SIM_STATE_CHANGED
08-09 06:49:57.206 4048 4048 D NfcSimStateObserver: ACTION_SIM_STATE_CHANGED receiver with iccState = LOADED, simId = 0
08-09 06:49:57.206 4048 4048 D Nfc_SecureElementSelector: onSimStateChanged() - simId =