Update max window bounds based on display changes.
This changelist updates the TouchMonitor logic to only query the
display's max window bounds on changes. This prevents unnecessary
operations on each motion event.
Test: atest TouchMonitorTest#testDisplayListenerUpdatesBounds
test: atest TouchMonitorTest#testDisplayListenerUnregisters
Fixes: 330906135
Flag: ACONFIG com.android.systemui.ambient_touch_monitor_listen_to_display_changes DISABLED
Change-Id: I52ad200ff27a88dfb305137c097e9605a66dae80
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index fadef1e..a57bbbc 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -828,3 +828,13 @@
description: "Enforce BaseUserRestriction for DISALLOW_CONFIG_BRIGHTNESS."
bug: "329205638"
}
+
+flag {
+ name: "ambient_touch_monitor_listen_to_display_changes"
+ namespace: "systemui"
+ description: "listen to display changes and cache window metrics"
+ bug: "330906135"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}