Commit Graph

17 Commits

Author SHA1 Message Date
Treehugger Robot
15bbc06795 Merge "Refactor of PointerController" am: 3ca2400a53 am: adaedfa3fa
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364598

Change-Id: I46f3a14b56c18ae2977791e81ea5d768f5e163f3
2020-08-07 17:09:31 +00:00
Liam Harrington
c782be6e6f Refactor of PointerController
Abstracted logic that applies to all pointer types into general
PointerController class and moved implementation of logic specific
to the mouse cursor and touch spots to MouseCursorController and
TouchSpotController, respectively.
Test: Pixel 3XL device, atest PointerController_test, compile

Change-Id: Ia5825c37ca75951cc8bcd7d5102c986bd957e69f
2020-08-06 20:22:26 +00:00
Michael Wright
12956dc51d Move PointerController enums to enum classes.
Bug: 160010896
Test: atest PointerController_test, compile
Change-Id: I6c7bfc91023ce6cd2dc8f82b0d72731f871ad3ea
Merged-In: I6c7bfc91023ce6cd2dc8f82b0d72731f871ad3ea
(cherry picked from commit 676897dc11)
2020-07-07 21:57:30 +00:00
Michael Wright
3a09650f68 Move PointerController from sp to shared_ptr
Bug: 160010896
Test: atest PointerController_test, manual usage
Change-Id: I4e665d00c56b44c9c1a4ea8cb27ffd10ade3315b
Merged-In: I4e665d00c56b44c9c1a4ea8cb27ffd10ade3315b
(cherry picked from commit 0cde5911bc)
2020-07-07 18:39:47 +00:00
Michael Wright
6853fe6d78 Move PointerController enums to enum classes.
Bug: 160010896
Test: atest PointerController_test, compile
Change-Id: I6c7bfc91023ce6cd2dc8f82b0d72731f871ad3ea
Merged-In: I6c7bfc91023ce6cd2dc8f82b0d72731f871ad3ea
2020-07-07 10:43:01 -07:00
Michael Wright
a0bc6b1d09 Move PointerController from sp to shared_ptr
Bug: 160010896
Test: atest PointerController_test, manual usage
Change-Id: I4e665d00c56b44c9c1a4ea8cb27ffd10ade3315b
Merged-In: I4e665d00c56b44c9c1a4ea8cb27ffd10ade3315b
2020-07-07 10:11:58 -07:00
Prabir Pradhan
ca7d72347e PointerController: Add guards to ensure display is valid
This change makes it so that PointerController does not ask its Policy
to load any resources for any displays until a DisplayViewport is set,
and verifies this with unit tests.

Bug: 145699789
Bug: 146385350
Test: atest libinputservice_test
Change-Id: I2e48e7ac4700e6f9fdf939a7bd0e6639b051ade6
Merged-In: I2e48e7ac4700e6f9fdf939a7bd0e6639b051ade6
2020-05-28 14:03:22 -07:00
Garfield Tan
e9c6151756 Stop loading animation for addtional cursor type.
In the test below it only expects MockSprite#setIcon() being called
once, but with animation it may be called multiple times.

Bug: 144947344
Test: atest PoitnerControllerTest#updatePointerIcon
Change-Id: I5c4908fb8301cae144fd637c831f2012a35862e3
Merged-In: I5c4908fb8301cae144fd637c831f2012a35862e3
2020-05-28 14:03:21 -07:00
Garfield Tan
c15eb91b04 Add cursor type and hotspot to surface metadata.
Also bootstrap unit tests for PointerController. Need to mark 3
functions of SpriteController virtual so their behaviors can be
overridden.

Bug: 130822623
Test: SurfaceFlinger can get cursor type and hotspot.
Change-Id: I739cd03214364144bb4e22a166ecc7abfd3492fe
Merged-In: I739cd03214364144bb4e22a166ecc7abfd3492fe
2020-05-28 14:03:21 -07:00
Derek Sollenberger
ee538a3a85 Cleanup header and build targets for libhwui clients.
Targets that will also be contained within the UI module
are allowed to access internal headers.  All other targets
that depend on libhwui are restricted to using the APEX headers.

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: Id92e9874dafb98bd79839d45ab8f22ab999689de
2020-02-20 21:50:06 -05:00
Prabir Pradhan
be845950a2 PointerController: Add guards to ensure display is valid
This change makes it so that PointerController does not ask its Policy
to load any resources for any displays until a DisplayViewport is set,
and verifies this with unit tests.

Bug: 145699789
Bug: 146385350
Test: atest libinputservice_test
Change-Id: I2e48e7ac4700e6f9fdf939a7bd0e6639b051ade6
2020-02-07 12:24:32 -08:00
Garfield Tan
3906d1dd0f Stop loading animation for addtional cursor type.
In the test below it only expects MockSprite#setIcon() being called
once, but with animation it may be called multiple times.

Bug: 144947344
Test: atest PoitnerControllerTest#updatePointerIcon
Change-Id: I5c4908fb8301cae144fd637c831f2012a35862e3
2019-11-21 16:42:13 -08:00
Derek Sollenberger
9ca5bbe39f Create C API for accessing android.graphics.Bitmap in native code.
Restrict access to SkBitmap for libandroid_runtime.so to be only within
the boundaries of the graphics module.

Test: CtsUiRenderingTestCases
Bug: 137655431
Change-Id: I4d0ea227e91d22068966513c4e3a55021b9e924f
2019-09-10 14:50:02 -04:00
Garfield Tan
67e479a4e8 Add cursor type and hotspot to surface metadata.
Also bootstrap unit tests for PointerController. Need to mark 3
functions of SpriteController virtual so their behaviors can be
overridden.

Bug: 130822623
Test: SurfaceFlinger can get cursor type and hotspot.
Change-Id: I739cd03214364144bb4e22a166ecc7abfd3492fe
2019-08-15 14:48:08 -07:00
Michael Wright
d6b473713f Move inputservice over to frameworks/native
Remove all of the pieces except the PointerController and SpriteController over
to frameworks/native in preparation for inputflinger. Those two need to stay in
frameworks/base for now because they depend on Skia currently. In the long run
they should be merged into either the InputManager or the WindowManager rather
than as a part of the inputservice / inputflinger.

Try 2.

Change-Id: I84259356d3eb8efc5aefb9d6b311b5fc590ea3ed
2014-02-11 10:47:36 -08:00
RoboErik
fb290df3c9 b/12068020 Make kb layouts only unique to vendor/product
Instead of storing a kb layout per device descriptor (which is expected
to be unique), store it for each vendor/product. This way we can keep
a consistent layout between identical but physically different keyboards.

There are some corner cases this is expected to fail on, namely devices
that incorrectly have the same vendor/product id. Devices that don't
define a vendor/product id will continue to use the descriptor to store
layout files.

Change-Id: Id0890d13e1c859eaf993d4831b7b1acbaf5df80f
2014-01-07 17:37:24 -08:00
Amith Yamasani
9158825f9c Move some system services to separate directories
Refactored the directory structure so that services can be optionally
excluded. This is step 1. Will be followed by another change that makes
it possible to remove services from the build.

Change-Id: Ideacedfd34b5e213217ad3ff4ebb21c4a8e73f85
2013-12-19 15:25:37 -08:00