[Wi-Fi] Fix Wi-Fi wrong password notification can't launch editor

WifiPickerTracker gather WifiEntries at onStart but
WifiPickerTracker.getWifiEntries() may still have no WifiEntry
at onResume.

Check if there is a specified wrong password Wi-Fi network at
onWifiEntriesChanged.

Bug: 143328194
Test: manual
      Edit a Wi-Fi network with wrong password, click the wrong
      password notification, should see a Wi-Fi editor for the
      wrong password Wi-Fi network

Change-Id: I7de6e0e3eabb2cb00160709eca4951b655dc04d7
This commit is contained in:
Arc Wang
2020-01-10 15:51:24 +08:00
parent 824095f728
commit c4b1d0f416
2 changed files with 21 additions and 16 deletions

View File

@@ -227,7 +227,12 @@ public class WifiSettings extends RestrictedSettingsFragment
super.onCreate(icicle);
if (FeatureFlagUtils.isEnabled(getContext(), FeatureFlagUtils.SETTINGS_WIFITRACKER2)) {
getContext().startActivity(new Intent("android.settings.WIFI_SETTINGS2"));
final Intent intent = new Intent("android.settings.WIFI_SETTINGS2");
final Bundle extras = getActivity().getIntent().getExtras();
if (extras != null) {
intent.putExtras(extras);
}
getContext().startActivity(intent);
finish();
return;
}