Merge "[Bugfix] Fix the issue of transition animation splash screen in split screen mode." am: 0665490327
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1867824 Change-Id: I0fd2ed247fb0e45747ef88431650491224362650
This commit is contained in:
@@ -1343,13 +1343,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
}
|
}
|
||||||
final Task rootTask = getRootTask();
|
final Task rootTask = getRootTask();
|
||||||
|
|
||||||
// If we reparent, make sure to remove ourselves from the old animation registry.
|
updateAnimatingActivityRegistry();
|
||||||
if (mAnimatingActivityRegistry != null) {
|
|
||||||
mAnimatingActivityRegistry.notifyFinished(this);
|
|
||||||
}
|
|
||||||
mAnimatingActivityRegistry = rootTask != null
|
|
||||||
? rootTask.getAnimatingActivityRegistry()
|
|
||||||
: null;
|
|
||||||
|
|
||||||
if (task == mLastParentBeforePip) {
|
if (task == mLastParentBeforePip) {
|
||||||
// Activity's reparented back from pip, clear the links once established
|
// Activity's reparented back from pip, clear the links once established
|
||||||
@@ -1373,6 +1367,20 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void updateAnimatingActivityRegistry() {
|
||||||
|
final Task rootTask = getRootTask();
|
||||||
|
final AnimatingActivityRegistry registry = rootTask != null
|
||||||
|
? rootTask.getAnimatingActivityRegistry()
|
||||||
|
: null;
|
||||||
|
|
||||||
|
// If we reparent, make sure to remove ourselves from the old animation registry.
|
||||||
|
if (mAnimatingActivityRegistry != null && mAnimatingActivityRegistry != registry) {
|
||||||
|
mAnimatingActivityRegistry.notifyFinished(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
mAnimatingActivityRegistry = registry;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets {@link #mLastParentBeforePip} to the current parent Task, it's caller's job to ensure
|
* Sets {@link #mLastParentBeforePip} to the current parent Task, it's caller's job to ensure
|
||||||
* {@link #getTask()} is set before this is called.
|
* {@link #getTask()} is set before this is called.
|
||||||
|
|||||||
@@ -1464,6 +1464,9 @@ class Task extends WindowContainer<WindowContainer> {
|
|||||||
adjustBoundsForDisplayChangeIfNeeded(getDisplayContent());
|
adjustBoundsForDisplayChangeIfNeeded(getDisplayContent());
|
||||||
|
|
||||||
mRootWindowContainer.updateUIDsPresentOnDisplay();
|
mRootWindowContainer.updateUIDsPresentOnDisplay();
|
||||||
|
|
||||||
|
// Ensure all animations are finished at same time in split-screen mode.
|
||||||
|
forAllActivities(ActivityRecord::updateAnimatingActivityRegistry);
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanUpActivityReferences(ActivityRecord r) {
|
void cleanUpActivityReferences(ActivityRecord r) {
|
||||||
|
|||||||
Reference in New Issue
Block a user