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

Commit b7b68cb3 authored by Chalard Jean's avatar Chalard Jean Committed by Gerrit Code Review
Browse files

Merge changes from topics "api-fix-networkagent", "satisfiedby"

* changes:
  Address further API council comments.
  Address further API council comments.
parents c3f8f13e c6d66486
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2157,7 +2157,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
@@ -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);
        }