Merge "RIL: release unsol wakelock" into nyc-dev
diff --git a/libril/ril.cpp b/libril/ril.cpp
index 94af22c..c283eaf 100755
--- a/libril/ril.cpp
+++ b/libril/ril.cpp
@@ -533,6 +533,13 @@
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;
+ }
+
if (request < 1 || request >= (int32_t)NUM_ELEMS(s_commands)) {
Parcel pErr;
RLOGE("unsupported request code %d token %d", request, token);
@@ -545,14 +552,6 @@
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));
if (pRI == NULL) {
RLOGE("Memory allocation failed for request %s", requestToString(request));