[Wi-Fi] Edit a never connected WifiEntryPreference in WifiSettings2
If the Wi-Fi network is never connected after it's saved, edit it instead of connecting when users click the WifiEntryPreference. Bug: 143328194 Test: manual Click a saved wrong password Wi-Fi network Change-Id: If974ce9225fe6b6ed5f8a3c6c0ff619532acc1c2
This commit is contained in:
@@ -564,6 +564,15 @@ public class WifiSettings2 extends RestrictedSettingsFragment
|
|||||||
if (preference instanceof LongPressWifiEntryPreference) {
|
if (preference instanceof LongPressWifiEntryPreference) {
|
||||||
final WifiEntry selectedEntry =
|
final WifiEntry selectedEntry =
|
||||||
((LongPressWifiEntryPreference) preference).getWifiEntry();
|
((LongPressWifiEntryPreference) preference).getWifiEntry();
|
||||||
|
|
||||||
|
if (selectedEntry.isSaved()) {
|
||||||
|
if (!selectedEntry.getWifiConfiguration().getNetworkSelectionStatus()
|
||||||
|
.getHasEverConnected()) {
|
||||||
|
launchConfigNewNetworkFragment(selectedEntry);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
connect(selectedEntry, true /* editIfNoConfig */, true /* fullScreenEdit */);
|
connect(selectedEntry, true /* editIfNoConfig */, true /* fullScreenEdit */);
|
||||||
} else if (preference == mAddWifiNetworkPreference) {
|
} else if (preference == mAddWifiNetworkPreference) {
|
||||||
onAddNetworkPressed();
|
onAddNetworkPressed();
|
||||||
|
Reference in New Issue
Block a user