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

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

Change-Id: I1ca28e9d80b0c065335bfb0867e2736da9330895
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:26:34 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 1 deletions

View File

@@ -1701,7 +1701,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);