Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f7474dd authored by Wink Saville's avatar Wink Saville Committed by Android Code Review
Browse files

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

parents 2b858cae 60bb9c9a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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();