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

Commit 2404b4d1 authored by Junyu Lai's avatar Junyu Lai Committed by android-build-merger
Browse files

Merge "Remove dead KeepaliveInfo if it cannot be started" am: db4ce870

am: 346e7b65

Change-Id: I61f441237fcaadc5abc5592e7a63e4d35282def5
parents 2ca942bc 346e7b65
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -185,13 +185,13 @@ public class KeepaliveTracker {
        }

        void start(int slot) {
            mSlot = slot;
            int error = isValid();
            if (error == SUCCESS) {
                mSlot = slot;
                Log.d(TAG, "Starting keepalive " + mSlot + " on " + mNai.name());
                mNai.asyncChannel.sendMessage(CMD_START_PACKET_KEEPALIVE, slot, mInterval, mPacket);
            } else {
                notifyMessenger(NO_KEEPALIVE, error);
                handleStopKeepalive(mNai, mSlot, error);
                return;
            }
        }
@@ -277,6 +277,7 @@ public class KeepaliveTracker {
            return;
        }
        ki.stop(reason);
        Log.d(TAG, "Stopped keepalive " + slot + " on " + networkName);
        networkKeepalives.remove(slot);
        if (networkKeepalives.isEmpty()) {
            mKeepalives.remove(nai);