Remove viewport display ID assignment in pointer mode
TouchInputMapper#dispatchPointerSimple() is only called when DeviceMode
is POINTER, which by definition is to dispatch events to cursor
position. Therefore it should always use the display from
PointerController. It's already doing that in the line 3446 so remove
this no-op line of code.
Test: Mouse click still works.
Change-Id: Id72bc37e75f42c52e121bfb50bfbf59b3717c66b
diff --git a/services/inputflinger/reader/mapper/TouchInputMapper.cpp b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
index cfc2919..04a5c4f 100644
--- a/services/inputflinger/reader/mapper/TouchInputMapper.cpp
+++ b/services/inputflinger/reader/mapper/TouchInputMapper.cpp
@@ -3433,7 +3433,6 @@
void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, bool down,
bool hovering) {
int32_t metaState = getContext()->getGlobalMetaState();
- int32_t displayId = mViewport.displayId;
if (down || hovering) {
mPointerController->setPresentation(PointerControllerInterface::Presentation::POINTER);
@@ -3443,7 +3442,7 @@
} else if (!down && !hovering && (mPointerSimple.down || mPointerSimple.hovering)) {
mPointerController->fade(PointerControllerInterface::Transition::GRADUAL);
}
- displayId = mPointerController->getDisplayId();
+ int32_t displayId = mPointerController->getDisplayId();
float xCursorPosition;
float yCursorPosition;