Use different response type for unsolicited mesg requiring
wakelock.
+ New type is added as ack from RIL java should be sent only for unsolicited mesgs
which hold wakelock in ril.cpp.
Bug: 22127517
Change-Id: Ib7e920d168ab92665283f80476bad3f5ede033e4
diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp
index 5a28087..b2f952c 100755
--- a/ril/libril/ril.cpp
+++ b/ril/libril/ril.cpp
@@ -90,6 +90,7 @@
#define RESPONSE_UNSOLICITED 1
#define RESPONSE_SOLICITED_ACK 2
#define RESPONSE_SOLICITED_ACK_EXP 3
+#define RESPONSE_UNSOLICITED_ACK_EXP 4
/* Negative values for private RIL errno's */
#define RIL_ERRNO_INVALID_RESPONSE -1
@@ -5397,7 +5398,12 @@
appendPrintBuf("[UNSL]< %s", requestToString(unsolResponse));
Parcel p;
- p.writeInt32 (RESPONSE_UNSOLICITED);
+ if (s_callbacks.version >= 13
+ && pRI->wakeType == WAKE_PARTIAL) {
+ p.writeInt32 (RESPONSE_UNSOLICITED_ACK_EXP);
+ } else {
+ p.writeInt32 (RESPONSE_UNSOLICITED);
+ }
p.writeInt32 (unsolResponse);
ret = pRI->responseFunction(p, const_cast<void*>(data), datalen);