Use RADIO_STATE_ON on ICS/JB only
authorAlexander Tarasikov <alexander.tarasikov@gmail.com>
Fri, 24 Aug 2012 16:02:49 +0000 (20:02 +0400)
committerAlexander Tarasikov <alexander.tarasikov@gmail.com>
Fri, 24 Aug 2012 16:02:49 +0000 (20:02 +0400)
compat.h
sec.c
sms.c

index efbdd60..3eda9af 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -45,6 +45,9 @@
        #define RIL_CardStatus RIL_CardStatus_v6
        #define RIL_SIM_IO RIL_SIM_IO_v6
        #define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
+       #define COMPAT_RADIO_STATE_ON RADIO_STATE_ON
+#else
+       #define COMPAT_RADIO_STATE_ON RADIO_STATE_SIM_READY
 #endif
 
 //set it to the maximum supported revision
diff --git a/sec.c b/sec.c
index bb9b9bc..a6b24b6 100644 (file)
--- a/sec.c
+++ b/sec.c
@@ -88,8 +88,7 @@ void ril_state_update(SIM_Status status)
 
        switch(status) {
                case SIM_READY:
-                       radio_state = RADIO_STATE_ON;
-                       //radio_state = RADIO_STATE_SIM_READY;
+                       radio_state = COMPAT_RADIO_STATE_ON;
                        break;
                case SIM_NOT_READY:
                        radio_state = RADIO_STATE_SIM_NOT_READY;
diff --git a/sms.c b/sms.c
index 5eed65d..7a21ae3 100644 (file)
--- a/sms.c
+++ b/sms.c
@@ -697,7 +697,7 @@ void ipc_sms_deliver_report(struct ipc_message_info *info)
 
 void ipc_sms_device_ready(struct ipc_message_info *info)
 {
-       if(ril_state.radio_state == RADIO_STATE_ON) {
+       if(ril_state.radio_state == COMPAT_RADIO_STATE_ON) {
                ipc_fmt_send(IPC_SMS_DEVICE_READY, IPC_TYPE_SET, NULL, 0, info->aseq);
        }