summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSooraj Sasindran <ssasin@codeaurora.org>2016-05-06 16:19:56 -0700
committerChristopher N. Hesse <raymanfx@gmail.com>2016-10-12 13:01:10 -0700
commitcfef9bd422ad14abfcece580dc36ad064980c234 (patch)
tree79f183af4363bee482644164e997631582ff6e64
parent0af7d1c98c806f69ffc4465718c80c59483224a6 (diff)
downloadandroid_hardware_samsung-cfef9bd422ad14abfcece580dc36ad064980c234.tar.gz
android_hardware_samsung-cfef9bd422ad14abfcece580dc36ad064980c234.tar.bz2
android_hardware_samsung-cfef9bd422ad14abfcece580dc36ad064980c234.zip
RIL: release unsol wakelock
Make sure to release unsol wakelock BUG=28635279 Change-Id: I4bdf0e7b35df4e6aa077b062ab359c6938ce8292
-rwxr-xr-xril/libril/ril.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/ril/libril/ril.cpp b/ril/libril/ril.cpp
index 6711f18..7f086d1 100755
--- a/ril/libril/ril.cpp
+++ b/ril/libril/ril.cpp
@@ -563,6 +563,13 @@ processCommandBuffer(void *buffer, size_t buflen, RIL_SOCKET_ID socket_id) {
pCI = &(s_commands[request]);
}
+ // Received an Ack for the previous result sent to RIL.java,
+ // so release wakelock and exit
+ if (request == RIL_RESPONSE_ACKNOWLEDGEMENT) {
+ releaseWakeLock();
+ return 0;
+ }
+
if (pCI == NULL) {
Parcel pErr;
RLOGE("unsupported request code %d token %d", request, token);
@@ -575,14 +582,7 @@ processCommandBuffer(void *buffer, size_t buflen, RIL_SOCKET_ID socket_id) {
return 0;
}
- // Received an Ack for the previous result sent to RIL.java,
- // so release wakelock and exit
- if (request == RIL_RESPONSE_ACKNOWLEDGEMENT) {
- releaseWakeLock();
- return 0;
- }
-
- pRI = (RequestInfo *)calloc(1, sizeof(RequestInfo));
+ pRI = (RequestInfo *)calloc(1, sizeof(RequestInfo));
if (pRI == NULL) {
RLOGE("Memory allocation failed for request %s", requestToString(request));
return 0;