From fd027ad997449055483ab3b40700dbbdd87143c7 Mon Sep 17 00:00:00 2001 From: Vinay Gannevaram Date: Tue, 19 Nov 2019 18:36:00 +0530 Subject: Wifi: Fix connectivity issues with PSK-SHA256+SAE mode APs Current PSK-SAE transition mode network identifier check using "PSK+SAE" sub-string but the sub-string not able to classify "PSK-SHA256+SAE" APs as PSK-SAE transition mode network. Due to this DUT cannot connect to such APs in PSK mode because the framework always targets the highest security. To resolve the issue consider network having both "PSK" and "SAE" sub- strings as PSK-SAE transition mode network. Also, added unit tests. Bug: 144773602 Bug: 144753662 Bug: 144737141 Test: atest ScanResultUtilTest Change-Id: Ida297a162edbed757556475dd4a9b75050054350 Merged-In: I2de88c7f4655de3f9946333fd4002e4b23749db8 Signed-off-by: Vinay Gannevaram --- service/java/com/android/server/wifi/util/ScanResultUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'service') diff --git a/service/java/com/android/server/wifi/util/ScanResultUtil.java b/service/java/com/android/server/wifi/util/ScanResultUtil.java index 39e9d2c40..b92483899 100644 --- a/service/java/com/android/server/wifi/util/ScanResultUtil.java +++ b/service/java/com/android/server/wifi/util/ScanResultUtil.java @@ -104,10 +104,10 @@ public class ScanResultUtil { /** * Helper method to check if the provided |scanResult| corresponds to PSK-SAE transition - * network. This checks if the provided capabilities string contains PSK+SAE or not. + * network. This checks if the provided capabilities string contains both PSK and SAE or not. */ public static boolean isScanResultForPskSaeTransitionNetwork(ScanResult scanResult) { - return scanResult.capabilities.contains("PSK+SAE"); + return scanResult.capabilities.contains("PSK") && scanResult.capabilities.contains("SAE"); } /** -- cgit v1.2.3