Fix spot not disappear in some case
Bug: When a pointer device exist and it not has event,turn on the show touches in settings, use finger press screen not leave, use command "adb shell settings put system show_touches 0" to turn off show touches, the spot will stay on screen.
Fix Method: call clearSpots method in PointerController when show touches turn off.
Signed-off-by: lilinnan <lilinnan@xiaomi.corp-partner.google.com>
Change-Id: I085b6aeb43771607b4265384f76e17d48beff00c
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.cpp b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
index ac5f6b6..17bbff8 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
@@ -813,6 +813,10 @@
mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE);
}
} else {
+ if (mPointerController != nullptr && mDeviceMode == DeviceMode::DIRECT &&
+ !mConfig.showTouches) {
+ mPointerController->clearSpots();
+ }
mPointerController.reset();
}