This is a WifiTracker2 version of partial part of ag/9980423
- Disable the "Saved network" if the access points is empty.
- Disable the "Wifi data usage" if there is no wifi radio.
Bug: 146823365
Test: manual
Search 'Saved networks' when there is a saved Wi-Fi network
and when there is no saved Wi-Fi network.
Search 'data usage' on the device which supports Wi-Fi and
on the device which does not supports Wi-Fi.
Change-Id: If46e65585f1b272401666f78fd5e3a4cf49bef6e
When WifiTracker2 callbacks to Wi-Fi Settings, should check if the
activity is finishing at first.
Bug: 151677440
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiSettings2Test
Change-Id: I95737eae3f67e6471c75ba845b57af2d721d5d37
Add API to launch help page when Openroaming help button is tapped.
Bug: 146669261
Test: Add openSubscriptionHelpPage_shouldCallStartActivityForResult unit test to check StartActivityForResult had been launched correctly.
Change-Id: If18248e7d985215e65dfdc5742cd9007efbbff1a
click the gear icon will always switch to Wi-Fi detail screen.
Bug: 150911380
Test: make RunSettingsRoboTests ROBOTEST_FILTER=ConnectedWifiEntryPreferenceTest
Change-Id: I640d180ae5684ffaa9b2adec7b1be401b2bfd89d
Removing call to WifiManager#save() when configuring a new network
through tapping it in the wifi picker. Since WifiManager#connect()
already saves the passed in WifiConfiguration, the call to
WifiManager#save() is redundant.
Bug: 149579116
Test: build, manual verification by connecting to a new secure network
Change-Id: I9242e7fd7e9a459e8221b6bb491ab67833970e87
we shouldn't take users so deep into the settings IA because it's easy
to feel lost in settings after clicking on a result without additional
context.
Bug: 143055215
Test: robotest & manual
Change-Id: I337cb5ead31e1e4e7bf9be78132e90630f83ee43
isNetworkEnabled() & isNetworkPermanentlyDisabled()
should not be formal APIs. Instead,
getNetworkSelectionStatus() with a set of constants
is sufficient as an API surface, and will be more
maintainable in the future.
Bug: 146046526
Test: atest SettingsUnitTests
Change-Id: If599ce88f68a87fa7186ef96156c2bb1fdc1c2c3
Renamed to hasEverConnected() to conform to API
guidelines.
Bug: 146046526
Test: make RunSettingsRoboTests -j40
Change-Id: Ie88945326977ea11a05721e40a81c338fee61cb6
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
WifiPickerTracker get WifiEntries at onStart, it's no meaning
to getWifiEntry at WifiSettings2#onActivityCreated.
Bug: 143328194
Test: manual
Edit a Wi-Fi network by clicking context menu 'Modify',
rotate the WiFiDialog and see if any thing wrong
Change-Id: I9746879720b72723259e1b59e8b5e8bae183b8cc
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
It's necessary to implement getDialogMetricsCategory to show
dialog in WifiSettings2.
Bug: 143328194
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi
Change-Id: I65ac4168ef922be981624e7916316f189ab590c2
This is a similar code merge of ag/575560 & ag/2588374
Bug: 143328194
Test: manual
Connect to a Wi-Fi network with wrong network.
Click the fail notification and launch Wi-Fi picker.
Check if the editor shows the specified Wi-Fi network.
Change-Id: I5bc8cd0ea51e7baf3d6d2d6d522a3973b74ef930
This is a similar code merge of ag/489459.
Bug: 143328194
Test: make RunSettingsRoboTests ROBOTEST_FILTER=WifiSettings2Test
Change-Id: I666b3293f00aa1822a6fdcc3760ae19d27019597
This change also implements context menu in WifiSettings2.
Bug: 70983952
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=WifiSettings2Test
Change-Id: I13b5a3724207f76e2b24fd0c1c49a236ee0c44f0
This change also remove redundant code of WifiNetworkDetailsFragment2
from WifiSettings.
Bug: 143326832
Test: Manual
Click connected Wi-Fi network and check the UI of
WifiNetworkDetailsFragment2
Change-Id: Id72c26116177f8e7063e433a6456557bd36c7927
Create below version 2 files for WifiTracker2 development, we can
check the feature flag only a few times and easily remove version 1
files in the future.
src/com/android/settings/wifi/details2/
src/com/android/settings/wifi/savedaccesspoints2/
tests/robotests/src/com/android/settings/wifi/details2/
tests/robotests/src/com/android/settings/wifi/savedaccesspoints2/
Bug: 143326832
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi.details2
make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.wifi.savedaccesspoints2
Change-Id: I4d2caf1ce313871605252395764b02747240f217
Use WifiPickerTracker.getConnectedWifiEntry API to get a WifiEntry to
display at the top of the Wifi picker as the connected network.
Test: manual - visual verification of connected entry at the top of the
wifi picker.
Bug: 70983952
Change-Id: Iec6e1c9fe950397f62350194d8b24791a7eac30a
Use stable ID feature of RecycleView to keep preference focus.
Bug: 126132618
Test: WifiSettingsTest
WifiSettings2Test
manual visual
Change-Id: Id73157b0935186c9a59d1ef68190d853f671ebc2
Change the source of the saved network preference text from WifiManager
to WifiPickerTracker and update it through the
WifiPickerTrackerCallback.
Bug: 70983952
Test: atest WifiSettings2Test
Change-Id: Ia0a61f174a061892cd9376c16402e4983eaaa03c
WifiTracker2 is being split into separate trackers for each fragment
that needs tracking functionality (Wifi picker, Saved Networks Page,
Network Details Page). For WifiSettings2, we will use WifiPickerTracker
which differs from WifiTracker2 by only having the functionality
required for the wifi picker.
Bug: 70983952
Test: WifiSettings2Test.java
Change-Id: Ia94fa534ead7c521156d1cccbb120a345d95e020
- Summary Loader only works in injected items, but those fragments
are not injected to Settings UI. The SummaryLoader class them are
useless.
Bug: 141653158
Test: robolectric
Change-Id: I1ca0bf5a1f417b7fe86b28e96aff7d4aee2cf2d3
- Use SettingsLib Indexable
- Directly use resource id in getPreferenceScreenResId
Bug: 135053028
Test: roboletric
Change-Id: I05f493b55e8b6e2091301e9231ba5615215618e6
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function
Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
Added WifiTracker2 into WifiSettings2, and made WifiSettings2 listen to
wifi state change callbacks from WifiTracker2 to update the WifiEntry
list.
Test: atest WifiSettings2Test, build and visual verification
Bug: 70983952
Change-Id: Ieda699d05d350553a526f9536de58937c49c7280
Copied main logic from WifiSettings into WifiSettings2, removing
all instances of WifiTracker in preparation of adding WifiTracker2.
Removed:
- WifiDialog (to be added back in)
- Context Menu (to be added back in)
- Leftover SUW code (Next button)
WifiSettings2Test also copied directly from WifiSettingsTest, without
context menu test.
Bug: 70983952
Test: atest WifiSettings2Test
Change-Id: Ie1ef5bf0ca14f5989f4add2165422609f12c2c84
Use WifiSettings2 if settings_wifitracker2 feature flag is enabled.
WifiSettings2 will be used for changes to WifiSettings to incorporate
the WifiTracker2 refactor.
Bug: 70983952
Test: make, set feature flag, open Wifi settings to verify new page
opens.
Change-Id: I08edc227bf38ab4b3b785180bf123815bf95da81
Use arrays.xml to store translations for enumerations;
avoid race conditions happened when pop up menu or dialog;
avoid saving configurations with networks disabled;
use the same layout for all the dialogs;
support editing EAP networks;
only unlock keystore before connecting;
and many bug fixes I cannot remember.
The number of lines in the new code is about 1/3 of the old one,
and it improves the readability a lot!