summaryrefslogtreecommitdiff
path: root/libs/input/TouchSpotController.cpp
AgeCommit message (Collapse)Author
2024-05-09Use a strongly typed LogicalDisplayId for displayId(1/n) Linnan Li
Currently, we use int32_t for displayId, which is not a safe type, and it may also lead to misdefinition of types. Here, we introduce LogicalDisplayId as a strong type for displayId and move all contents of constants.h into LogicalDisplayId.h. Bug: 339106983 Test: atest inputflinger_tests Test: atest InputTests Test: presubmit Change-Id: I1c348d7f08524471391b21eaba938501506a7772 Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com>
2024-05-07Hide touch indicators on mirrored displays if a secure window is present Arpit Singh
Utilise ISurfaceComposerClient::eSkipScreenshot to remove the tap indicators from mirrored displays when a secure window is present. End-to-end test will be added in an upcoming CL. Test: manual test & atest PointerChoreographerTest PointerControllerTest Bug: 325252005 Change-Id: I72a77b1a1b2c02a5e94f05e67d0cd39588086c81
2024-01-23PointerController: Get initial DisplayInfos from SurfaceComposerClient Linnan Li
After the PointerController is created, if SurfaceFlinger hasn't called back to notify DisplayInfo,the PointerController won't have DisplayInfo, if the actual display exists and transforms at this time, using the display touch position will result in the wrong actual display position. Steps to reproduce the problem. 1. Switch the device to landscape. 2. Execute `adb shell settings put system show_touch 1`. 3. Touch the screen. 4. At this point, you can observe that the screen flashes an incorrect touch point location. How to fix it The addWindowInfosListener method has a parameter to get the initial position, which we use to get the current DisplayInfo at creation time. Even though this information would not exist if there were no other listeners, it doesn't matter here because the InputDispatcher was created long before the PointerController, and the InputDispatcher already added a listener, so the DisplayInfo information must exist, so we don't have to worry about this. Bug: 313033164 Test: Manual Change-Id: Ia942c85d1b2204690f69e6a2ba43cfb7542af27c Signed-off-by: Linnan Li <lilinnan@xiaomi.corp-partner.google.com>
2023-08-18Use std::shared_ptr for SpriteController Prabir Pradhan
Remove RefBase from SpriteController, and use std::shared_ptr. We cannot migrate to std::unique_ptr because we have to post messages to the handler, which needs to have a weak reference to the object. Bug: 278783893 Test: presubmit Change-Id: I0ea4bb220e5b1866375ed39335f9035cd4bb766c
2023-08-17Strong pointer fixes in libinputservice Prabir Pradhan
Make components of libinputservice work with implicit conversions disabled for strong pointers. Bug: 278783893 Test: Build Change-Id: Ibe1e97c845662113437635efd7a1e875e8407c64
2022-11-11Add TouchSpotController to PointerController dump. Michael Wright
Bug: 254277939 Test: manually inspect `dumpsys input` Change-Id: I3a50e13885df90253335f013cda28b5ce9d2def7
2022-03-04Fix transitive dependencies on SkImageEncoder Kevin Lubick
In https://skia-review.googlesource.com/c/skia/+/512416, we would like to decouple SkImage and SkImageEncoder. This CL was created by searching for use of these objects: - SkEncodedImageFormat - SkStream - SkData - SkBitmap - SkPixmap and making sure those files followed the Include What You Use (IWYU) guidelines. Signed-off-by: Kevin Lubick <kjlubick@google.com> Change-Id: I8edbcd1c9a526b8084d7e2c023895d1ad2f8c9b1
2020-08-19Switch to callback animation Liam Harrington
Modified current animation logic to use callbacks from the controllers to further clean and modularize code. Test: Pixel 3XL device, atest PointerController_test, compile Change-Id: I1073bd78687cca491663c0349751dab4b30aa8e2
2020-08-06Refactor of PointerController Liam Harrington
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