diff options
author | Paul Jensen <pauljensen@google.com> | 2015-07-13 15:19:51 -0400 |
---|---|---|
committer | Paul Jensen <pauljensen@google.com> | 2015-07-16 14:41:18 +0000 |
commit | f95d220308492550b7bd6c019e4c725a810cd050 (patch) | |
tree | 715a089acbb3b83e941aae85966521c1967c34bc /services/core/java/com/android/server/ConnectivityService.java | |
parent | 5d1654a9439f0ed81ecccecfacda34872270dfcb (diff) | |
download | frameworks_base-f95d220308492550b7bd6c019e4c725a810cd050.zip frameworks_base-f95d220308492550b7bd6c019e4c725a810cd050.tar.gz frameworks_base-f95d220308492550b7bd6c019e4c725a810cd050.tar.bz2 |
Disable WiFi autojoin when user decides via "Stay connected?" dialog
If the user selects "No" in the "Stay connected?" dialog box:
1. Disable autojoining that network in the future, and
2. Disassociate from that network.
Bug:22187193
Change-Id: I14dc9236c57e3ab7d3ec95edc906787cbfbf3c9f
Diffstat (limited to 'services/core/java/com/android/server/ConnectivityService.java')
-rw-r--r-- | services/core/java/com/android/server/ConnectivityService.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java index 2075c07..f57c17b 100644 --- a/services/core/java/com/android/server/ConnectivityService.java +++ b/services/core/java/com/android/server/ConnectivityService.java @@ -2363,14 +2363,10 @@ public class ConnectivityService extends IConnectivityManager.Stub } if (!accept) { - // Tell the NetworkAgent that the network does not have Internet access (because that's - // what we just told the user). This will hint to Wi-Fi not to autojoin this network in - // the future. We do this now because NetworkMonitor might not yet have finished - // validating and thus we might not yet have received an EVENT_NETWORK_TESTED. - nai.asyncChannel.sendMessage(NetworkAgent.CMD_REPORT_NETWORK_STATUS, - NetworkAgent.INVALID_NETWORK, 0, null); - // TODO: Tear the network down once we have determined how to tell WifiStateMachine not - // to reconnect to it immediately. http://b/20739299 + // Tell the NetworkAgent to not automatically reconnect to the network. + nai.asyncChannel.sendMessage(NetworkAgent.CMD_PREVENT_AUTOMATIC_RECONNECT); + // Teardown the nework. + teardownUnneededNetwork(nai); } } |