summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Shields <keepcalm444@gmail.com>2016-09-01 00:02:10 +1000
committerSimon Shields <keepcalm444@gmail.com>2016-10-28 03:14:33 +1100
commit60efd4579898751b6a1682e2b21089f03b6df879 (patch)
tree073f0713e74227dc741640778dab25ff0daf39b9
parentd2550c07ad77f460b4b7f6789a23aaa6c8711d68 (diff)
SamsungExynos4RIL: Update for N
Change-Id: I9eac1f690a955c746de6f8dbad52afe9b18120a8
-rw-r--r--ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java33
1 files changed, 29 insertions, 4 deletions
diff --git a/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java b/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java
index 8aaca62..a9f6b3a 100644
--- a/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java
+++ b/ril/telephony/java/com/android/internal/telephony/SamsungExynos4RIL.java
@@ -141,7 +141,7 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface {
@Override
- protected RILRequest processSolicited (Parcel p) {
+ protected RILRequest processSolicited (Parcel p, int type) {
int serial, error;
boolean found = false;
@@ -158,6 +158,19 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface {
return null;
}
+ if (getRilVersion() >= 13 && type == RESPONSE_SOLICITED_ACK_EXP) {
+ Message msg;
+ RILRequest response = RILRequest.obtain(RIL_RESPONSE_ACKNOWLEDGEMENT, null);
+ msg = mSender.obtainMessage(EVENT_SEND_ACK, response);
+ acquireWakeLock(rr, FOR_ACK_WAKELOCK);
+ msg.sendToTarget();
+ if (RILJ_LOGD) {
+ riljLog("Response received for " + rr.serialString() + " " +
+ requestToString(rr.mRequest) + " Sending ack to ril.cpp");
+ }
+ }
+
+
Object ret = null;
if (error == 0 || p.dataAvail() > 0) {
@@ -296,7 +309,6 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface {
case RIL_REQUEST_SIM_OPEN_CHANNEL: ret = responseInts(p); break;
case RIL_REQUEST_SIM_CLOSE_CHANNEL: ret = responseVoid(p); break;
case RIL_REQUEST_SIM_TRANSMIT_APDU_CHANNEL: ret = responseICC_IO(p); break;
- case RIL_REQUEST_SIM_GET_ATR: ret = responseString(p); break;
case RIL_REQUEST_NV_READ_ITEM: ret = responseString(p); break;
case RIL_REQUEST_NV_WRITE_ITEM: ret = responseVoid(p); break;
case RIL_REQUEST_NV_WRITE_CDMA_PRL: ret = responseVoid(p); break;
@@ -446,11 +458,24 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface {
@Override
protected void
- processUnsolicited (Parcel p) {
+ processUnsolicited (Parcel p, int type) {
int dataPosition = p.dataPosition();
int response = p.readInt();
Object ret;
+ // Follow new symantics of sending an Ack starting from RIL version 13
+ if (getRilVersion() >= 13 && type == RESPONSE_UNSOLICITED_ACK_EXP) {
+ Message msg;
+ RILRequest rr = RILRequest.obtain(RIL_RESPONSE_ACKNOWLEDGEMENT, null);
+ msg = mSender.obtainMessage(EVENT_SEND_ACK, rr);
+ acquireWakeLock(rr, FOR_ACK_WAKELOCK);
+ msg.sendToTarget();
+ if (RILJ_LOGD) {
+ riljLog("Unsol response received for " + responseToString(response) +
+ " Sending ack to ril.cpp");
+ }
+ }
+
try{switch(response) {
case RIL_UNSOL_STK_PROACTIVE_COMMAND: ret = responseString(p); break;
case RIL_UNSOL_STK_SEND_SMS_RESULT: ret = responseInts(p); break; // Samsung STK
@@ -459,7 +484,7 @@ public class SamsungExynos4RIL extends RIL implements CommandsInterface {
p.setDataPosition(dataPosition);
// Forward responses that we are not overriding to the super class
- super.processUnsolicited(p);
+ super.processUnsolicited(p, type);
return;
}} catch (Throwable tr) {
Rlog.e(RILJ_LOG_TAG, "Exception processing unsol response: " + response +