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

Commit aebcb7d7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge changes I57ae8086,I34becc46

* changes:
  Populate the interval millis for NattKeepalive
  Avoid Crash in NattKeepalive Error Response Case
parents 7509d926 3f55f05b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3951,6 +3951,7 @@ public class RIL extends BaseCommands implements CommandsInterface {
            appendPrimitiveArrayToArrayList(
                    packetData.dstAddress.getAddress(), req.destinationAddress);
            req.destinationPort = packetData.dstPort;
            req.maxKeepaliveIntervalMillis = intervalMillis;

            radioProxy11.startKeepalive(rr.mSerial, req);
        } catch (RemoteException | RuntimeException e) {
+4 −4
Original line number Diff line number Diff line
@@ -1328,12 +1328,12 @@ public class RadioResponse extends IRadioResponse.Stub {
                } else {
                    ret = new KeepaliveStatus(keepaliveStatus.sessionHandle, convertedStatus);
                }
                // If responseInfo.error is NONE, response function sends the response message
                // even if result is actually an error.
                sendMessageResponse(rr.mResult, ret);
                break;
            case RadioError.REQUEST_NOT_SUPPORTED:
                ret = new KeepaliveStatus(KeepaliveStatus.ERROR_UNSUPPORTED);
                // The request is unsupported, which is ok. We'll report it to the higher
                // layer and treat it as acceptable in the RIL.
                responseInfo.error = RadioError.NONE;
                break;
            case RadioError.NO_RESOURCES:
                ret = new KeepaliveStatus(KeepaliveStatus.ERROR_NO_RESOURCES);
@@ -1342,7 +1342,7 @@ public class RadioResponse extends IRadioResponse.Stub {
                ret = new KeepaliveStatus(KeepaliveStatus.ERROR_UNKNOWN);
                break;
        }
        sendMessageResponse(rr.mResult, ret);
        // If responseInfo.error != NONE, the processResponseDone sends the response message.
        mRil.processResponseDone(rr, responseInfo, ret);
    }