Merge "Fix VTS test case HidlHalGTest#RadioHidlTest.getIccCardStatus_32bit failed." am: 78b80ee72d am: c7d49fa255 am: 417202e99c
am: 3a533d8882
Change-Id: Ic634e1a7f183f26c27e2a4c926ec2aa8bb205a6a
diff --git a/libril/ril_service.cpp b/libril/ril_service.cpp
index bd21ba5..3fd8fcf 100644
--- a/libril/ril_service.cpp
+++ b/libril/ril_service.cpp
@@ -2864,7 +2864,8 @@
imsiEncryption.carrierKey = new uint8_t[lSize];
memcpy(imsiEncryption.carrierKey, data.carrierKey.data(), lSize);
imsiEncryption.expirationTime = data.expirationTime;
- s_vendorFunctions->onRequest(pRI->pCI->requestNumber, &imsiEncryption, sizeof(RIL_CarrierInfoForImsiEncryption), pRI);
+ CALL_ONREQUEST(pRI->pCI->requestNumber, &imsiEncryption,
+ sizeof(RIL_CarrierInfoForImsiEncryption), pRI, mSlotId);
delete(imsiEncryption.carrierKey);
return Void();
}
diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c
index 1f448f2..ed399b7 100644
--- a/reference-ril/reference-ril.c
+++ b/reference-ril/reference-ril.c
@@ -165,7 +165,13 @@
RUIM_READY = 8,
RUIM_PIN = 9,
RUIM_PUK = 10,
- RUIM_NETWORK_PERSONALIZATION = 11
+ RUIM_NETWORK_PERSONALIZATION = 11,
+ ISIM_ABSENT = 12,
+ ISIM_NOT_READY = 13,
+ ISIM_READY = 14,
+ ISIM_PIN = 15,
+ ISIM_PUK = 16,
+ ISIM_NETWORK_PERSONALIZATION = 17,
} SIM_Status;
static void onRequest (int request, void *data, size_t datalen, RIL_Token t);
@@ -2822,7 +2828,26 @@
NULL, NULL, 0, RIL_PINSTATE_ENABLED_BLOCKED, RIL_PINSTATE_UNKNOWN },
// RUIM_NETWORK_PERSONALIZATION = 11
{ RIL_APPTYPE_RUIM, RIL_APPSTATE_SUBSCRIPTION_PERSO, RIL_PERSOSUBSTATE_SIM_NETWORK,
- NULL, NULL, 0, RIL_PINSTATE_ENABLED_NOT_VERIFIED, RIL_PINSTATE_UNKNOWN }
+ NULL, NULL, 0, RIL_PINSTATE_ENABLED_NOT_VERIFIED, RIL_PINSTATE_UNKNOWN },
+ // ISIM_ABSENT = 12
+ { RIL_APPTYPE_UNKNOWN, RIL_APPSTATE_UNKNOWN, RIL_PERSOSUBSTATE_UNKNOWN,
+ NULL, NULL, 0, RIL_PINSTATE_UNKNOWN, RIL_PINSTATE_UNKNOWN },
+ // ISIM_NOT_READY = 13
+ { RIL_APPTYPE_ISIM, RIL_APPSTATE_DETECTED, RIL_PERSOSUBSTATE_UNKNOWN,
+ NULL, NULL, 0, RIL_PINSTATE_UNKNOWN, RIL_PINSTATE_UNKNOWN },
+ // ISIM_READY = 14
+ { RIL_APPTYPE_ISIM, RIL_APPSTATE_READY, RIL_PERSOSUBSTATE_READY,
+ NULL, NULL, 0, RIL_PINSTATE_UNKNOWN, RIL_PINSTATE_UNKNOWN },
+ // ISIM_PIN = 15
+ { RIL_APPTYPE_ISIM, RIL_APPSTATE_PIN, RIL_PERSOSUBSTATE_UNKNOWN,
+ NULL, NULL, 0, RIL_PINSTATE_ENABLED_NOT_VERIFIED, RIL_PINSTATE_UNKNOWN },
+ // ISIM_PUK = 16
+ { RIL_APPTYPE_ISIM, RIL_APPSTATE_PUK, RIL_PERSOSUBSTATE_UNKNOWN,
+ NULL, NULL, 0, RIL_PINSTATE_ENABLED_BLOCKED, RIL_PINSTATE_UNKNOWN },
+ // ISIM_NETWORK_PERSONALIZATION = 17
+ { RIL_APPTYPE_ISIM, RIL_APPSTATE_SUBSCRIPTION_PERSO, RIL_PERSOSUBSTATE_SIM_NETWORK,
+ NULL, NULL, 0, RIL_PINSTATE_ENABLED_NOT_VERIFIED, RIL_PINSTATE_UNKNOWN },
+
};
RIL_CardState card_state;
int num_apps;
@@ -2833,7 +2858,7 @@
num_apps = 0;
} else {
card_state = RIL_CARDSTATE_PRESENT;
- num_apps = 2;
+ num_apps = 3;
}
// Allocate and initialize base card status.
@@ -2854,14 +2879,15 @@
// Pickup the appropriate application status
// that reflects sim_status for gsm.
if (num_apps != 0) {
- // Only support one app, gsm
- p_card_status->num_applications = 2;
+ p_card_status->num_applications = 3;
p_card_status->gsm_umts_subscription_app_index = 0;
p_card_status->cdma_subscription_app_index = 1;
+ p_card_status->ims_subscription_app_index = 2;
// Get the correct app status
p_card_status->applications[0] = app_status_array[sim_status];
p_card_status->applications[1] = app_status_array[sim_status + RUIM_ABSENT];
+ p_card_status->applications[2] = app_status_array[sim_status + ISIM_ABSENT];
}
*pp_card_status = p_card_status;