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

Commit 346e7b65 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

Change-Id: I7ec41627065d21d025370905257483738ee04c42
parents d2f906a6 db4ce870
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);