summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2018-03-22 06:16:00 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2018-03-22 06:16:00 +0000
commitab3ffe41944d7823f190fc38ebf4b82a763d0cd6 (patch)
tree6375759a8103a8f52e038df92ed5235b8e4276a1
parent82a938c149f53ae0a84404a9d40345d055340c9d (diff)
parente76b2b5db74e2ec0c768a419af149e6c80c2b963 (diff)
Merge "Letterbox: make letterbox work with drag resizing" into pi-dev
-rw-r--r--services/core/java/com/android/server/wm/WindowState.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 54b4123e54ca..993556faee7d 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -859,10 +859,12 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
// If the task has temp inset bounds set, we have to make sure all its windows uses
// the temp inset frame. Otherwise different display frames get applied to the main
// window and the child window, making them misaligned.
- if (inFullscreenContainer || isLetterboxedAppWindow()) {
- mInsetFrame.setEmpty();
- } else if (task != null && isInMultiWindowMode()) {
+ // Otherwise we need to clear the inset frame, to avoid using a stale frame after leaving
+ // multi window mode.
+ if (task != null && isInMultiWindowMode()) {
task.getTempInsetBounds(mInsetFrame);
+ } else {
+ mInsetFrame.setEmpty();
}
// Denotes the actual frame used to calculate the insets and to perform the layout. When