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

Commit c6d66486 authored by Chalard Jean's avatar Chalard Jean Committed by Aaron Huang
Browse files

Address further API council comments.

Test: FrameworksNetTests NetworkStackTests
Bug: 152238712
Change-Id: Ifd93d2ae0fc14bef83d2bcb92ca3b79c13c14800
Merged-In: Ifd93d2ae0fc14bef83d2bcb92ca3b79c13c14800
parent 17fbd4dc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import com.android.telephony.Rlog;

import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.time.Duration;

/**
 * This class represents a network agent which is communication channel between
@@ -283,7 +284,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!");
@@ -292,7 +293,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);
        }