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

Commit 6b19826b authored by junyulai's avatar junyulai
Browse files

Notify upper layer when trying to stop non-existing keepalive

Currently, KeepaliveTracker would expect event from network agent
for start/stop result. However, there is no event when failed to
find a valid keepalive. Thus, KeepaliveTracker would unable to
release slots if previously failed to start keepalive on mobile
data.

Bug: 135510870
Test: 1. atest FrameworksTelephonyTests
      2. atest android.net.cts.ConnectivityManagerTest \
         #testSocketKeepaliveLimitTelephony

Change-Id: I76a0cc117fb7a9071137de73ee5bb5494a397b9b
parent 1c25c6fa
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2152,6 +2152,7 @@ public class DataConnection extends StateMachine {
                    int handle = mNetworkAgent.keepaliveTracker.getHandleForSlot(slotId);
                    if (handle < 0) {
                        loge("No slot found for stopSocketKeepalive! " + slotId);
                        mNetworkAgent.onSocketKeepaliveEvent(slotId, SocketKeepalive.NO_KEEPALIVE);
                        retVal = HANDLED;
                        break;
                    } else {