aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGjermund Hodnebrog <gjermund.hodnebrog@stericsson.com>2011-05-12 12:51:32 +0200
committerSverre Vegge <sverre.vegge@stericsson.com>2011-08-03 10:42:22 +0200
commitc9aec37643b77176368537cd3f56ba9571b897cc (patch)
treee3e6d42ee5edb14e9f913231aa94bcec5637375e
parentbcae74704a979c719925984e376801abf8b9a90b (diff)
downloadu300-c9aec37643b77176368537cd3f56ba9571b897cc.tar.gz
SIM: Update of ECC list handling
1. Update ECC list when SIM is ready (needed for PIN lock) 2. Update ECC list when going to home network (needed for seamless handover back to home country) 3. Treat MCC 441 as Japanese in addition to MCC 440 Signed-off-by: Sverre Vegge <sverre.vegge@stericsson.com>
-rw-r--r--u300-ril-network.c2
-rw-r--r--u300-ril-sim.c5
-rw-r--r--u300-ril.c10
3 files changed, 14 insertions, 3 deletions
diff --git a/u300-ril-network.c b/u300-ril-network.c
index 6e785a7..14c07e2 100644
--- a/u300-ril-network.c
+++ b/u300-ril-network.c
@@ -477,7 +477,7 @@ void onNetworkStateChanged(const char *s)
buf[sizeof(buf) - 1] = 0;
if (!at_tok_start(&tok) && !at_tok_nextint(&tok, &status))
- if (status == 5) /* Registred, roaming */
+ if (status == 1 || status == 5) /* Registred, home or roaming */
/* Check for Japan extensions and update ECC list */
enqueueRILEvent(CMD_QUEUE_AUXILIARY,
setupECCListAsyncAdapter, NULL, NULL);
diff --git a/u300-ril-sim.c b/u300-ril-sim.c
index 1e34efb..b0b94ba 100644
--- a/u300-ril-sim.c
+++ b/u300-ril-sim.c
@@ -2456,11 +2456,12 @@ void setupECCList(int check_attached_network)
/* Check for Japan expensions. */
if (check_attached_network && (0 == getAttachedNetworkIdentity(&mcc, NULL))
- && (mcc == 440)) {
+ && (mcc == 440 || mcc == 441)) {
LOGD("[ECC]: Using Japan extensions: detected by %s network.",
"attached");
use_japan_extensions = 1;
- } else if ((0 == getHomeNetworkIdentity(&mcc, NULL)) && (mcc == 440)) {
+ } else if ((0 == getHomeNetworkIdentity(&mcc, NULL)) && (mcc == 440 ||
+ mcc == 441)) {
LOGD("[ECC]: Using Japan extensions: detected by %s network.", "home");
use_japan_extensions = 1;
} else {
diff --git a/u300-ril.c b/u300-ril.c
index 7534be5..e14fbd2 100644
--- a/u300-ril.c
+++ b/u300-ril.c
@@ -1298,6 +1298,16 @@ void setRadioState(RIL_RadioState newState)
/* Do these outside of the mutex. */
if (s_state != oldState || s_state == RADIO_STATE_SIM_LOCKED_OR_ABSENT) {
+ /*
+ * Fetch emergency call code list from EF_ECC
+ * and store it into PROP_EMERGENCY_LIST_RW (ril.ecclist)
+ * property. This is done here in addition to in initializeDefault() to
+ * ensure RIL is able to access the SIM.
+ */
+ if (s_state == RADIO_STATE_SIM_READY) {
+ setupECCList(0);
+ }
+
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED,
NULL, 0);