Skip window infos updates if no listeners
This change fixes a bug where WindowInfosListenerInvoker's active
message count is incremented for messages when there are no listeners.
In this case, onWindowInfosReported is never called, leading to
out-of-sync window infos once listeners are added back. This scenario
may occur if system server dies.
Bug: 279792237
Test: WindowInfosListenerInvokerTest, manual tested by killing system server
Change-Id: If62f7cc56b48570f633e8e640006f020b053ea6f
diff --git a/services/surfaceflinger/tests/unittests/Android.bp b/services/surfaceflinger/tests/unittests/Android.bp
index 84a8529..86af303 100644
--- a/services/surfaceflinger/tests/unittests/Android.bp
+++ b/services/surfaceflinger/tests/unittests/Android.bp
@@ -139,6 +139,7 @@
"VSyncReactorTest.cpp",
"VsyncConfigurationTest.cpp",
"VsyncScheduleTest.cpp",
+ "WindowInfosListenerInvokerTest.cpp",
],
}