OSDN Git Service

Support mouse pointer on external displays (2/3)
authorAndrii Kulian <akulian@google.com>
Fri, 14 Sep 2018 23:48:08 +0000 (16:48 -0700)
committerArthur Hung <arthurhung@google.com>
Mon, 10 Dec 2018 13:01:05 +0000 (21:01 +0800)
commit84cdf9cc3b849679e6b4f6d3ccb66270f0abad2f
tree0f71df4df15e08b540a842ac7ed4aa7e6e743be1
parent9be59f96b3385e8b9c39c5bee303a3e19a0d960f
Support mouse pointer on external displays (2/3)

Limit mouse boundary to one display viewport.
Currently if desktop mode is enable, selects the topmost freeform display,
or find first external display if there is no freeform display.
Return the default display if desktop mode is not enable.

- Add getPointerDisplayId to find the preferred display.
- Limit update viewports from InputReader. Also implements updatePointerDisplay
  to find and associate with the specified display viewport.
- Reload cursor resources if resolution or display changed.

Bug: 113559891
Test: atest inputfliger_tests
Test: ActivityView test app
Change-Id: Ief3410a517be457dfe6f1180342bb1dc88833635
libs/input/Android.bp
libs/input/PointerController.cpp
libs/input/PointerController.h
libs/input/SpriteController.cpp
libs/input/SpriteController.h
services/core/java/com/android/server/input/InputManagerService.java
services/core/java/com/android/server/wm/InputManagerCallback.java
services/core/jni/com_android_server_input_InputManagerService.cpp