- Because WifiEntryPreference needs to support policy transparency, the inherited class is changed from Preference to RestrictedPreference.
- The RestrictedPreference will hides the end icon as default, causing this issue to happen.
- Override the getSecondTargetResId() function with necessary resource id to avoid the end-icon being hidden.
- Remove the redundant setWidgetLayoutResource, because it will be initialized in the extended class.
Bug: 262456749
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiEntryPreferenceTest
Change-Id: Ie3d3a649d3137dc705d7887c8e74592437d9ce61
- Move checkRestrictionAndSetDisabled function from WifiEntryPreference to necessary child-classes to avoid impacting other child-classes such as SavedAccessPointsPreference.
- Avoid adding ShadowRestrictedPreference to the unnecessary test class.
Bug: 233871529
Test: manual test
make RunSettingsRoboTests
Change-Id: Ia2145401558b293b5f4eaa0860f83b7d3bbab548
- When the user is restricted by UserManager.DISALLOW_ADD_WIFI_CONFIG, clicking on a Wi-Fi network will show the Settings policy transparency dialog.
- The "Not allowed by your organization" summary in Wi-Fi networks will be removed in a separate CL.
Bug: 233871529
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=Wifi
Change-Id: Ia978be8e85a5809de1331f3e0edc11fbc8925c80
- Use Drawable#setTintList() instead of Drawable#setTint() to show greyed out icon when the preference is disabled.
Bug: 233175849
Test: manual test
make RunSettingsRoboTests ROBOTEST_FILTER=WifiEntryPreferenceTest
Change-Id: I451106530bc19bc733fd58a57e8ac336b023e65e
If Wifi verbose logging is on, increase the max lines for
WifiEntryPreference's summary to 100 in order to fit the extra verbose
logging information.
Bug: 222337006
Test: manually build and verify verbose summary fits
Change-Id: I919ae1bcfb26ea8c2548ebdcd3387c90e1d17ea9
- Plan to share the InternetIconInjector class to System UI.
Bug: 192923176
Test: manual test
atest WifiEntryPreferenceTest
Change-Id: I6c15e49478f4fff54fbbb62b04c0b371e5acd3d8
WifiTrackerLib should be removed from SettingsLib to avoid tying it to
SettingsLib's min_sdk_version. Modules that need WifiTrackerLib should
now explicitly add it as a static_lib.
Bug: 187099809
Test: build, make RunSettingsRoboTests
ROBOTEST_FILTER=WifiEntryPreferenceTest
Change-Id: I09b7cad0b3b17ba1a24c1200b7ea3255ca4e227f