am 7f7474dd: Merge "frameworks/base/telephony: Release wakelock on RIL request send error"
* commit '7f7474ddd6170b68b8b58cc03b75df85c96f08f2': frameworks/base/telephony: Release wakelock on RIL request send error
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user