Merge "frameworks/base/telephony: Release wakelock on RIL request send error"

This commit is contained in:
Wink Saville
2010-12-08 21:37:38 -08:00
committed by Android Code Review

View File

@@ -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();