Added 'Stay unlocked on fold' toogle to display settings. Enabling this setting will allow user to keep their device awake after the fold the device. Test: atest StayAwakeOnFoldPreferenceControllerTest LogicalDisplayMapperTest Test: manual Built and flashed foldable device and manually tested by 1. unfolded device -> enable setting -> folded device 2. unfolded device -> disabled setting -> folded devices Built and flashed non-foldable device and manually tested by 1. Went to Settings -> display -> the toogle setting is not visible Bug: 274447767 Change-Id: I35fbd0f5d1297ee6e14896e8f3be8301cda6622f
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.