Allow nudge out of an ActivityView

Nudging out of a dialog isn't allowed (with one exception). The criteria
used to determine whether a window is for a dialog are:
- it's of TYPE_APPLICATION
- its bounds different from the application window's bounds

This adds a third criterion:
- it's on the default display

This change prevents windows for ActivityViews from blocking nudges
since windows for ActivityViews are on virtual displays.

Test: nudge out of maps widget and try to nudge out of dialog
Bug: 174889547
Change-Id: I7ca1d8dfb2a4cccd26949141769db67545ed4211
1 file changed
tree: 10a84fbdd5d10e70f5261aecb139808725a3ef78
  1. res/
  2. src/
  3. tests/
  4. Android.bp
  5. AndroidManifest.xml
  6. OWNERS
  7. readme.md
readme.md

Car rotary service

Building

make CarRotaryController -j64

Enable/disable RotaryService

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

Inject events

Inject RotaryEvent

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

Inject KeyEvent

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