Merge "Youtube application when moving to PIP animation was very bad" am: b3c0709168 am: 692dca6088

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2383973

Change-Id: Ia6f804dff29995648b5120f4f5ac4d51eb34e89f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongwei Wang
2023-03-09 03:45:48 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 1 deletions

View File

@@ -1717,7 +1717,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
: null;
}
private void clearLastParentBeforePip() {
void clearLastParentBeforePip() {
if (mLastParentBeforePip != null) {
mLastParentBeforePip.mChildPipActivity = null;
mLastParentBeforePip = null;

View File

@@ -2604,6 +2604,9 @@ class Task extends TaskFragment {
EventLogTags.writeWmTaskRemoved(mTaskId, reason);
clearPinnedTaskIfNeed();
if (mChildPipActivity != null) {
mChildPipActivity.clearLastParentBeforePip();
}
// If applicable let the TaskOrganizer know the Task is vanishing.
setTaskOrganizer(null);