summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-05-15 21:13:57 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-05-15 21:13:57 +0000
commitf339436f90a7cd63f2aceeed35f8bdd685e467cf (patch)
tree4cc6644d61543929529df1c8ed32c38e363a6640 /service
parent53feab9d72b0213982722cc861dbcbd16b4f40ee (diff)
parent9d8bc7f0dfb352e3369c26c1e6e5a697b75dfa31 (diff)
Merge "[PSK/EAP] Do not add SHA256 Key mgmt for SupplicantHal < 1.2" into qt-dev
Diffstat (limited to 'service')
-rw-r--r--service/java/com/android/server/wifi/SupplicantStaNetworkHal.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
index 059ea797c..9255fc231 100644
--- a/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
+++ b/service/java/com/android/server/wifi/SupplicantStaNetworkHal.java
@@ -3012,6 +3012,14 @@ public class SupplicantStaNetworkHal {
private BitSet addSha256KeyMgmtFlags(BitSet keyManagementFlags) {
synchronized (mLock) {
BitSet modifiedFlags = (BitSet) keyManagementFlags.clone();
+ android.hardware.wifi.supplicant.V1_2.ISupplicantStaNetwork
+ iSupplicantStaNetworkV12;
+ iSupplicantStaNetworkV12 = getV1_2StaNetwork();
+ if (iSupplicantStaNetworkV12 == null) {
+ // SHA256 key management requires HALv1.2 or higher
+ return modifiedFlags;
+ }
+
if (keyManagementFlags.get(WifiConfiguration.KeyMgmt.WPA_PSK)) {
modifiedFlags.set(WifiConfiguration.KeyMgmt.WPA_PSK_SHA256);
}