diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2013-12-12 12:04:36 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2013-12-12 12:04:36 -0800 |
commit | 1bcb93a64237ab56f7863d99958a0096d7347b82 (patch) | |
tree | c543490e0ca506faccb7229aa94af984d685ab3e | |
parent | a0be1a28c591fc4ed130a5df6556e3e4845d7827 (diff) | |
parent | d919e8ff0704a7aea20606573ba29b4c7d559b00 (diff) | |
download | android_hardware_ril-1bcb93a64237ab56f7863d99958a0096d7347b82.tar.gz android_hardware_ril-1bcb93a64237ab56f7863d99958a0096d7347b82.tar.bz2 android_hardware_ril-1bcb93a64237ab56f7863d99958a0096d7347b82.zip |
Merge "Merge "Initialize the buffer""
-rw-r--r-- | include/telephony/ril.h | 27 | ||||
-rw-r--r-- | reference-ril/reference-ril.c | 3 | ||||
-rw-r--r-- | rild/rild.c | 2 |
3 files changed, 17 insertions, 15 deletions
diff --git a/include/telephony/ril.h b/include/telephony/ril.h index 6b8deab..0988f32 100644 --- a/include/telephony/ril.h +++ b/include/telephony/ril.h @@ -3698,13 +3698,16 @@ typedef struct { * ((int *)response)[0] is registration state: * 0 - Not registered * 1 - Registered - * ((int *)response)[1] is bitmap of the supported services: - * & 0x1 - SMS supported * - * If IMS is registered and supports SMS, then ((int *) response)[2] + * If ((int*)response)[0] is = 1, then ((int *) response)[1] * must follow with IMS SMS format: * - * ((int *) response)[2] is of type const RIL_IMS_SMS_Format + * ((int *) response)[1] is of type RIL_RadioTechnologyFamily + * + * Valid errors: + * SUCCESS + * RADIO_NOT_AVAILABLE + * GENERIC_FAILURE */ #define RIL_REQUEST_IMS_REGISTRATION_STATE 112 @@ -4279,22 +4282,18 @@ typedef struct { */ #define RIL_UNSOL_CELL_INFO_LIST 1036 -/* +/** * RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED * * Called when IMS registration state has changed * - * "data" is int * - * ((int *)response)[0] is registration state: - * 0 - Not registered - * 1 - Registered - * ((int *)response)[1] is bitmap of the services supported: - * & 0x1 - SMS supported + * To get IMS registration state and IMS SMS format, callee needs to invoke the + * following request on main thread: * - * If IMS is registered and supports SMS, then ((int *) response)[2] - * must follow with IMS SMS format: + * RIL_REQUEST_IMS_REGISTRATION_STATE + * + * "data" is NULL * - * ((int *) response)[2] is of type const RIL_IMS_SMS_Format */ #define RIL_UNSOL_RESPONSE_IMS_NETWORK_STATE_CHANGED 1037 diff --git a/reference-ril/reference-ril.c b/reference-ril/reference-ril.c index 2a6edf2..5032546 100644 --- a/reference-ril/reference-ril.c +++ b/reference-ril/reference-ril.c @@ -2515,6 +2515,9 @@ setRadioState(RIL_RadioState newState) if (sState != oldState) { RIL_onUnsolicitedResponse (RIL_UNSOL_RESPONSE_RADIO_STATE_CHANGED, NULL, 0); + // Sim state can change as result of radio state change + RIL_onUnsolicitedResponse (RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, + NULL, 0); /* FIXME onSimReady() and onRadioPowerOn() cannot be called * from the AT reader thread diff --git a/rild/rild.c b/rild/rild.c index fa9d72a..f9d226d 100644 --- a/rild/rild.c +++ b/rild/rild.c @@ -163,7 +163,7 @@ int main(int argc, char **argv) #define REFERENCE_RIL_PATH "/system/lib/libreference-ril.so" /* first, read /proc/cmdline into memory */ - char buffer[1024], *p, *q; + char buffer[1024] = {'\0'}, *p, *q; int len; int fd = open("/proc/cmdline",O_RDONLY); |