Add WindowInfosListener to Input
Register a WindowInfosListener in InputDispatcher to allow
it to listen for window info changes rather than SurfaceFlinger
having to talk directly to InputDispatcher.
Test: Existing tests pass
Bug: 188792659
Change-Id: If6ccfb0c8c5af0a7b3777c9002157128568cbb6e
diff --git a/services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp b/services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp
index f77c029..5e9facf 100644
--- a/services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp
+++ b/services/inputflinger/benchmarks/InputDispatcher_benchmarks.cpp
@@ -185,10 +185,11 @@
const sp<InputDispatcher>& dispatcher, const std::string name)
: FakeInputReceiver(dispatcher, name), mFrame(Rect(0, 0, WIDTH, HEIGHT)) {
inputApplicationHandle->updateInfo();
+ updateInfo();
mInfo.applicationInfo = *inputApplicationHandle->getInfo();
}
- virtual bool updateInfo() override {
+ void updateInfo() {
mInfo.token = mClientChannel->getConnectionToken();
mInfo.name = "FakeWindowHandle";
mInfo.type = WindowInfo::Type::APPLICATION;
@@ -207,8 +208,6 @@
mInfo.ownerPid = INJECTOR_PID;
mInfo.ownerUid = INJECTOR_UID;
mInfo.displayId = ADISPLAY_ID_DEFAULT;
-
- return true;
}
protected: