Merge "Don't auto-connect to networks that have no/limited connectivity." into qt-dev am: 4afb7f9b03

am: 7c74b37a97

Change-Id: Ia8b2e10f2792a22a91c6dfce82cc4cd9790c632c
This commit is contained in:
Lorenzo Colitti
2019-06-03 17:17:08 -07:00
committed by android-build-merger

View File

@@ -3647,6 +3647,13 @@ public class ConnectivityService extends IConnectivityManager.Stub
|| nai.networkMisc.acceptPartialConnectivity) { || nai.networkMisc.acceptPartialConnectivity) {
return; return;
} }
// Stop automatically reconnecting to this network in the future. Automatically connecting
// to a network that provides no or limited connectivity is not useful, because the user
// cannot use that network except through the notification shown by this method, and the
// notification is only shown if the network is explicitly selected by the user.
nai.asyncChannel.sendMessage(NetworkAgent.CMD_PREVENT_AUTOMATIC_RECONNECT);
// TODO: Evaluate if it's needed to wait 8 seconds for triggering notification when // TODO: Evaluate if it's needed to wait 8 seconds for triggering notification when
// NetworkMonitor detects the network is partial connectivity. Need to change the design to // NetworkMonitor detects the network is partial connectivity. Need to change the design to
// popup the notification immediately when the network is partial connectivity. // popup the notification immediately when the network is partial connectivity.