summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorRoshan Pius <rpius@google.com>2017-03-14 08:54:56 -0700
committerRoshan Pius <rpius@google.com>2017-03-14 10:19:33 -0700
commita1727e40dc6b2742df5b32451f1dfa787fc6aa98 (patch)
treead7d56c0caee303736d010cc75781205e98b4dcb /service
parent9ca3944e48689ee1d72eed1ed27bc19ecea2c039 (diff)
WifiStateMachine: Note user selection only for settings app
The previous CL for this bug also modified the user selection when we let non-settings app to initiate connection. This bug CL reverts that, non-settings app can only initiate connection, but not set user connect choice. Bug: 36040264 Test: Unit tests Change-Id: If70fe974274277bd804f5cc17a5751dee76f44e3
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/WifiStateMachine.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/service/java/com/android/server/wifi/WifiStateMachine.java b/service/java/com/android/server/wifi/WifiStateMachine.java
index 7840b09ec..a5dc9375f 100644
--- a/service/java/com/android/server/wifi/WifiStateMachine.java
+++ b/service/java/com/android/server/wifi/WifiStateMachine.java
@@ -1266,10 +1266,11 @@ public class WifiStateMachine extends StateMachine implements WifiNative.WifiRss
|| !mWifiConfigManager.checkAndUpdateLastConnectUid(netId, uid)) {
logi("connectToUserSelectNetwork Allowing uid " + uid
+ " with insufficient permissions to connect=" + netId);
+ } else {
+ // Note user connect choice here, so that it will be considered in the next network
+ // selection.
+ mWifiConnectivityManager.setUserConnectChoice(netId);
}
- // Trigger an immediate connection to the specified network. We're also noting the user
- // connect choice here, so that it will be considered in the next network selection.
- mWifiConnectivityManager.setUserConnectChoice(netId);
if (mWifiInfo.getNetworkId() == netId) {
// We're already connected to the user specified network, don't trigger a
// reconnection.