#define appendPrintBuf(x...)
#endif
+#define MAX_RIL_SOL RIL_REQUEST_VOICE_RADIO_TECH
+#define MAX_RIL_UNSOL RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
+
enum WakeType {DONT_WAKE, WAKE_PARTIAL};
typedef struct {
/* Hack to include Samsung requests */
if (request > 10000) {
- index = request - 10000 + RIL_REQUEST_VOICE_RADIO_TECH;
- ALOGE("SAMSUNG: request=%d, index=%d", request, index);
+ index = request - 10000 + MAX_RIL_SOL;
+ ALOGD("SAMSUNG: request=%d, index=%d", request, index);
pRI->pCI = &(s_commands[index]);
} else {
pRI->pCI = &(s_commands[request]);
}
/* Hack to include Samsung requests */
- //if (request < 1 || request >= (int32_t)NUM_ELEMS(s_commands)) {
- if (request < 1 || ((request > RIL_REQUEST_VOICE_RADIO_TECH) && (request < RIL_REQUEST_GET_CELL_BROADCAST_CONFIG)) || request > RIL_REQUEST_HANGUP_VT) {
+ if (request < 1 || ((request > MAX_RIL_SOL) &&
+ (request < RIL_REQUEST_GET_CELL_BROADCAST_CONFIG)) ||
+ request > RIL_REQUEST_HANGUP_VT) {
ALOGE("unsupported request code %d token %d", request, token);
// FIXME this should perhaps return a response
return 0;
/* Hack to include Samsung requests */
if (request > 10000) {
- index = request - 10000 + RIL_REQUEST_VOICE_RADIO_TECH;
- ALOGE("processCommandBuffer: samsung request=%d, index=%d", request, index);
+ index = request - 10000 + MAX_RIL_SOL;
+ ALOGD("processCommandBuffer: samsung request=%d, index=%d",
+ request, index);
pRI->pCI = &(s_commands[index]);
} else {
pRI->pCI = &(s_commands[request]);
}
for (int i = 0; i < (int)NUM_ELEMS(s_unsolResponses); i++) {
- assert(i + RIL_UNSOL_RESPONSE_BASE
+ /* Hack to include Samsung responses */
+ if (i > MAX_RIL_UNSOL - RIL_UNSOL_RESPONSE_BASE) {
+ assert(i + SAMSUNG_UNSOL_RESPONSE_BASE - MAX_RIL_UNSOL
+ == s_unsolResponses[i].requestNumber);
+ } else {
+ assert(i + RIL_UNSOL_RESPONSE_BASE
== s_unsolResponses[i].requestNumber);
+ }
}
// New rild impl calls RIL_startEventLoop() first
return;
}
- unsolResponseIndex = unsolResponse - RIL_UNSOL_RESPONSE_BASE;
+ /* Hack to include Samsung responses */
+ if (unsolResponse > SAMSUNG_UNSOL_RESPONSE_BASE) {
+ unsolResponseIndex = unsolResponse - SAMSUNG_UNSOL_RESPONSE_BASE + MAX_RIL_UNSOL - RIL_UNSOL_RESPONSE_BASE;
+ ALOGD("SAMSUNG: unsolResponse=%d, unsolResponseIndex=%d", unsolResponse, unsolResponseIndex);
+ } else {
+ unsolResponseIndex = unsolResponse - RIL_UNSOL_RESPONSE_BASE;
+ }
if ((unsolResponseIndex < 0)
|| (unsolResponseIndex >= (int32_t)NUM_ELEMS(s_unsolResponses))) {
case RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE: return "UNSOL_EXIT_EMERGENCY_CALLBACK_MODE";
case RIL_UNSOL_RIL_CONNECTED: return "UNSOL_RIL_CONNECTED";
case RIL_UNSOL_VOICE_RADIO_TECH_CHANGED: return "UNSOL_VOICE_RADIO_TECH_CHANGED";
+ case RIL_UNSOL_STK_SEND_SMS_RESULT: return "RIL_UNSOL_STK_SEND_SMS_RESULT";
default: return "<unknown request>";
}
}
{RIL_UNSOL_CDMA_PRL_CHANGED, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_RIL_CONNECTED, responseInts, WAKE_PARTIAL},
- {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL}
+ {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL}, // 1035
+ {RIL_UNSOL_RELEASE_COMPLETE_MESSAGE, responseVoid, WAKE_PARTIAL}, // 11001
+ {RIL_UNSOL_STK_SEND_SMS_RESULT, responseInts, WAKE_PARTIAL}, // 11002
\ No newline at end of file
#define appendPrintBuf(x...)
#endif
+#define MAX_RIL_SOL RIL_REQUEST_VOICE_RADIO_TECH
+#define MAX_RIL_UNSOL RIL_UNSOL_VOICE_RADIO_TECH_CHANGED
+
enum WakeType {DONT_WAKE, WAKE_PARTIAL};
typedef struct {
/* Hack to include Samsung requests */
if (request > 10000) {
- index = request - 10000 + RIL_REQUEST_VOICE_RADIO_TECH;
- ALOGE("SAMSUNG: request=%d, index=%d", request, index);
+ index = request - 10000 + MAX_RIL_SOL;
+ ALOGD("SAMSUNG: request=%d, index=%d", request, index);
pRI->pCI = &(s_commands[index]);
} else {
pRI->pCI = &(s_commands[request]);
}
/* Hack to include Samsung requests */
- //if (request < 1 || request >= (int32_t)NUM_ELEMS(s_commands)) {
- if (request < 1 || ((request > RIL_REQUEST_VOICE_RADIO_TECH) && (request < RIL_REQUEST_GET_CELL_BROADCAST_CONFIG)) || request > RIL_REQUEST_HANGUP_VT) {
+ if (request < 1 || ((request > MAX_RIL_SOL) &&
+ (request < RIL_REQUEST_GET_CELL_BROADCAST_CONFIG)) ||
+ request > RIL_REQUEST_HANGUP_VT) {
ALOGE("unsupported request code %d token %d", request, token);
// FIXME this should perhaps return a response
return 0;
/* Hack to include Samsung requests */
if (request > 10000) {
- index = request - 10000 + RIL_REQUEST_VOICE_RADIO_TECH;
- ALOGE("processCommandBuffer: samsung request=%d, index=%d", request, index);
+ index = request - 10000 + MAX_RIL_SOL;
+ ALOGD("processCommandBuffer: samsung request=%d, index=%d",
+ request, index);
pRI->pCI = &(s_commands[index]);
} else {
pRI->pCI = &(s_commands[request]);
}
for (int i = 0; i < (int)NUM_ELEMS(s_unsolResponses); i++) {
- assert(i + RIL_UNSOL_RESPONSE_BASE
+ /* Hack to include Samsung responses */
+ if (i > MAX_RIL_UNSOL - RIL_UNSOL_RESPONSE_BASE) {
+ assert(i + SAMSUNG_UNSOL_RESPONSE_BASE - MAX_RIL_UNSOL
+ == s_unsolResponses[i].requestNumber);
+ } else {
+ assert(i + RIL_UNSOL_RESPONSE_BASE
== s_unsolResponses[i].requestNumber);
+ }
}
// New rild impl calls RIL_startEventLoop() first
return;
}
- unsolResponseIndex = unsolResponse - RIL_UNSOL_RESPONSE_BASE;
+ /* Hack to include Samsung responses */
+ if (unsolResponse > SAMSUNG_UNSOL_RESPONSE_BASE) {
+ unsolResponseIndex = unsolResponse - SAMSUNG_UNSOL_RESPONSE_BASE + MAX_RIL_UNSOL - RIL_UNSOL_RESPONSE_BASE;
+ ALOGD("SAMSUNG: unsolResponse=%d, unsolResponseIndex=%d", unsolResponse, unsolResponseIndex);
+ } else {
+ unsolResponseIndex = unsolResponse - RIL_UNSOL_RESPONSE_BASE;
+ }
if ((unsolResponseIndex < 0)
|| (unsolResponseIndex >= (int32_t)NUM_ELEMS(s_unsolResponses))) {
case RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE: return "UNSOL_EXIT_EMERGENCY_CALLBACK_MODE";
case RIL_UNSOL_RIL_CONNECTED: return "UNSOL_RIL_CONNECTED";
case RIL_UNSOL_VOICE_RADIO_TECH_CHANGED: return "UNSOL_VOICE_RADIO_TECH_CHANGED";
+ case RIL_UNSOL_STK_SEND_SMS_RESULT: return "RIL_UNSOL_STK_SEND_SMS_RESULT";
default: return "<unknown request>";
}
}
{RIL_UNSOL_CDMA_PRL_CHANGED, responseInts, WAKE_PARTIAL},
{RIL_UNSOL_EXIT_EMERGENCY_CALLBACK_MODE, responseVoid, WAKE_PARTIAL},
{RIL_UNSOL_RIL_CONNECTED, responseInts, WAKE_PARTIAL},
- {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL},
+ {RIL_UNSOL_VOICE_RADIO_TECH_CHANGED, responseInts, WAKE_PARTIAL}, // 1035
+ {RIL_UNSOL_RELEASE_COMPLETE_MESSAGE, responseVoid, WAKE_PARTIAL}, // 11001
+ {RIL_UNSOL_STK_SEND_SMS_RESULT, responseInts, WAKE_PARTIAL}, // 11002
\ No newline at end of file