Permalink
Browse files

Smdk4210RIL: block unsupported requests to avoid RIL wakelocks

Change-Id: I7abd83e33284268da7aaf8ab3da9cb04a381720d
  • Loading branch information...
1 parent c4a132e commit af8bab300560d72eb3cabc00b041996f0d5938e8 @codeworkx codeworkx committed Sep 27, 2012
View
4 telephony/java/com/android/internal/telephony/RIL.java
@@ -680,8 +680,8 @@ public RIL(Context context, int preferredNetworkType, int cdmaSubscription) {
}
//***** CommandsInterface implementation
-
- public void getVoiceRadioTechnology(Message result) {
+ @Override public void
+ getVoiceRadioTechnology(Message result) {
RILRequest rr = RILRequest.obtain(RIL_REQUEST_VOICE_RADIO_TECH, result);
if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
View
30 telephony/java/com/android/internal/telephony/Smdk4210RIL.java
@@ -462,7 +462,7 @@ protected void processSolicited (Parcel p) {
case RIL_REQUEST_EXPLICIT_CALL_TRANSFER: ret = responseVoid(p); break;
case RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE: ret = responseVoid(p); break;
case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE: ret = responseGetPreferredNetworkType(p); break;
- case RIL_REQUEST_GET_NEIGHBORING_CELL_IDS: ret = responseVoid(p); break;
+ case RIL_REQUEST_GET_NEIGHBORING_CELL_IDS: ret = responseCellList(p); break;
case RIL_REQUEST_SET_LOCATION_UPDATES: ret = responseVoid(p); break;
case RIL_REQUEST_CDMA_SET_SUBSCRIPTION_SOURCE: ret = responseVoid(p); break;
case RIL_REQUEST_CDMA_SET_ROAMING_PREFERENCE: ret = responseVoid(p); break;
@@ -491,8 +491,11 @@ protected void processSolicited (Parcel p) {
case RIL_REQUEST_EXIT_EMERGENCY_CALLBACK_MODE: ret = responseVoid(p); break;
case RIL_REQUEST_REPORT_SMS_MEMORY_STATUS: ret = responseVoid(p); break;
case RIL_REQUEST_REPORT_STK_SERVICE_IS_RUNNING: ret = responseVoid(p); break;
- case RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE: ret = responseInts(p); break;
+ case RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE: ret = responseVoid(p); break;
case RIL_REQUEST_ISIM_AUTHENTICATION: ret = responseString(p); break;
+ case RIL_REQUEST_ACKNOWLEDGE_INCOMING_GSM_SMS_WITH_PDU: ret = responseVoid(p); break;
+ case RIL_REQUEST_STK_SEND_ENVELOPE_WITH_STATUS: ret = responseICC_IO(p); break;
+ case RIL_REQUEST_VOICE_RADIO_TECH: ret = responseInts(p); break;
default:
throw new RuntimeException("Unrecognized solicited response: " + rr.mRequest);
//break;
@@ -834,4 +837,27 @@ protected Object responseGetPreferredNetworkType(Parcel p) {
return response;
}
+
+ @Override public void
+ getVoiceRadioTechnology(Message result) {
+ RILRequest rr = RILRequest.obtain(RIL_REQUEST_VOICE_RADIO_TECH, result);
+
+ if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
+
+ // RIL versions below 7 do not support this request
+ if (mRilVersion >= 7)
+ send(rr);
+ else
+ Log.d(LOG_TAG, "RIL_REQUEST_VOICE_RADIO_TECH blocked!!!");
+ }
+
+ @Override
+ public void getCdmaSubscriptionSource(Message response) {
+ RILRequest rr = RILRequest.obtain(
+ RILConstants.RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE, response);
+
+ if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest));
+ Log.d(LOG_TAG, "RIL_REQUEST_CDMA_GET_SUBSCRIPTION_SOURCE blocked!!!");
+ //send(rr);
+ }
}

0 comments on commit af8bab3

Please sign in to comment.