summaryrefslogtreecommitdiffstats
path: root/telephony
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2010-12-08 21:37:38 -0800
committerAndroid Code Review <code-review@android.com>2010-12-08 21:37:38 -0800
commit7f7474ddd6170b68b8b58cc03b75df85c96f08f2 (patch)
tree9093704a231b19e3588144bf8313cb0ca467cee9 /telephony
parent2b858caecb3c293c47b48eed12a55a49e3039874 (diff)
parent60bb9c9a81bcd766d3e79f765ac22c7c38492409 (diff)
downloadframeworks_base-7f7474ddd6170b68b8b58cc03b75df85c96f08f2.zip
frameworks_base-7f7474ddd6170b68b8b58cc03b75df85c96f08f2.tar.gz
frameworks_base-7f7474ddd6170b68b8b58cc03b75df85c96f08f2.tar.bz2
Merge "frameworks/base/telephony: Release wakelock on RIL request send error"
Diffstat (limited to 'telephony')
-rw-r--r--telephony/java/com/android/internal/telephony/RIL.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/RIL.java b/telephony/java/com/android/internal/telephony/RIL.java
index 2f7aa21..af483db 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -360,6 +360,11 @@ public final class RIL extends BaseCommands implements CommandsInterface {
rr.onError(GENERIC_FAILURE, null);
rr.release();
}
+ } finally {
+ // Note: We are "Done" only if there are no outstanding
+ // requests or replies. Thus this code path will only release
+ // the wake lock on errors.
+ releaseWakeLockIfDone();
}
if (!alreadySubtracted) {
@@ -2044,6 +2049,12 @@ public final class RIL extends BaseCommands implements CommandsInterface {
send(RILRequest rr) {
Message msg;
+ if (mSocket == null) {
+ rr.onError(RADIO_NOT_AVAILABLE, null);
+ rr.release();
+ return;
+ }
+
msg = mSender.obtainMessage(EVENT_SEND, rr);
acquireWakeLock();