GestureNav: Log exclusion rect heights
Logs the rejected and requested exclusion rect heights.
Test: adb shell device_config put android:window_manager key_system_gesture_exclusion_log_debounce_millis 1000
Bug: 135152789
Change-Id: Ie12640f4bf0a8b40b666e604188a0bedd85e8981
Exempt-From-Owner-Approval: DeviceConfig.java: Adding constant to WindowManager namespace.
diff --git a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
index 7cd097e..6889086 100644
--- a/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
+++ b/services/tests/wmtests/src/com/android/server/wm/DisplayContentTests.java
@@ -756,7 +756,8 @@
final ISystemGestureExclusionListener.Stub verifier =
new ISystemGestureExclusionListener.Stub() {
@Override
- public void onSystemGestureExclusionChanged(int displayId, Region actual) {
+ public void onSystemGestureExclusionChanged(int displayId, Region actual,
+ Region unrestricted) {
Region expected = Region.obtain();
expected.set(10, 20, 30, 40);
assertEquals(expected, actual);
@@ -790,7 +791,14 @@
final Region expected = Region.obtain();
expected.set(20, 30, 40, 50);
- assertEquals(expected, dc.calculateSystemGestureExclusion());
+ assertEquals(expected, calculateSystemGestureExclusion(dc));
+ }
+
+ private Region calculateSystemGestureExclusion(DisplayContent dc) {
+ Region out = Region.obtain();
+ Region unrestricted = Region.obtain();
+ dc.calculateSystemGestureExclusion(out, unrestricted);
+ return out;
}
@Test
@@ -814,7 +822,7 @@
win2.setHasSurface(true);
final Region expected = Region.obtain();
- assertEquals(expected, dc.calculateSystemGestureExclusion());
+ assertEquals(expected, calculateSystemGestureExclusion(dc));
}
@Test
@@ -839,7 +847,7 @@
final Region expected = Region.obtain();
expected.set(dc.getBounds());
- assertEquals(expected, dc.calculateSystemGestureExclusion());
+ assertEquals(expected, calculateSystemGestureExclusion(dc));
win.setHasSurface(false);
}