summaryrefslogtreecommitdiffstats
path: root/telephony/java
diff options
context:
space:
mode:
authorWink Saville <wink@google.com>2010-12-08 22:00:58 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2010-12-08 22:00:58 -0800
commit3345f27fbfb29fdcbdf77e311aa8ad0d4956f1cd (patch)
treeeb8407e680bc22807bc01629bb691330364b5d20 /telephony/java
parent5a242ec2cf54e1bda69c2451304181ef1bc3e872 (diff)
parentcc41b92ed7e66cc5d4e14f22b3ea914175d662ec (diff)
downloadframeworks_base-3345f27fbfb29fdcbdf77e311aa8ad0d4956f1cd.zip
frameworks_base-3345f27fbfb29fdcbdf77e311aa8ad0d4956f1cd.tar.gz
frameworks_base-3345f27fbfb29fdcbdf77e311aa8ad0d4956f1cd.tar.bz2
am cc41b92e: am 0a5ae453: am 7f7474dd: Merge "frameworks/base/telephony: Release wakelock on RIL request send error"
* commit 'cc41b92ed7e66cc5d4e14f22b3ea914175d662ec': frameworks/base/telephony: Release wakelock on RIL request send error
Diffstat (limited to 'telephony/java')
-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 916602f..c97ba6e 100644
--- a/telephony/java/com/android/internal/telephony/RIL.java
+++ b/telephony/java/com/android/internal/telephony/RIL.java
@@ -359,6 +359,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) {
@@ -2026,6 +2031,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();