Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
proto/ | 14-Jan-2024 | - | 104 | 93 | ||
res/ | 14-Jan-2024 | - | 213 | 72 | ||
src/com/android/car/rotary/ | 14-Jan-2024 | - | 5,877 | 3,796 | ||
tests/unit/ | 14-Jan-2024 | - | 8,204 | 4,448 | ||
tools/ | 14-Jan-2024 | - | 30 | 10 | ||
.gitignore | D | 14-Jan-2024 | 14 | 2 | 2 | |
Android.bp | D | 15-Dec-2024 | 2.4 KiB | 102 | 86 | |
AndroidManifest.xml | D | 14-Jan-2024 | 2.6 KiB | 64 | 30 | |
OWNERS | D | 15-Dec-2024 | 58 | 6 | 4 | |
PREUPLOAD.cfg | D | 14-Jan-2024 | 472 | 9 | 7 | |
TEST_MAPPING | D | 14-Jan-2024 | 91 | 7 | 7 | |
readme.md | D | 14-Jan-2024 | 1.2 KiB | 52 | 43 |
readme.md
1# Car rotary service 2 3## Building 4``` 5make CarRotaryController -j64 6``` 7 8## Enable/disable RotaryService 9To enable, run: 10``` 11adb shell settings put secure enabled_accessibility_services com.android.car.rotary/com.android.car.rotary.RotaryService 12``` 13To disable, run: 14``` 15adb shell settings delete secure enabled_accessibility_services 16``` 17 18## Inject events 19 20### Inject RotaryEvent 21To rotate the controller counter-clockwise, run: 22``` 23adb shell cmd car_service inject-rotary 24``` 25For clockwise, run: 26``` 27adb shell cmd car_service inject-rotary -c true 28``` 29To rotate the controller multiple times (100 ms ago and 50 ms ago), run: 30``` 31adb shell cmd car_service inject-rotary -dt 100 50 32``` 33 34### Inject KeyEvent 35To nudge the controller up, run: 36``` 37adb shell cmd car_service inject-key 280 38``` 39Use KeyCode ```280``` for nudge up, ```281``` for nudge down,```282``` for nudge left,```283``` for 40nudge right. 41 42To click the controller center button, run: 43``` 44adb shell cmd car_service inject-key 23 45``` 46 47To long click the controller center button, send down and up action seperately. For example: 48``` 49adb shell cmd car_service inject-key 23 -a down && sleep 2 && adb shell cmd car_service inject-key 23 -a up 50``` 51 52