Revert "Send mapper events via context"
This reverts commit cec3f6a94b1cd510d6c2f7ef9935db95fa115297.
As we discussed with Chris and Michael, it is more natural to keep the
flow of inputreader -> inputdevice -> inputmapper -> inputlistener
rather than having to come back to inputreader.
This also reduces the redundancy of having to mimic the inputlistener
interface inside the inputreader context.
Bug: 169866723
Test: atest inputflinger_tests
Change-Id: I4244947810d99ff40cfffaa34f6374aa18a238c6
diff --git a/services/inputflinger/reader/InputDevice.cpp b/services/inputflinger/reader/InputDevice.cpp
index 8fc6f4a..574f651 100644
--- a/services/inputflinger/reader/InputDevice.cpp
+++ b/services/inputflinger/reader/InputDevice.cpp
@@ -520,7 +520,8 @@
}
void InputDevice::notifyReset(nsecs_t when) {
- mContext->notifyDeviceReset(when, mId);
+ NotifyDeviceResetArgs args(mContext->getNextId(), when, mId);
+ mContext->getListener()->notifyDeviceReset(&args);
}
std::optional<int32_t> InputDevice::getAssociatedDisplayId() {