From 49f8e63e3762cb566d3d92544d32ecb865295c56 Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Sat, 12 Dec 2015 18:02:21 +1100 Subject: i9300: bring SamsungExynos4RIL inline with frameworks Change-Id: Id4fb54e855c817ce9460e2583168776c6a9ea612 --- .../internal/telephony/SamsungExynos4RIL.java | 30 ++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java b/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java index 9571aaa..c39dc90 100644 --- a/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java +++ b/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java @@ -25,6 +25,7 @@ import android.os.Handler; import android.os.Message; import android.os.Parcel; import android.os.Registrant; +import android.telephony.ModemActivityInfo; import android.telephony.Rlog; import android.telephony.PhoneNumberUtils; @@ -297,6 +298,12 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface { case RIL_REQUEST_GET_HARDWARE_CONFIG: ret = responseHardwareConfig(p); break; case RIL_REQUEST_SIM_AUTHENTICATION: ret = responseICC_IOBase64(p); break; case RIL_REQUEST_SHUTDOWN: ret = responseVoid(p); break; + case RIL_REQUEST_GET_RADIO_CAPABILITY: ret = responseRadioCapability(p); break; + case RIL_REQUEST_SET_RADIO_CAPABILITY: ret = responseRadioCapability(p); break; + case RIL_REQUEST_START_LCE: ret = responseLceStatus(p); break; + case RIL_REQUEST_STOP_LCE: ret = responseLceStatus(p); break; + case RIL_REQUEST_PULL_LCEDATA: ret = responseLceData(p); break; + case RIL_REQUEST_GET_ACTIVITY_INFO: ret = responseActivityData(p); break; default: throw new RuntimeException("Unrecognized solicited response: " + rr.mRequest); //break; @@ -354,10 +361,29 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface { mIccStatusChangedRegistrants.notifyRegistrants(); } break; + case RIL_REQUEST_GET_RADIO_CAPABILITY: { + // Ideally RIL's would support this or at least give NOT_SUPPORTED + // but the hammerhead RIL reports GENERIC :( + // TODO - remove GENERIC_FAILURE catching: b/21079604 + if (REQUEST_NOT_SUPPORTED == error || + GENERIC_FAILURE == error) { + // we should construct the RAF bitmask the radio + // supports based on preferred network bitmasks + ret = makeStaticRadioCapability(); + error = 0; + } + break; + } + case RIL_REQUEST_GET_ACTIVITY_INFO: + ret = new ModemActivityInfo(0, 0, 0, + new int [ModemActivityInfo.TX_POWER_LEVELS], 0, 0); + error = 0; + break; } - rr.onError(error, ret); - } else { + if (error != 0) rr.onError(error, ret); + } + if (error == 0) { if (RILJ_LOGD) riljLog(rr.serialString() + "< " + requestToString(rr.mRequest) + " " + retToString(rr.mRequest, ret)); -- cgit v1.1