Properly forget networks and refresh page in SavedAcessPointsWifiSettings.
The dialog access point rebuilt after fragment is destroyed (i.e. orientation change) did not properly save selected Preference, and caused NPE. Changed onForget to refresh preference list. Bug: 35207121 Test: b/35322875 tracking bug for saved networks tests. Change-Id: I81935c5a6e3efab4d4e3b6e7c2b150bacf06d7c1
This commit is contained in:
@@ -182,8 +182,8 @@ public class SavedAccessPointsWifiSettings extends SettingsPreferenceFragment
|
||||
public void onForget(WifiDialog dialog) {
|
||||
if (mSelectedAccessPoint != null) {
|
||||
mWifiManager.forget(mSelectedAccessPoint.getConfig().networkId, null);
|
||||
getPreferenceScreen().removePreference((Preference) mSelectedAccessPoint.getTag());
|
||||
mSelectedAccessPoint = null;
|
||||
initPreferences();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user