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

This commit is contained in:
Hongwei Wang
2023-03-09 03:13:44 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 1 deletions

View File

@@ -1711,7 +1711,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

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