OSDN Git Service

5705010634b079598844d757eec981815d23a499
[android-x86/hardware-ril.git] / mock-ril / src / cpp / responses.cpp
1 /**
2  * Copyright (C) 2010 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #include <map>
18
19 #include <v8.h>
20 #include <telephony/ril.h>
21
22 #include "ril.pb.h"
23
24 #include "logging.h"
25 #include "mock_ril.h"
26 #include "node_buffer.h"
27 #include "node_object_wrap.h"
28 #include "protobuf_v8.h"
29 #include "status.h"
30 #include "util.h"
31 #include "worker.h"
32
33 #include "responses.h"
34
35 //#define RESPONSES_DEBUG
36 #ifdef  RESPONSES_DEBUG
37
38 #define DBG(...) LOGD(__VA_ARGS__)
39
40 #else
41
42 #define DBG(...)
43
44 #endif
45
46
47 /**
48  * The Buffer is assumed to be empty so nothing to convert
49  * @return STATUS_OK and *data = NULL *datalen = 0;
50  */
51 RIL_Errno RspWithNoData(
52         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) {
53     DBG("RspWithNoData E");
54
55     // Complete the request
56     s_rilenv->OnRequestComplete(token, rilErrno, NULL, 0);
57
58     DBG("RspWithNoData X");
59     return rilErrno;
60 }
61
62 /**
63  * Handle response for an array of strings
64  *
65  * If a string value is "*magic-null*" then that value
66  * will be returned as null.
67  */
68 RIL_Errno RspStrings(
69         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) {
70     DBG("RspStrings E");
71
72     ril_proto::RspStrings *rsp = new ril_proto::RspStrings();
73     rsp->ParseFromArray(buffer->data(), buffer->length());
74     int result_len = rsp->strings_size() * sizeof(const char *);
75     const char **result = (const char **)alloca(result_len);
76     for (int i = 0; i < rsp->strings_size();  i++) {
77         result[i] = rsp->strings(i).c_str();
78         DBG("result[%d]='%s'", i, result[i]);
79         if (strcmp("*magic-null*", result[i]) == 0) {
80             result[i] = NULL;
81         }
82     }
83
84     // Complete the request
85     s_rilenv->OnRequestComplete(token, rilErrno, result, result_len);
86
87     DBG("RspStrings X rilErrno=%d", rilErrno);
88     return rilErrno;
89 }
90
91 /**
92  * Handle response for a string
93  */
94 RIL_Errno RspString(
95         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) {
96     DBG("RspString E");
97
98     ril_proto::RspStrings *rsp = new ril_proto::RspStrings();
99     rsp->ParseFromArray(buffer->data(), buffer->length());
100     const char *result = rsp->strings(0).c_str();
101
102     // Complete the request
103     s_rilenv->OnRequestComplete(token, rilErrno, (void *)result, strlen(result));
104
105     DBG("RspString X rilErrno=%d", rilErrno);
106     return rilErrno;
107 }
108
109 /**
110  * Handle response for an array of integers
111  */
112 RIL_Errno RspIntegers(
113         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) {
114     DBG("RspIntegers E");
115
116     ril_proto::RspIntegers *rsp = new ril_proto::RspIntegers();
117     rsp->ParseFromArray(buffer->data(), buffer->length());
118     int result_len = rsp->integers_size() * sizeof(const int32_t);
119     int32_t *result = (int32_t *)alloca(result_len);
120     for (int i = 0; i < rsp->integers_size();  i++) {
121         result[i] = rsp->integers(i);
122         DBG("result[%d]=%d", i, result[i]);
123     }
124
125     // Complete the request
126     s_rilenv->OnRequestComplete(token, rilErrno, result, result_len);
127
128     DBG("RspIntegers X rilErrno=%d", rilErrno);
129     return rilErrno;
130 }
131
132 /**
133  * Handle RIL_REQUEST_GET_SIM_STATUS response
134  */
135 RIL_Errno RspGetSimStatus(
136         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) { // 1
137     DBG("RspGetSimStatus E");
138
139     ril_proto::RspGetSimStatus *rsp = new ril_proto::RspGetSimStatus();
140     rsp->ParseFromArray(buffer->data(), buffer->length());
141     const ril_proto::RilCardStatus& r = rsp->card_status();
142     RIL_CardStatus cardStatus;
143     cardStatus.card_state = RIL_CardState(r.card_state());
144     cardStatus.universal_pin_state = RIL_PinState(r.universal_pin_state());
145     cardStatus.gsm_umts_subscription_app_index = r.gsm_umts_subscription_app_index();
146     cardStatus.num_applications = r.num_applications();
147     for (int i = 0; i < cardStatus.num_applications; i++) {
148        cardStatus.applications[i].app_type = RIL_AppType(r.applications(i).app_type());
149        cardStatus.applications[i].app_state = RIL_AppState(r.applications(i).app_state());
150        cardStatus.applications[i].perso_substate =
151             RIL_PersoSubstate(r.applications(i).perso_substate());
152        cardStatus.applications[i].aid_ptr = const_cast<char *>(r.applications(i).aid().c_str());
153        cardStatus.applications[i].app_label_ptr =
154             const_cast<char *>(r.applications(i).app_label().c_str());
155        cardStatus.applications[i].pin1_replaced = r.applications(i).pin1_replaced();
156        cardStatus.applications[i].pin1 = RIL_PinState(r.applications(i).pin1());
157        cardStatus.applications[i].pin2 = RIL_PinState(r.applications(i).pin2());
158     }
159
160     // Complete the request
161     s_rilenv->OnRequestComplete(token, rilErrno,
162             &cardStatus, sizeof(cardStatus));
163
164     DBG("RspGetSimStatus X rilErrno=%d", rilErrno);
165     return rilErrno;
166 }
167
168 /**
169  * Handle RIL_REQUEST_ENTER_SIM_PIN_DATA response
170  */
171 RIL_Errno RspEnterSimPinData(
172         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) { // 2
173     DBG("RspEnterSimPinData E");
174
175     ril_proto::RspEnterSimPin *rsp = new ril_proto::RspEnterSimPin();
176     rsp->ParseFromArray(buffer->data(), buffer->length());
177     DBG("retries_remaining=%d", rsp->retries_remaining());
178     int retries_remaining = rsp->retries_remaining();
179
180     // Complete the request
181     s_rilenv->OnRequestComplete(token, rilErrno,
182             &retries_remaining, sizeof(retries_remaining));
183
184     DBG("RspEnterSimPinData X rilErrno=%d", rilErrno);
185     return rilErrno;
186 }
187
188 /**
189  * Handle RIL_REQUEST_GET_CURRENT_CALLS response  // 9
190  */
191 RIL_Errno RspGetCurrentCalls (
192         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) { // 9
193     DBG("RspGetCurrentCalls E");
194
195     ril_proto::RspGetCurrentCalls *rsp = new ril_proto::RspGetCurrentCalls();
196     rsp->ParseFromArray(buffer->data(), buffer->length());
197     int result_len = rsp->calls_size() * sizeof(const RIL_Call *);
198     DBG("RspGetCurrentCalls rilErrno=%d result_len=%d", rilErrno, result_len);
199     RIL_Call **result = (RIL_Call **)alloca(result_len);
200     for (int i = 0; i < rsp->calls_size();  i++) {
201         const ril_proto::RilCall& srcCall = rsp->calls(i);
202         RIL_Call *dstCall = (RIL_Call *)alloca(sizeof(RIL_Call));
203
204         result[i] = dstCall;
205         dstCall->state = (RIL_CallState)srcCall.state();
206         dstCall->index = srcCall.index();
207         dstCall->toa = srcCall.toa();
208         dstCall->isMpty = (char)srcCall.is_mpty();
209         dstCall->isMT = (char)srcCall.is_mt();
210         dstCall->als = srcCall.als();
211         dstCall->isVoice = (char)srcCall.is_voice();
212         dstCall->isVoicePrivacy = (char)srcCall.is_voice_privacy();
213         dstCall->number = (char *)srcCall.number().c_str();
214         dstCall->numberPresentation = srcCall.number_presentation();
215         dstCall->name = (char *)srcCall.name().c_str();
216         dstCall->namePresentation = srcCall.name_presentation();
217         if (srcCall.has_uus_info()) {
218             dstCall->uusInfo =
219                 (RIL_UUS_Info *)alloca(sizeof(RIL_UUS_Info));
220             dstCall->uusInfo->uusType =
221                 (RIL_UUS_Type)srcCall.uus_info().uus_type();
222             dstCall->uusInfo->uusDcs =
223                 (RIL_UUS_DCS)srcCall.uus_info().uus_dcs();
224             dstCall->uusInfo->uusLength =
225                 srcCall.uus_info().uus_length();
226             dstCall->uusInfo->uusData =
227                 (char *)srcCall.uus_info().uus_data().c_str();
228         } else {
229             dstCall->uusInfo = NULL;
230         }
231     }
232
233     // Complete the request
234     s_rilenv->OnRequestComplete(token, rilErrno, result, result_len);
235
236     DBG("RspGetCurrentCalls X rilErrno=%d", rilErrno);
237     return rilErrno;
238 }
239
240 /**
241  * Handle RIL_REQUEST_SIGNAL_STRENGTH response
242  */
243 RIL_Errno RspSignalStrength(
244         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) { // 19
245     DBG("RspSignalStrength E");
246
247     DBG("cmd = %d, token=%p, rilErrno=%d", cmd, token, rilErrno);
248
249     // Retrieve response from response message
250     ril_proto::RspSignalStrength *rsp = new ril_proto::RspSignalStrength();
251     rsp->ParseFromArray(buffer->data(), buffer->length());
252     const ril_proto::RILGWSignalStrength& gwST = rsp->gw_signalstrength();
253     const ril_proto::RILCDMASignalStrength& cdmaST = rsp->cdma_signalstrength();
254     const ril_proto::RILEVDOSignalStrength& evdoST = rsp->evdo_signalstrength();
255
256     // Copy the response message from response to format defined in ril.h
257     RIL_SignalStrength curSignalStrength;
258
259     curSignalStrength.GW_SignalStrength.signalStrength = gwST.signal_strength();
260     curSignalStrength.GW_SignalStrength.bitErrorRate = gwST.bit_error_rate();
261     curSignalStrength.CDMA_SignalStrength.dbm = cdmaST.dbm();
262     curSignalStrength.CDMA_SignalStrength.ecio = cdmaST.ecio();
263     curSignalStrength.EVDO_SignalStrength.dbm = evdoST.dbm();
264     curSignalStrength.EVDO_SignalStrength.ecio = evdoST.ecio();
265     curSignalStrength.EVDO_SignalStrength.signalNoiseRatio = evdoST.signal_noise_ratio();
266
267     DBG("print response signal strength: ");
268     DBG("gw signalstrength = %d", curSignalStrength.GW_SignalStrength.signalStrength);
269     DBG("gw_signalstrength = %d", curSignalStrength.GW_SignalStrength.bitErrorRate);
270     DBG("cdma_signalstrength = %d", curSignalStrength.CDMA_SignalStrength.dbm);
271     DBG("cdma_signalstrength = %d", curSignalStrength.CDMA_SignalStrength.ecio);
272     DBG("evdo_signalstrength = %d", curSignalStrength.EVDO_SignalStrength.dbm);
273     DBG("evdo_signalstrength = %d", curSignalStrength.EVDO_SignalStrength.ecio);
274     DBG("evdo_signalstrength = %d", curSignalStrength.EVDO_SignalStrength.signalNoiseRatio);
275
276     // Complete the request
277     s_rilenv->OnRequestComplete(token, rilErrno, &curSignalStrength, sizeof(curSignalStrength));
278
279     DBG("RspSignalStrength X rilErrno=%d", rilErrno);
280     return rilErrno;
281 }
282
283 /**
284  * Handle RIL_REQUEST_OPERATOR response
285  */
286 RIL_Errno RspOperator(
287         int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer *buffer) { // 22
288     int status;
289
290     DBG("RspOperator E");
291
292     ril_proto::RspOperator *rsp = new ril_proto::RspOperator();
293     rsp->ParseFromArray(buffer->data(), buffer->length());
294     const char *result[3] = { NULL, NULL, NULL };
295     if (rsp->has_long_alpha_ons()) {
296         DBG("long_alpha_ons=%s", rsp->long_alpha_ons().c_str());
297         result[0] = rsp->long_alpha_ons().c_str();
298     }
299     if (rsp->has_short_alpha_ons()) {
300         DBG("short_alpha_ons=%s", rsp->short_alpha_ons().c_str());
301         result[1] = rsp->short_alpha_ons().c_str();
302     }
303     if (rsp->has_mcc_mnc()) {
304         DBG("mcc_mnc=%s", rsp->mcc_mnc().c_str());
305         result[2] = rsp->mcc_mnc().c_str();
306     }
307
308     // Complete the request
309     s_rilenv->OnRequestComplete(token, rilErrno, result, sizeof(result));
310
311     DBG("RspOperator X rilErrno=%d", rilErrno);
312     return rilErrno;
313 }
314
315 // ----------------- Handle unsolicited response ----------------------------------------
316  /**
317  * Handle RIL_UNSOL_SIGNAL_STRENGTH response
318  */
319 void UnsolRspSignalStrength(int cmd, Buffer* buffer) {
320
321     DBG("UnsolRspSignalStrength E");
322     LOGE("unsolicited response command: %d", cmd);
323     // Retrieve response from response message
324     ril_proto::RspSignalStrength *rsp = new ril_proto::RspSignalStrength();
325     rsp->ParseFromArray(buffer->data(), buffer->length());
326     const ril_proto::RILGWSignalStrength& gwST = rsp->gw_signalstrength();
327     const ril_proto::RILCDMASignalStrength& cdmaST = rsp->cdma_signalstrength();
328     const ril_proto::RILEVDOSignalStrength& evdoST = rsp->evdo_signalstrength();
329
330     // Copy the response message from response to format defined in ril.h
331     RIL_SignalStrength curSignalStrength;
332
333     curSignalStrength.GW_SignalStrength.signalStrength = gwST.signal_strength();
334     curSignalStrength.GW_SignalStrength.bitErrorRate = gwST.bit_error_rate();
335     curSignalStrength.CDMA_SignalStrength.dbm = cdmaST.dbm();
336     curSignalStrength.CDMA_SignalStrength.ecio = cdmaST.ecio();
337     curSignalStrength.EVDO_SignalStrength.dbm = evdoST.dbm();
338     curSignalStrength.EVDO_SignalStrength.ecio = evdoST.ecio();
339     curSignalStrength.EVDO_SignalStrength.signalNoiseRatio = evdoST.signal_noise_ratio();
340
341     DBG("print response signal strength: ");
342     DBG("gw signalstrength = %d", curSignalStrength.GW_SignalStrength.signalStrength);
343     DBG("gw_signalstrength = %d", curSignalStrength.GW_SignalStrength.bitErrorRate);
344     DBG("cdma_signalstrength = %d", curSignalStrength.CDMA_SignalStrength.dbm);
345     DBG("cdma_signalstrength = %d", curSignalStrength.CDMA_SignalStrength.ecio);
346     DBG("evdo_signalstrength = %d", curSignalStrength.EVDO_SignalStrength.dbm);
347     DBG("evdo_signalstrength = %d", curSignalStrength.EVDO_SignalStrength.ecio);
348     DBG("evdo_signalstrength = %d", curSignalStrength.EVDO_SignalStrength.signalNoiseRatio);
349
350     s_rilenv->OnUnsolicitedResponse(cmd, &curSignalStrength, sizeof(curSignalStrength));
351     DBG("UnsolRspSignalStrength X");
352 }
353
354 /**
355  * Maps for converting request complete and unsoliciated response
356  * protobufs to ril data arrays.
357  */
358 typedef RIL_Errno (*RspConversion)(
359                 int cmd, RIL_Token token, RIL_Errno rilErrno, Buffer* buffer);
360 typedef std::map<int, RspConversion> RspConversionMap;
361 RspConversionMap rilRspConversionMap;
362
363 typedef void (*UnsolRspConversion)(int cmd, Buffer* buffer);
364 typedef std::map<int, UnsolRspConversion> UnsolRspConversionMap;
365 UnsolRspConversionMap unsolRilRspConversionMap;
366
367 /**
368  * Send a ril request complete response.
369  */
370 v8::Handle<v8::Value> SendRilRequestComplete(const v8::Arguments& args) {
371     DBG("SendRilRequestComplete E");
372     v8::HandleScope handle_scope;
373     v8::Handle<v8::Value> retValue;
374
375     int cmd;
376     RIL_Errno rilErrno;
377     RIL_Token token;
378     Buffer* buffer;
379
380     /**
381      * Get the arguments. There should be at least 3, cmd,
382      * ril error code and token. Optionally a Buffer containing
383      * the protobuf representation of the data to return.
384      */
385     if (args.Length() < REQUEST_COMPLETE_REQUIRED_CMDS) {
386         // Expecting a cmd, ERROR and token
387         LOGE("SendRilRequestComplete X %d parameters"
388              " expecting at least %d: rilErrno, cmd, and token",
389                 args.Length(), REQUEST_COMPLETE_REQUIRED_CMDS);
390         return v8::Undefined();
391     }
392     v8::Handle<v8::Value> v8RilErrCode(
393                     args[REQUEST_COMPLETE_RIL_ERR_CODE_INDEX]->ToObject());
394     rilErrno = RIL_Errno(v8RilErrCode->NumberValue());
395
396     v8::Handle<v8::Value> v8Cmd(
397                     args[REQUEST_COMPLETE_CMD_INDEX]->ToObject());
398     cmd = int(v8Cmd->NumberValue());
399
400     v8::Handle<v8::Value> v8Token(
401                     args[REQUEST_COMPLETE_TOKEN_INDEX]->ToObject());
402     token = RIL_Token(int64_t(v8Token->NumberValue()));
403
404     if (args.Length() >= (REQUEST_COMPLETE_DATA_INDEX+1)) {
405         buffer = ObjectWrap::Unwrap<Buffer>(
406                     args[REQUEST_COMPLETE_DATA_INDEX]->ToObject());
407     } else {
408         buffer = NULL;
409     }
410
411     DBG("SendRilRequestComplete: rilErrno=%d, cmd=%d, token=%p", rilErrno, cmd, token);
412     RspConversionMap::iterator itr;
413     itr = rilRspConversionMap.find(cmd);
414     if (itr != rilRspConversionMap.end()) {
415         itr->second(cmd, token, rilErrno, buffer);
416     } else {
417         if ((buffer == NULL) || (buffer->length() <= 0)) {
418             // Nothing to convert
419             rilErrno = RIL_E_SUCCESS;
420         } else {
421             // There was a buffer but we don't support the resonse yet.
422             LOGE("SendRilRequestComplete: No conversion routine for cmd %d,"
423                     " return RIL_E_REQUEST_NOT_SUPPORTED", cmd);
424             rilErrno = RIL_E_REQUEST_NOT_SUPPORTED;
425         }
426         // Complete the request
427         s_rilenv->OnRequestComplete(token, rilErrno, NULL, 0);
428     }
429
430     DBG("SendRilRequestComplete X rillErrno=%d", rilErrno);
431     return v8::Undefined();
432 }
433
434 /**
435  * Send an unsolicited response.
436  */
437 v8::Handle<v8::Value> SendRilUnsolicitedResponse(const v8::Arguments& args) {
438     DBG("SendRilUnsolicitedResponse E");
439     v8::HandleScope handle_scope;
440     v8::Handle<v8::Value> retValue;
441
442     int status;
443     void *data;
444     size_t datalen;
445
446     int cmd;
447     Buffer* buffer;
448
449     /**
450      * Get the cmd number and data arguments
451      */
452     if (args.Length() < UNSOL_RESPONSE_REQUIRED_CMDS) {
453         // Expecting a cmd
454         LOGE("SendRilUnsolicitedResponse X %d parameters"
455              " expecting at least a cmd",
456                 args.Length());
457         return v8::Undefined();
458     }
459     v8::Handle<v8::Value> v8RilErrCode(args[UNSOL_RESPONSE_CMD_INDEX]->ToObject());
460     cmd = int(v8RilErrCode->NumberValue());
461
462     // data is optional
463     if (args.Length() >= (UNSOL_RESPONSE_DATA_INDEX+1)) {
464         buffer = ObjectWrap::Unwrap<Buffer>(args[UNSOL_RESPONSE_DATA_INDEX]->ToObject());
465     } else {
466         buffer = NULL;
467     }
468
469     UnsolRspConversionMap::iterator itr;
470     itr = unsolRilRspConversionMap.find(cmd);
471     if (itr != unsolRilRspConversionMap.end()) {
472         itr->second(cmd, buffer);
473     } else {
474         if ((buffer == NULL) || (buffer->length() <= 0)) {
475             // Nothing to convert
476             data = NULL;
477             datalen = 0;
478         } else {
479             // There was a buffer but we don't support the response yet.
480             LOGE("SendRilUnsolicitedResponse: No conversion routine for cmd %d,"
481                     " return RIL_E_REQUEST_NOT_SUPPORTED", cmd);
482             data = NULL;
483             datalen = 0;
484         }
485         s_rilenv->OnUnsolicitedResponse(cmd, NULL, 0);
486     }
487
488     DBG("SendRilUnsolicitedResponse X");
489     return v8::Undefined();
490 }
491
492 int responsesInit(v8::Handle<v8::Context> context) {
493     LOGD("responsesInit E");
494     int status = STATUS_OK;
495
496     rilRspConversionMap[RIL_REQUEST_GET_SIM_STATUS] = RspGetSimStatus; // 1
497     rilRspConversionMap[RIL_REQUEST_ENTER_SIM_PIN] = RspEnterSimPinData; // 2
498     rilRspConversionMap[RIL_REQUEST_GET_CURRENT_CALLS] = RspGetCurrentCalls; // 9
499     rilRspConversionMap[RIL_REQUEST_GET_IMSI] = RspString; // 11
500     rilRspConversionMap[RIL_REQUEST_HANGUP] = RspWithNoData; // 12
501     rilRspConversionMap[RIL_REQUEST_HANGUP_WAITING_OR_BACKGROUND] = RspWithNoData; // 13
502     rilRspConversionMap[RIL_REQUEST_HANGUP_FOREGROUND_RESUME_BACKGROUND] = RspWithNoData; // 14
503     rilRspConversionMap[RIL_REQUEST_SWITCH_WAITING_OR_HOLDING_AND_ACTIVE] = RspWithNoData; // 15
504     rilRspConversionMap[RIL_REQUEST_CONFERENCE] = RspWithNoData;  // 16
505     rilRspConversionMap[RIL_REQUEST_SIGNAL_STRENGTH] = RspSignalStrength; // 19
506     rilRspConversionMap[RIL_REQUEST_REGISTRATION_STATE] = RspStrings; // 20
507     rilRspConversionMap[RIL_REQUEST_GPRS_REGISTRATION_STATE] = RspStrings; // 21
508     rilRspConversionMap[RIL_REQUEST_OPERATOR] = RspOperator; // 22
509     rilRspConversionMap[RIL_REQUEST_GET_IMEI] = RspString; // 38
510     rilRspConversionMap[RIL_REQUEST_GET_IMEISV] = RspString; // 39
511     rilRspConversionMap[RIL_REQUEST_QUERY_NETWORK_SELECTION_MODE] = RspIntegers; // 45
512     rilRspConversionMap[RIL_REQUEST_SET_NETWORK_SELECTION_AUTOMATIC] = RspWithNoData; // 46
513     rilRspConversionMap[RIL_REQUEST_BASEBAND_VERSION] = RspString; // 51
514     rilRspConversionMap[RIL_REQUEST_SEPARATE_CONNECTION] = RspWithNoData;  // 52
515     rilRspConversionMap[RIL_REQUEST_SET_MUTE] = RspWithNoData;  // 53
516     rilRspConversionMap[RIL_REQUEST_SCREEN_STATE] = RspWithNoData; // 61
517
518     unsolRilRspConversionMap[RIL_UNSOL_SIGNAL_STRENGTH] = UnsolRspSignalStrength;  // 1009
519
520
521     LOGD("responsesInit X: status=%d", status);
522     return STATUS_OK;
523 }