Merge "Move Process_PointerCapture to CursorInputMapper_test" into main
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index 4842476..ed5d5c1 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -63,8 +63,7 @@
namespace {
static bool isVndkEnabled() {
#ifdef __BIONIC__
- // TODO(b/290159430) Use ro.vndk.version to check if VNDK is enabled instead
- static bool isVndkEnabled = !android::base::GetBoolProperty("ro.vndk.deprecate", false);
+ static bool isVndkEnabled = android::base::GetProperty("ro.vndk.version", "") != "";
return isVndkEnabled;
#endif
return false;
diff --git a/services/inputflinger/reader/mapper/KeyboardInputMapper.cpp b/services/inputflinger/reader/mapper/KeyboardInputMapper.cpp
index 58b29b8..531fc67 100644
--- a/services/inputflinger/reader/mapper/KeyboardInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/KeyboardInputMapper.cpp
@@ -451,7 +451,8 @@
void KeyboardInputMapper::onKeyDownProcessed() {
InputReaderContext& context = *getContext();
if (context.isPreventingTouchpadTaps()) {
- // avoid pinging java service unnecessarily
+ // avoid pinging java service unnecessarily, just fade pointer again if it became visible
+ context.fadePointer();
return;
}
// Ignore meta keys or multiple simultaneous down keys as they are likely to be keyboard
diff --git a/services/inputflinger/tests/KeyboardInputMapper_test.cpp b/services/inputflinger/tests/KeyboardInputMapper_test.cpp
index 08a5559..48f5673 100644
--- a/services/inputflinger/tests/KeyboardInputMapper_test.cpp
+++ b/services/inputflinger/tests/KeyboardInputMapper_test.cpp
@@ -112,6 +112,15 @@
}
/**
+ * Pointer should still hide if touchpad taps are already disabled
+ */
+TEST_F(KeyboardInputMapperUnitTest, AlphanumericKeystrokesWithTouchpadTapDisabledHidePointer) {
+ mFakePolicy->setIsInputMethodConnectionActive(true);
+ EXPECT_CALL(mMockInputReaderContext, isPreventingTouchpadTaps).WillRepeatedly(Return(true));
+ testPointerVisibilityForKeys({KEY_0, KEY_A}, /* expectVisible= */ false);
+}
+
+/**
* Pointer visibility should remain unaffected by meta keys even if Input Method Connection is
* active
*/