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

Commit 2dcf6083 authored by Birdson_Chen's avatar Birdson_Chen
Browse files

Fix "Add Network" show last selected WiFi AP Dialog

When user taps Wi-Fi add network button, the pop-up dialog is not empty (it shows last selected WiFi AP Dialog).
The above is observed after the following steps:
- Launch Settings application
- Turn on Wi-Fi
- Select any Wi-Fi Access Point which is not connected previously and change to portrait mode
- Press Cancel from the pop-up and select Add Network icon in menu

Because the "Rotation" operation will cause WifiDialog re-creating and the current settings
of selected Wi-Fi Access Point is saved before WifiDialog destroyed.
Then, the saved Wi-Fi Access Point is displayed when user tap on "Add Network".

It need to clear the saved Wi-Fi Access Point when WifiDialog re-creating.

Change-Id: I3e93943e5bee405329e309c3ec88a35ee9cafc43
parent ba32c249
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -646,6 +646,8 @@ public class WifiSettings extends SettingsPreferenceFragment
                        ap = new AccessPoint(getActivity(), mAccessPointSavedState);
                        // For repeated orientation changes
                        mDlgAccessPoint = ap;
                        // Reset the saved access point data
                        mAccessPointSavedState = null;
                    }
                }
                // If it's still null, fine, it's for Add Network