commit | 2597dd9f1c1205e746ed3454fb5087ea6c56f0c4 | [log] [tgz] |
---|---|---|
author | Yabin Huang <yabinh@google.com> | Mon Oct 02 14:47:08 2023 -0700 |
committer | Yabin Huang <yabinh@google.com> | Tue Oct 03 18:06:31 2023 -0700 |
tree | 46312a8360c0e49f0fb531d8d2f78ddf04e72469 | |
parent | caa3707fac835e0aa7e15cdb06e25753eb01e7c2 [diff] |
Add null check before calling isInFocusedWindow() And add more logs for debugging. Fixes: 291772449 Test: manual Change-Id: I3fcc6c958c5f4eec4180591105ad9d64b9ac3169
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
To long click the controller center button, send down and up action seperately. For example:
adb shell cmd car_service inject-key 23 -a down && sleep 2 && adb shell cmd car_service inject-key 23 -a up