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

Commit 8a80769a authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Wi-Fi] Show not show Wi-Fi edit UI for never connected open Wi-Fi networks" into rvc-dev

parents 6fb4a18d 205b585c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -544,9 +544,11 @@ public class WifiSettings2 extends RestrictedSettingsFragment
            final WifiEntry selectedEntry =
                    ((LongPressWifiEntryPreference) preference).getWifiEntry();

            if (selectedEntry.getWifiConfiguration() != null) {
                if (!selectedEntry.getWifiConfiguration().getNetworkSelectionStatus()
                        .hasEverConnected()) {
            // 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;
                }