- 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
Running Settings Robolectric tests
The full suite
$ croot
$ make RunSettingsRoboTests
Running a single test class
$ croot
$ make RunSettingsRoboTests ROBOTEST_FILTER=<ClassName>
For example:
make RunSettingsRoboTests ROBOTEST_FILTER=CodeInspectionTest
You can also use partial class name in ROBOTEST_FILTER. If the partial class name matches multiple file names, all of them will be executed.