commit | 64791ec018766181e970d876141e766beef82db5 | [log] [tgz] |
---|---|---|
author | Yabin Huang <yabinh@google.com> | Wed Oct 07 18:47:15 2020 -0700 |
committer | Yabin Huang <yabinh@google.com> | Mon Oct 19 19:04:18 2020 +0000 |
tree | 85f86bb79ee74ca7e6089f1a9a3cff753a41f7c4 | |
parent | 0bde5c684cf2dc978cceea05ffc300d3dcef1222 [diff] |
Refactor RotaryService and Navigator 1. Update handleViewFocusedEvent(). The focus will be adjusted properly by the framework due to a recent change, so RotaryService doesn't need to adjust the focus any more. As a result, PendingFocusedNodes class is not needed any more. 2. Remove RotaryCache since the history is kept in FocusArea class due to a recent change. 3. Due to a recent change, the nudge target finding is mostly done on the app side. So update the logic in RotaryService accordingly. 4. Remove failing roboletric tests. Since roboletric tests are being deprecated, don't bother updating them to make them pass. Equivalent instrumented tests will be added later. 5. Replace NodePredicate with Predicate in Java library. Bug: 168844996 Bug: 170344916 Test: atest CarRotaryControllerRoboTests, and manual test Change-Id: Ib3199df71da625f5dd907f23bc6b8625a121ca36 Merged-In: Ib3199df71da625f5dd907f23bc6b8625a121ca36
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