Letterboxing: ensure bar contrast
Ensures that any bars that draw over a letterbox draw their own
background such that they always have contrast.
This fixes an issue, where if a light status / navigation bar app was
letterboxed, the bar would still draw dark icons over the now black
letterbox, making the icons unreadable.
To do so, splits the letterbox into a layout and an apply surface
changes phase.
Change-Id: Ia8afa3386d75d9a72434d701b867c3ebc35cc36f
Fixes: 72696928
Test: Open a letterboxed app with a white navigation bar, verify it is visible
Test: ApiDemos > App > Activity > Max Aspect Ratio > 1:1, verify navbar is visible
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 91cd4bb..5912897 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -3074,6 +3074,11 @@
return (fl & FLAG_FULLSCREEN) != 0 || (sysui & (SYSTEM_UI_FLAG_FULLSCREEN)) != 0;
}
+ @Override
+ public boolean isLetterboxedOverlappingWith(Rect rect) {
+ return mAppToken != null && mAppToken.isLetterboxOverlappingWith(rect);
+ }
+
boolean isDragResizeChanged() {
return mDragResizing != computeDragResizing();
}