Don't include sysUI insets on secondary displays
Currently there is a single instance of WindowManagerPolicy
used in Window Manager and it is configured according to
primary display settings. Because of that it reports display
size with navigation bar insets even for secondary displays.
This CL adds displayId param, so it can adjust reported metrics
correctly when requested.
Bug: 32910901
Test: android.display.cts.DisplayTest
Change-Id: I14967fc13907c4fde17aed6a769d03cbde3ec1be
diff --git a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
index 38a98b2..ed4c79f 100644
--- a/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
+++ b/services/tests/servicestests/src/com/android/server/wm/TestWindowManagerPolicy.java
@@ -272,22 +272,26 @@
}
@Override
- public int getNonDecorDisplayWidth(int fullWidth, int fullHeight, int rotation, int uiMode) {
+ public int getNonDecorDisplayWidth(int fullWidth, int fullHeight, int rotation, int uiMode,
+ int displayId) {
return 0;
}
@Override
- public int getNonDecorDisplayHeight(int fullWidth, int fullHeight, int rotation, int uiMode) {
+ public int getNonDecorDisplayHeight(int fullWidth, int fullHeight, int rotation, int uiMode,
+ int displayId) {
return 0;
}
@Override
- public int getConfigDisplayWidth(int fullWidth, int fullHeight, int rotation, int uiMode) {
+ public int getConfigDisplayWidth(int fullWidth, int fullHeight, int rotation, int uiMode,
+ int displayId) {
return 0;
}
@Override
- public int getConfigDisplayHeight(int fullWidth, int fullHeight, int rotation, int uiMode) {
+ public int getConfigDisplayHeight(int fullWidth, int fullHeight, int rotation, int uiMode,
+ int displayId) {
return 0;
}