summaryrefslogtreecommitdiffstats
path: root/service/java/com/android/server/wifi/WifiConfigStore.java
diff options
context:
space:
mode:
authorRebecca Silberstein <silberst@google.com>2016-04-12 10:42:43 -0700
committerRebecca Silberstein <silberst@google.com>2016-04-12 10:47:58 -0700
commiteaea4b75c2ecfd192d5dcefcf67bb851bf031f5e (patch)
treee92d376b189496dff11cf4ff669f35fe42149e86 /service/java/com/android/server/wifi/WifiConfigStore.java
parent7f8d45b1a56d7c6f2702aabb84e0eba597b525b0 (diff)
downloadandroid_frameworks_opt_net_wifi-eaea4b75c2ecfd192d5dcefcf67bb851bf031f5e.tar.gz
android_frameworks_opt_net_wifi-eaea4b75c2ecfd192d5dcefcf67bb851bf031f5e.tar.bz2
android_frameworks_opt_net_wifi-eaea4b75c2ecfd192d5dcefcf67bb851bf031f5e.zip
WifiConfigStore: read requirePMF config variable
When saving a wifi configuration, we set the requirePMF variable from the config, but it is never read back. Add the getNetworkVariable call for pmfVarName and add a call to verify the attempt to read it back in the WifiConfigManagerTest. Additionally fixed a checkstyle issue for unused imports. BUG: 28088226 Change-Id: Ib7b2ba796e31ae57273c34b6845c218419125b72
Diffstat (limited to 'service/java/com/android/server/wifi/WifiConfigStore.java')
-rw-r--r--service/java/com/android/server/wifi/WifiConfigStore.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/service/java/com/android/server/wifi/WifiConfigStore.java b/service/java/com/android/server/wifi/WifiConfigStore.java
index d50ddfe47..8b4535ebf 100644
--- a/service/java/com/android/server/wifi/WifiConfigStore.java
+++ b/service/java/com/android/server/wifi/WifiConfigStore.java
@@ -16,7 +16,6 @@
package com.android.server.wifi;
-import android.app.backup.BackupManager;
import android.net.IpConfiguration.IpAssignment;
import android.net.IpConfiguration.ProxySettings;
import android.net.wifi.WifiConfiguration;
@@ -27,7 +26,6 @@ import android.net.wifi.WpsInfo;
import android.net.wifi.WpsResult;
import android.os.FileObserver;
import android.os.Process;
-import android.os.SystemClock;
import android.security.Credentials;
import android.security.KeyChain;
import android.security.KeyStore;
@@ -371,6 +369,15 @@ public class WifiConfigStore {
}
}
+ value = mWifiNative.getNetworkVariable(netId, WifiConfiguration.pmfVarName);
+ config.requirePMF = false;
+ if (!TextUtils.isEmpty(value)) {
+ try {
+ config.requirePMF = Integer.parseInt(value) != 0;
+ } catch (NumberFormatException ignore) {
+ }
+ }
+
value = mWifiNative.getNetworkVariable(netId, WifiConfiguration.wepTxKeyIdxVarName);
config.wepTxKeyIndex = -1;
if (!TextUtils.isEmpty(value)) {