Fix trackball down and movement bugs.
Bug: 2823788
Change-Id: Icb0c392b58f7e735614460b5eb87439cb73ac4f2
diff --git a/libs/ui/InputReader.cpp b/libs/ui/InputReader.cpp
index 403afe7..30e391f 100644
--- a/libs/ui/InputReader.cpp
+++ b/libs/ui/InputReader.cpp
@@ -270,6 +270,10 @@
device->trackball.accumulator.fields |=
InputDevice::TrackballState::Accumulator::FIELD_BTN_MOUSE;
device->trackball.accumulator.btnMouse = down;
+
+ // Process the trackball change now since we may not receive a sync immediately.
+ onTrackballStateChanged(rawEvent->when, device);
+ device->trackball.accumulator.clear();
return;
}
}