From 43654e701c8ab7ef0fa64d31375e053e3012fab7 Mon Sep 17 00:00:00 2001 From: Linnan Li Date: Thu, 28 Mar 2024 11:07:13 +0000 Subject: Change the type of displayId to int32_t Change the type of the displayId declaration for the Motion event during injection to int32_t. Bug: none Test: build Change-Id: I3526893773c534aa1a0b87137f38d702a69e05ab --- services/inputflinger/dispatcher/InputDispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/inputflinger/dispatcher/InputDispatcher.cpp b/services/inputflinger/dispatcher/InputDispatcher.cpp index 9a3fe436b9..67e48a266d 100644 --- a/services/inputflinger/dispatcher/InputDispatcher.cpp +++ b/services/inputflinger/dispatcher/InputDispatcher.cpp @@ -4680,7 +4680,7 @@ InputEventInjectionResult InputDispatcher::injectInputEvent(const InputEvent* ev const bool isPointerEvent = isFromSource(event->getSource(), AINPUT_SOURCE_CLASS_POINTER); // If a pointer event has no displayId specified, inject it to the default display. - const uint32_t displayId = isPointerEvent && (event->getDisplayId() == ADISPLAY_ID_NONE) + const int32_t displayId = isPointerEvent && (event->getDisplayId() == ADISPLAY_ID_NONE) ? ADISPLAY_ID_DEFAULT : event->getDisplayId(); int32_t flags = motionEvent.getFlags(); -- cgit v1.2.3