summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <contact@paulk.fr>2012-12-15 11:05:46 +0100
committerPaul Kocialkowski <contact@paulk.fr>2012-12-15 11:05:46 +0100
commit1b0c520dcf191c82313dc488f2d01a8c2c82004e (patch)
tree07eddc4e400e4e8c88473f8229e3c7a6a8fcc1c7
parentd1fceaa8edede42ad2a573aca1bbbca8541d892b (diff)
downloadhardware_ril_samsung-ril-1b0c520dcf191c82313dc488f2d01a8c2c82004e.zip
hardware_ril_samsung-ril-1b0c520dcf191c82313dc488f2d01a8c2c82004e.tar.gz
hardware_ril_samsung-ril-1b0c520dcf191c82313dc488f2d01a8c2c82004e.tar.bz2
SAT: Rename STK functions, disable STK by default
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
-rw-r--r--Android.mk3
-rw-r--r--samsung-ril.c15
-rw-r--r--samsung-ril.h10
-rw-r--r--sat.c27
4 files changed, 37 insertions, 18 deletions
diff --git a/Android.mk b/Android.mk
index cd21fb9..360d8a9 100644
--- a/Android.mk
+++ b/Android.mk
@@ -48,6 +48,9 @@ LOCAL_STATIC_LIBRARIES := libsamsung-ipc
# for asprinf
LOCAL_CFLAGS := -D_GNU_SOURCE
+# Disable STK
+LOCAL_CFLAGS += -DDISABLE_STK
+
ifeq ($(TARGET_DEVICE),crespo)
LOCAL_CFLAGS += -DDEVICE_IPC_V4
samsung-ipc_device := crespo
diff --git a/samsung-ril.c b/samsung-ril.c
index d8ae7d6..73c2ecd 100644
--- a/samsung-ril.c
+++ b/samsung-ril.c
@@ -306,12 +306,14 @@ void ipc_fmt_dispatch(struct ipc_message_info *info)
ipc_misc_time_info(info);
break;
/* SAT */
+#ifndef DISABLE_STK
case IPC_SAT_PROACTIVE_CMD:
- respondSatProactiveCmd(info);
+ ipc_sat_proactive_cmd(info);
break;
case IPC_SAT_ENVELOPE_CMD:
- respondSatEnvelopeCmd(info);
+ ipc_sat_envelope_cmd(info);
break;
+#endif
/* SS */
case IPC_SS_USSD:
ipc_ss_ussd(info);
@@ -473,15 +475,20 @@ void ril_on_request(int request, void *data, size_t length, RIL_Token t)
ril_request_get_imsi(t);
break;
/* SAT */
+#ifndef DISABLE_STK
+ case RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING:
+ ril_request_report_stk_service_is_running(t);
+ break;
case RIL_REQUEST_STK_SEND_TERMINAL_RESPONSE:
- requestSatSendTerminalResponse(t, data, length);
+ ril_request_stk_send_terminal_response(t, data, length);
break;
case RIL_REQUEST_STK_SEND_ENVELOPE_COMMAND:
- requestSatSendEnvelopeCommand(t, data, length);
+ ril_request_stk_send_envelope_command(t, data, length);
break;
case RIL_REQUEST_STK_HANDLE_CALL_SETUP_REQUESTED_FROM_SIM:
ril_request_complete(t, RIL_E_SUCCESS, NULL, 0);
break;
+#endif
/* SS */
case RIL_REQUEST_SEND_USSD:
ril_request_send_ussd(t, data, length);
diff --git a/samsung-ril.h b/samsung-ril.h
index c8a203b..3cf8f34 100644
--- a/samsung-ril.h
+++ b/samsung-ril.h
@@ -246,10 +246,11 @@ void ipc_misc_me_imsi(struct ipc_message_info *info);
void ipc_misc_time_info(struct ipc_message_info *info);
/* SAT */
-void respondSatProactiveCmd(struct ipc_message_info *request);
-void requestSatSendTerminalResponse(RIL_Token t, void *data, size_t datalen);
-void requestSatSendEnvelopeCommand(RIL_Token t, void *data, size_t datalen);
-void respondSatEnvelopeCmd(struct ipc_message_info *request);
+void ril_request_report_stk_service_is_running(RIL_Token t);
+void ipc_sat_proactive_cmd(struct ipc_message_info *info);
+void ril_request_stk_send_terminal_response(RIL_Token t, void *data, size_t datalen);
+void ril_request_stk_send_envelope_command(RIL_Token t, void *data, size_t datalen);
+void ipc_sat_envelope_cmd(struct ipc_message_info *info);
/* SS */
@@ -313,7 +314,6 @@ struct ril_request_send_sms_info {
RIL_Token token;
};
-
int ril_request_send_sms_register(char *pdu, int pdu_length, unsigned char *smsc, int smsc_length, RIL_Token t);
void ril_request_send_sms_unregister(struct ril_request_send_sms_info *send_sms);
struct ril_request_send_sms_info *ril_request_send_sms_info_find(void);
diff --git a/sat.c b/sat.c
index e599e7d..99397c7 100644
--- a/sat.c
+++ b/sat.c
@@ -25,13 +25,22 @@
#include "samsung-ril.h"
#include "util.h"
+void ril_request_report_stk_service_is_running(RIL_Token t)
+{
+#ifndef DISABLE_STK
+ ril_request_complete(t, RIL_E_SUCCESS, NULL, 0);
+#else
+ ril_request_complete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
+#endif
+}
+
/**
* In: IPC_SAT_PROACTIVE_CMD
* STK proactive command
*
* Out: RIL_UNSOL_STK_PROACTIVE_COMMAND
*/
-void respondSatProactiveCmdIndi(struct ipc_message_info *info)
+void ipc_sat_proactive_cmd_unsol(struct ipc_message_info *info)
{
int data_len = (info->length-2);
char *hexdata;
@@ -51,7 +60,7 @@ void respondSatProactiveCmdIndi(struct ipc_message_info *info)
*
* Out: RIL_UNSOL_STK_SESSION_END
*/
-void respondSatProactiveCmdResp(struct ipc_message_info *info)
+void ipc_sat_proactive_cmd_sol(struct ipc_message_info *info)
{
unsigned char sw1, sw2;
@@ -68,14 +77,14 @@ void respondSatProactiveCmdResp(struct ipc_message_info *info)
/**
* Proactive command indi/resp helper function
*/
-void respondSatProactiveCmd(struct ipc_message_info *info)
+void ipc_sat_proactive_cmd(struct ipc_message_info *info)
{
if(info->type == IPC_TYPE_INDI) {
- respondSatProactiveCmdIndi(info);
+ ipc_sat_proactive_cmd_unsol(info);
} else if(info->type == IPC_TYPE_RESP) {
- respondSatProactiveCmdResp(info);
+ ipc_sat_proactive_cmd_sol(info);
} else {
- LOGE("%s: unhandled proactive command response type %d", __FUNCTION__, info->type);
+ LOGE("%s: unhandled proactive command response type %d",__func__, info->type);
}
}
@@ -86,7 +95,7 @@ void respondSatProactiveCmd(struct ipc_message_info *info)
*
* Out: IPC_SAT_PROACTIVE_CMD GET
*/
-void requestSatSendTerminalResponse(RIL_Token t, void *data, size_t datalen)
+void ril_request_stk_send_terminal_response(RIL_Token t, void *data, size_t datalen)
{
unsigned char buf[264];
int len = (strlen(data) / 2);
@@ -113,7 +122,7 @@ void requestSatSendTerminalResponse(RIL_Token t, void *data, size_t datalen)
*
* Out: IPC_SAT_ENVELOPE_CMD EXEC
*/
-void requestSatSendEnvelopeCommand(RIL_Token t, void *data, size_t datalen)
+void ril_request_stk_send_envelope_command(RIL_Token t, void *data, size_t datalen)
{
unsigned char buf[264];
int len = (strlen(data) / 2);
@@ -138,7 +147,7 @@ void requestSatSendEnvelopeCommand(RIL_Token t, void *data, size_t datalen)
* Requests to send a SAT/USAT envelope command to SIM.
* The SAT/USAT envelope command refers to 3GPP TS 11.14 and 3GPP TS 31.111
*/
-void respondSatEnvelopeCmd(struct ipc_message_info *info)
+void ipc_sat_envelope_cmd(struct ipc_message_info *info)
{
int data_len = (info->length-2);
char *hexdata;