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

Commit b1438f64 authored by Amit Mahajan's avatar Amit Mahajan
Browse files

Change to not send error response twice.

resetProxyAndRequestList() sends the error response.
Also includes fixes for OemHookProxy handling when service dies.

Test: Basic telephony sanity
Bug: 35910123
Change-Id: I23d4b3495523ba0a5bc5fe619b525a2d1fbba5f4
parent c95d8bc1
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -438,6 +438,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {
                        // todo: rild should be back up since message was sent with a delay. this is
                        // a hack.
                        getRadioProxy(null);
                        getOemHookProxy(null);
                    }
                    break;
            }
@@ -672,7 +673,7 @@ public final class RIL extends BaseCommands implements CommandsInterface {

    private IRadio getRadioProxy(Message result) {
        if (!mIsMobileNetworkSupported) {
            if (RILJ_LOGV) riljLog("Not calling getService(): wifi-only");
            if (RILJ_LOGV) riljLog("getRadioProxy: Not calling getService(): wifi-only");
            return null;
        }

@@ -708,6 +709,11 @@ public final class RIL extends BaseCommands implements CommandsInterface {
    }

    private IOemHook getOemHookProxy(Message result) {
        if (!mIsMobileNetworkSupported) {
            if (RILJ_LOGV) riljLog("getOemHookProxy: Not calling getService(): wifi-only");
            return null;
        }

        if (mOemHookProxy != null) {
            return mOemHookProxy;
        }
@@ -828,10 +834,6 @@ public final class RIL extends BaseCommands implements CommandsInterface {

    private void handleRadioProxyExceptionForRR(RILRequest rr, String caller, Exception e) {
        riljLoge(caller, e);
        rr.onError(RADIO_NOT_AVAILABLE, null);
        decrementWakeLock(rr);
        rr.release();

        resetProxyAndRequestList();
    }