Merge "[Wi-Fi] Show Wi-Fi editor for authentication failures" into rvc-dev

This commit is contained in:
TreeHugger Robot
2020-04-28 14:21:14 +00:00
committed by Android (Google) Code Review

View File

@@ -544,14 +544,9 @@ public class WifiSettings2 extends RestrictedSettingsFragment
final WifiEntry selectedEntry =
((LongPressWifiEntryPreference) preference).getWifiEntry();
// If the clicked WiFi entry is never connected, launch Wi-Fi edit UI to edit password.
if (selectedEntry.getSecurity() != WifiEntry.SECURITY_NONE
&& selectedEntry.getSecurity() != WifiEntry.SECURITY_OWE) {
final WifiConfiguration config = selectedEntry.getWifiConfiguration();
if (config != null && !config.getNetworkSelectionStatus().hasEverConnected()) {
launchConfigNewNetworkFragment(selectedEntry);
return true;
}
if (selectedEntry.shouldEditBeforeConnect()) {
launchConfigNewNetworkFragment(selectedEntry);
return true;
}
connect(selectedEntry, true /* editIfNoConfig */, true /* fullScreenEdit */);