Merge "Better handling for hal version 1.1" am: 365e630c77 am: 38954e0330 am: b58815e545
am: b1bcb3ce50
Change-Id: I89587d5c19bc47b41870c69336507e0bf331eec3
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;
diff --git a/rild/rild.c b/rild/rild.c
index 96bd2ff..303aca9 100644
--- a/rild/rild.c
+++ b/rild/rild.c
@@ -35,8 +35,6 @@
#include <sys/types.h>
#include <libril/ril_ex.h>
-#include <private/android_filesystem_config.h>
-
#define LIB_PATH_PROPERTY "rild.libpath"
#define LIB_ARGS_PROPERTY "rild.libargs"
#define MAX_LIB_ARGS 16