commit | 91ada1ef0c59f29fecc7097fc107b6b06fa6a7a7 | [log] [tgz] |
---|---|---|
author | Treehugger Robot <treehugger-gerrit@google.com> | Wed Jul 20 17:45:04 2022 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Jul 20 17:45:04 2022 +0000 |
tree | b87ceda1fa1da3804d581c81e18b1af8f1249424 | |
parent | 4abc23f79dc6700acc2ab028a54c00a0a581af61 [diff] | |
parent | cd9ad3c5adb630b0fb515eeb30cfacc770950dbe [diff] |
Merge "Fix cursor not disappear immediately when the mouse device removed" am: cd9ad3c5ad Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2159076 Change-Id: Iab219dbe320e93d783c6c6f3b13ad5526e16e33f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/services/inputflinger/reader/mapper/CursorInputMapper.cpp b/services/inputflinger/reader/mapper/CursorInputMapper.cpp index a9a4c71..76a87bb 100644 --- a/services/inputflinger/reader/mapper/CursorInputMapper.cpp +++ b/services/inputflinger/reader/mapper/CursorInputMapper.cpp
@@ -67,7 +67,11 @@ CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext) : InputMapper(deviceContext) {} -CursorInputMapper::~CursorInputMapper() {} +CursorInputMapper::~CursorInputMapper() { + if (mPointerController != nullptr) { + mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE); + } +} uint32_t CursorInputMapper::getSources() const { return mSource;