diff options
| author | 2019-10-11 11:37:34 -0700 | |
|---|---|---|
| committer | 2019-10-11 11:50:08 -0700 | |
| commit | cd11aaaf2e33ff71b27b982a6b5024190ec442eb (patch) | |
| tree | f3d0724910c60cca7024e14072d9d4506fc59874 | |
| parent | 98bfc275494411c7888d806f307ae193f09c4e9e (diff) | |
Forwards onConfigurationChanged for PiP on reparenting
This fixes a regression caused by ag/5656236
PiP saves its last position on screen within
AppWindowToken.onConfigurationChanged callback, which is triggered by
Task.reparent before the task leaves pinned stack.
With ag/5656236, Task.reparent no longer triggers
AppWindowToken.onConfigurationChanged and instead, the latter will be
called when the task is added back to its original stack while the
pinned stack no longer exists.
Bug: 142504739
Test: atest PinnedStackTests#testEnterPictureInPictureSavePosition
Change-Id: I247a9da3113077031b442740445d836b0c176986
| -rw-r--r-- | services/core/java/com/android/server/wm/Task.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java index a181c1837af7..3cc35d0ef164 100644 --- a/services/core/java/com/android/server/wm/Task.java +++ b/services/core/java/com/android/server/wm/Task.java @@ -121,8 +121,11 @@ class Task extends WindowContainer<AppWindowToken> implements ConfigurationConta // TODO: Remove after unification. @Override public void onConfigurationChanged(Configuration newParentConfig) { - // Only forward configuration changes in cases where children won't get it from TaskRecord. - onConfigurationChanged(newParentConfig, mTaskRecord == null /*forwardToChildren*/); + // Forward configuration changes in cases + // - children won't get it from TaskRecord + // - it's a pinned task + onConfigurationChanged(newParentConfig, + (mTaskRecord == null) || inPinnedWindowingMode() /*forwardToChildren*/); } Task(int taskId, TaskStack stack, int userId, WindowManagerService service, int resizeMode, |