Initialize pointerCapture
Currently, pointerCapture variable is not initialized, so it will be set
to whatever is currently occupying that address.
This causes flakiness of the input native tests,
because in this test case, FakeInputReaderPolicy does not do any special
initialization for InputReaderConfiguration.
Bug: 117116942
Test: asan-built inputflinger tests
Change-Id: Id9a6b2f57bf3722e9d92ba1408468cf3bdf721b2
diff --git a/services/inputflinger/include/InputReaderBase.h b/services/inputflinger/include/InputReaderBase.h
index c411ec0..fe1d4d0 100644
--- a/services/inputflinger/include/InputReaderBase.h
+++ b/services/inputflinger/include/InputReaderBase.h
@@ -268,7 +268,7 @@
pointerGestureSwipeMaxWidthRatio(0.25f),
pointerGestureMovementSpeedRatio(0.8f),
pointerGestureZoomSpeedRatio(0.3f),
- showTouches(false) { }
+ showTouches(false), pointerCapture(false) { }
std::optional<DisplayViewport> getDisplayViewportByType(ViewportType type) const;
std::optional<DisplayViewport> getDisplayViewportByUniqueId(const std::string& uniqueDisplayId)