commit | 521ada24583b4210695bbb8c7b9e62e7b77a9ecb | [log] [tgz] |
---|---|---|
author | Yabin Huang <yabinh@google.com> | Fri Nov 06 12:36:12 2020 -0800 |
committer | Yabin Huang <yabinh@google.com> | Fri Nov 06 13:22:08 2020 -0800 |
tree | 8cb1c84bd7f95a071b99a6fae4be782bd6284c2f | |
parent | 838709ed867432c544ea6467d108404e7830d13d [diff] |
Use the currently focused view to initialize the focus Fixes: 170420845 Test: focus on Media, reinstall RotaryService, then rotate/nudge/click the controller Test: focus on Navigation bar, reinstall RotaryService, then rotate/nudge/click the controller Test: focus on Media, reinstall Media, then rotate/nudge/click the controller Change-Id: I5320b74de432b4fd7f41f5f3ae4b3defbaa26b08
make CarRotaryController -j64
To enable, run:
adb shell settings put secure enabled_accessibility_services com.android.car.rotary/com.android.car.rotary.RotaryService
To disable, run:
adb shell settings delete secure enabled_accessibility_services
To rotate the controller counter-clockwise, run:
adb shell cmd car_service inject-rotary
For clockwise, run:
adb shell cmd car_service inject-rotary -c true
To rotate the controller multiple times (100 ms ago and 50 ms ago), run:
adb shell cmd car_service inject-rotary -dt 100 50
To nudge the controller up, run:
adb shell cmd car_service inject-key 280
Use KeyCode 280
for nudge up, 281
for nudge down,282
for nudge left,283
for nudge right.
To click the controller center button, run:
adb shell cmd car_service inject-key 23