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

Commit fdd99cf9 authored by Nathan Harold's avatar Nathan Harold Committed by android-build-merger
Browse files

Merge "Always call processResponseDone() NATT Responses"

am: 8b29c937

Change-Id: Ibe3cac0ee740c1fb80b02268e68d1a5368f8787b
parents 15b1691f 8b29c937
Loading
Loading
Loading
Loading
+34 −35
Original line number Diff line number Diff line
@@ -1313,13 +1313,10 @@ public class RadioResponse extends IRadioResponse.Stub {
            android.hardware.radio.V1_1.KeepaliveStatus keepaliveStatus) {

        RILRequest rr = mRil.processResponse(responseInfo);

        if (rr == null) {
            return;
        }
        if (rr == null) return;

        KeepaliveStatus ret = null;

        try {
            switch(responseInfo.error) {
                case RadioError.NONE:
                    int convertedStatus = convertHalKeepaliveStatusCode(keepaliveStatus.code);
@@ -1342,26 +1339,28 @@ public class RadioResponse extends IRadioResponse.Stub {
                    ret = new KeepaliveStatus(KeepaliveStatus.ERROR_UNKNOWN);
                    break;
            }
        } finally {
            // If responseInfo.error != NONE, the processResponseDone sends the response message.
            mRil.processResponseDone(rr, responseInfo, ret);
        }
    }

    /**
     * @param responseInfo Response info struct containing response type, serial no. and error
     */
    public void stopKeepaliveResponse(RadioResponseInfo responseInfo) {
        RILRequest rr = mRil.processResponse(responseInfo);
        if (rr == null) return;

        if (rr == null) {
            return;
        }

        try {
            if (responseInfo.error == RadioError.NONE) {
                sendMessageResponse(rr.mResult, null);
            mRil.processResponseDone(rr, responseInfo, null);
            } else {
                //TODO: Error code translation
            }
        } finally {
            mRil.processResponseDone(rr, responseInfo, null);
        }
    }

    private int convertHalKeepaliveStatusCode(int halCode) {