[Wi-Fi] Show Wi-Fi editor for authentication failures
When the Wi-Fi network is disabled because of authentication failures, Wi-Fi picker should show editor before connecting or the network will always fail to connect. Bug: 112137755 Test: atest com.android.wifitrackerlib.StandardWifiEntryTest Change-Id: I0ae42e7974e6bd2548e7f2595c6ae71a73398030
This commit is contained in:
@@ -544,14 +544,9 @@ public class WifiSettings2 extends RestrictedSettingsFragment
|
|||||||
final WifiEntry selectedEntry =
|
final WifiEntry selectedEntry =
|
||||||
((LongPressWifiEntryPreference) preference).getWifiEntry();
|
((LongPressWifiEntryPreference) preference).getWifiEntry();
|
||||||
|
|
||||||
// If the clicked WiFi entry is never connected, launch Wi-Fi edit UI to edit password.
|
if (selectedEntry.shouldEditBeforeConnect()) {
|
||||||
if (selectedEntry.getSecurity() != WifiEntry.SECURITY_NONE
|
launchConfigNewNetworkFragment(selectedEntry);
|
||||||
&& selectedEntry.getSecurity() != WifiEntry.SECURITY_OWE) {
|
return true;
|
||||||
final WifiConfiguration config = selectedEntry.getWifiConfiguration();
|
|
||||||
if (config != null && !config.getNetworkSelectionStatus().hasEverConnected()) {
|
|
||||||
launchConfigNewNetworkFragment(selectedEntry);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(selectedEntry, true /* editIfNoConfig */, true /* fullScreenEdit */);
|
connect(selectedEntry, true /* editIfNoConfig */, true /* fullScreenEdit */);
|
||||||
|
Reference in New Issue
Block a user