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

Commit daefcdb8 authored by Chalard Jean's avatar Chalard Jean
Browse files

Address further API council comments.

Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: Ifd93d2ae0fc14bef83d2bcb92ca3b79c13c14800
parent fc1c66a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2158,7 +2158,7 @@ public class DataConnection extends StateMachine {
                // All network agents start out in CONNECTING mode, but DcNetworkAgents are
                // created when the network is already connected. Hence, send the connected
                // notification immediately.
                mNetworkAgent.setConnected();
                mNetworkAgent.markConnected();
            }

            if (mTransportType == AccessNetworkConstants.TRANSPORT_TYPE_WWAN) {
+3 −2
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ import com.android.telephony.Rlog;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
@@ -315,7 +316,7 @@ public class DcNetworkAgent extends NetworkAgent {
    }

    @Override
    public synchronized void onStartSocketKeepalive(int slot, int intervalSeconds,
    public synchronized void onStartSocketKeepalive(int slot, @NonNull Duration interval,
            @NonNull KeepalivePacketData packet) {
        if (mDataConnection == null) {
            loge("onStartSocketKeepalive called on no-owner DcNetworkAgent!");
@@ -324,7 +325,7 @@ public class DcNetworkAgent extends NetworkAgent {

        if (packet instanceof NattKeepalivePacketData) {
            mDataConnection.obtainMessage(DataConnection.EVENT_KEEPALIVE_START_REQUEST,
                    slot, intervalSeconds, packet).sendToTarget();
                    slot, (int) interval.getSeconds(), packet).sendToTarget();
        } else {
            sendSocketKeepaliveEvent(slot, SocketKeepalive.ERROR_UNSUPPORTED);
        }