- Get notification vibration and haptic feedback intensity respectively. - Use xliffs to compose these strings. - Use the version that passed in Vibrator.class to get Vibrator instance. - Refactor switch/case part in getSummary() of VibrationIntensityPreferenceController. Let AccessibilitySettings and VibrationIntensityPreferenceController both call it. - Add robolectric test for method: updateVibrationSummary(). - Refine test method, use real preference and test summary value. - Remove redundancy. Bug: 75322064 Test: make ROBOTEST_FILTER=AccessibilitySettingsTest RunSettingsRoboTests Change-Id: Ia3c7447b1ab1e336b36ad439800b673821417e48 Merged-In: Ia3c7447b1ab1e336b36ad439800b673821417e48
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.