aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGjermund Hodnebrog <gjermund.hodnebrog@stericsson.com>2011-04-14 13:40:22 +0200
committerSverre Vegge <sverre.vegge@stericsson.com>2011-05-19 09:03:41 +0200
commit60a1ed44f39659c5f75facdffb7bb722039258cb (patch)
treeed9d5f97d688b71b63d58528539d9a0212e9d961
parent8a43a7384038ae1ac6d0b5bd83553af566dc45ed (diff)
downloadu300-60a1ed44f39659c5f75facdffb7bb722039258cb.tar.gz
INIT: Added support for early subscription for NITZ time
USE_EARLY_NITZ_TIME_SUBSCRIPTION must be set to enable this change. Signed-off-by: Sverre Vegge <sverre.vegge@stericsson.com>
-rwxr-xr-xAndroid.mk4
-rw-r--r--u300-ril.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 460f3ae..d32fd79 100755
--- a/Android.mk
+++ b/Android.mk
@@ -81,6 +81,10 @@ else
LOCAL_SRC_FILES += u300-ril-netif.c
endif
+ifneq ($(USE_EARLY_NITZ_TIME_SUBSCRIPTION),)
+LOCAL_CFLAGS += -DUSE_EARLY_NITZ_TIME_SUBSCRIPTION
+endif
+
ifneq ($(USE_LEGACY_SAT_AT_CMDS),)
LOCAL_CFLAGS += -DUSE_LEGACY_SAT_AT_CMDS
endif
diff --git a/u300-ril.c b/u300-ril.c
index a4d0c4b..6f8ee32 100644
--- a/u300-ril.c
+++ b/u300-ril.c
@@ -412,9 +412,11 @@ static void onSIMReady()
if (at_send_command("AT+CMGF=0", NULL) < 0)
LOGW("%s(): Failed to send AT+CMGF", __func__);
+#ifndef USE_EARLY_NITZ_TIME_SUBSCRIPTION
/* Subscribe to ST-Ericsson time zone/NITZ reporting */
if (at_send_command("AT*ETZR=3", NULL) < 0)
LOGW("%s(): Failed to send AT+ETZR", __func__);
+#endif
/*
* Configure Mobile Equipment Event Reporting.
@@ -1285,6 +1287,12 @@ static bool initializeDefault()
if (at_send_command("AT*EBSR=1", NULL) < 0)
LOGW("%s(): Failed to enable barred status reporting", __func__);
+#ifdef USE_EARLY_NITZ_TIME_SUBSCRIPTION
+ /* Subscribe to ST-Ericsson time zone/NITZ reporting */
+ if (at_send_command("AT*ETZR=3", NULL) < 0)
+ LOGW("%s(): Failed to send early AT*ETZR", __func__);
+#endif
+
/*
* Emergency numbers from 3GPP TS 22.101, chapter 10.1.1.
* 911 and 112 should always be set in the system property, but if SIM is