summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Evan Rosky <erosky@google.com> 2019-04-25 23:58:37 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-04-25 23:58:37 +0000
commit267730eff2cce85cbcad11c9c8621689bb829770 (patch)
treea19e082734df2ea1219f60322c2d9571d9d7aeea
parent8538ceba82a24b05e93d356aefdddf4504f7c190 (diff)
parent67c15649ae8e909f0c606b522d4582def32fee6d (diff)
Merge "Calculate letterbox against task displayed-bounds in multi-window" into qt-dev
-rw-r--r--services/core/java/com/android/server/wm/AppWindowToken.java12
1 files changed, 5 insertions, 7 deletions
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index df931956833b..a612799549a2 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -1981,13 +1981,11 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
mLetterbox.attachInput(w);
}
getPosition(mTmpPoint);
- // Get the bounds of the "space-to-fill". We union the Task and the Stack bounds here
- // to handle both split window (where task-bounds can be larger) and orientation
- // letterbox (where the task is letterboxed within stack).
- Rect spaceToFill = getTask().getBounds();
- if (getStack() != null) {
- spaceToFill.union(getStack().getBounds());
- }
+ // Get the bounds of the "space-to-fill". In multi-window mode, the task-level
+ // represents this. In fullscreen-mode, the stack does (since the orientation letterbox
+ // is also applied to the task).
+ Rect spaceToFill = (inMultiWindowMode() || getStack() == null)
+ ? getTask().getDisplayedBounds() : getStack().getDisplayedBounds();
mLetterbox.layout(spaceToFill, w.getFrameLw(), mTmpPoint);
} else if (mLetterbox != null) {
mLetterbox.hide();