Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69653f05 authored by Arc Wang's avatar Arc Wang
Browse files

[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
parent b33a59b8
Loading
Loading
Loading
Loading
+3 −8
Original line number Diff line number Diff line
@@ -544,15 +544,10 @@ 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()) {
            if (selectedEntry.shouldEditBeforeConnect()) {
                launchConfigNewNetworkFragment(selectedEntry);
                return true;
            }
            }

            connect(selectedEntry, true /* editIfNoConfig */, true /* fullScreenEdit */);
        } else if (preference == mAddWifiNetworkPreference) {