From 73c168162b7738afde5a3944464e10e0e8d80872 Mon Sep 17 00:00:00 2001 From: Quang Luong Date: Tue, 14 Jan 2020 15:58:34 -0800 Subject: [PATCH] Remove WifiEntry transitional security types WifiEntry should only supply one security type through getSecurity(), and transitional types should be converted to the security type that will be used for connection. Test: build Bug: 70983952 Change-Id: I977f6b955b7794124e9b90ad4655cd2a2a30cb6e --- src/com/android/settings/wifi/WifiConfigController2.java | 2 +- src/com/android/settings/wifi/dpp/WifiDppUtils.java | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/com/android/settings/wifi/WifiConfigController2.java b/src/com/android/settings/wifi/WifiConfigController2.java index 90f1397de9f..da55716d9ec 100644 --- a/src/com/android/settings/wifi/WifiConfigController2.java +++ b/src/com/android/settings/wifi/WifiConfigController2.java @@ -277,7 +277,7 @@ public class WifiConfigController2 implements TextWatcher, mHiddenSettingsSpinner.getSelectedItemPosition() == NOT_HIDDEN_NETWORK ? View.GONE : View.VISIBLE); - mSecurityInPosition = new Integer[WifiEntry.SECURITY_MAX_VAL]; + mSecurityInPosition = new Integer[WifiEntry.NUM_SECURITY_TYPES]; if (mWifiEntry == null) { // new network configureSecuritySpinner(); diff --git a/src/com/android/settings/wifi/dpp/WifiDppUtils.java b/src/com/android/settings/wifi/dpp/WifiDppUtils.java index 8862830408e..c227e77a613 100644 --- a/src/com/android/settings/wifi/dpp/WifiDppUtils.java +++ b/src/com/android/settings/wifi/dpp/WifiDppUtils.java @@ -252,11 +252,6 @@ public class WifiDppUtils { final WifiConfiguration wifiConfiguration = wifiEntry.getWifiConfiguration(); setConfiguratorIntentExtra(intent, wifiManager, wifiConfiguration); - // For a transition mode Wi-Fi AP, creates a QR code that's compatible with more devices - if (wifiEntry.getSecurity() == WifiEntry.SECURITY_PSK_SAE_TRANSITION) { - intent.putExtra(EXTRA_WIFI_SECURITY, WifiQrCode.SECURITY_WPA_PSK); - } - return intent; }