follow up aosp/2600007
Comment change to address nit in aosp/2600007.
Test: No test, only comment changes.
Change-Id: Ifbed198340cdd8cc5f0738ba491462757e02017f
diff --git a/service/src/com/android/server/connectivity/KeepaliveTracker.java b/service/src/com/android/server/connectivity/KeepaliveTracker.java
index cbf091b..1378293 100644
--- a/service/src/com/android/server/connectivity/KeepaliveTracker.java
+++ b/service/src/com/android/server/connectivity/KeepaliveTracker.java
@@ -526,8 +526,12 @@
if (networkKeepalives != null) {
final ArrayList<KeepaliveInfo> kalist = new ArrayList(networkKeepalives.values());
for (KeepaliveInfo ki : kalist) {
- // Check if keepalive is already stopped
+ // If the keepalive is paused, then it is already stopped with the hardware and so
+ // continue. Note that to send the appropriate stop reason callback,
+ // AutomaticOnOffKeepaliveTracker will call finalizePausedKeepalive which will also
+ // finally remove this keepalive slot from the array.
if (ki.mStopReason == SUCCESS_PAUSED) continue;
+
ki.stop(reason);
// Clean up keepalives since the network agent is disconnected and unable to pass
// back asynchronous result of stop().