Loading services/core/java/com/android/server/ConnectivityService.java +3 −3 Original line number Diff line number Diff line Loading @@ -4699,9 +4699,6 @@ public class ConnectivityService extends IConnectivityManager.Stub if (VDBG) log(" accepting network in place of " + currentNetwork.name()); currentNetwork.removeRequest(nri.request.requestId); currentNetwork.lingerRequest(nri.request, now, mLingerDelayMs); if (isDefaultRequest(nri)) { mLingerMonitor.noteLingerDefaultNetwork(currentNetwork, newNetwork); } affectedNetworks.add(currentNetwork); } else { if (VDBG) log(" accepting network in place of null"); Loading @@ -4722,6 +4719,9 @@ public class ConnectivityService extends IConnectivityManager.Stub if (isDefaultRequest(nri)) { isNewDefault = true; oldDefaultNetwork = currentNetwork; if (currentNetwork != null) { mLingerMonitor.noteLingerDefaultNetwork(currentNetwork, newNetwork); } } } } else if (newNetwork.isSatisfyingRequest(nri.request.requestId)) { Loading services/core/java/com/android/server/connectivity/LingerMonitor.java +6 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,12 @@ public class LingerMonitor { return; } // Only show the notification if we switched away because a network became unvalidated, not // because its score changed. // TODO: instead of just skipping notification, keep a note of it, and show it if it becomes // unvalidated. if (fromNai.lastValidated) return; if (isNotificationEnabled(fromNai, toNai)) { notify(fromNai, toNai, forceToast); } Loading Loading
services/core/java/com/android/server/ConnectivityService.java +3 −3 Original line number Diff line number Diff line Loading @@ -4699,9 +4699,6 @@ public class ConnectivityService extends IConnectivityManager.Stub if (VDBG) log(" accepting network in place of " + currentNetwork.name()); currentNetwork.removeRequest(nri.request.requestId); currentNetwork.lingerRequest(nri.request, now, mLingerDelayMs); if (isDefaultRequest(nri)) { mLingerMonitor.noteLingerDefaultNetwork(currentNetwork, newNetwork); } affectedNetworks.add(currentNetwork); } else { if (VDBG) log(" accepting network in place of null"); Loading @@ -4722,6 +4719,9 @@ public class ConnectivityService extends IConnectivityManager.Stub if (isDefaultRequest(nri)) { isNewDefault = true; oldDefaultNetwork = currentNetwork; if (currentNetwork != null) { mLingerMonitor.noteLingerDefaultNetwork(currentNetwork, newNetwork); } } } } else if (newNetwork.isSatisfyingRequest(nri.request.requestId)) { Loading
services/core/java/com/android/server/connectivity/LingerMonitor.java +6 −0 Original line number Diff line number Diff line Loading @@ -242,6 +242,12 @@ public class LingerMonitor { return; } // Only show the notification if we switched away because a network became unvalidated, not // because its score changed. // TODO: instead of just skipping notification, keep a note of it, and show it if it becomes // unvalidated. if (fromNai.lastValidated) return; if (isNotificationEnabled(fromNai, toNai)) { notify(fromNai, toNai, forceToast); } Loading