Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0c59385 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "[Bugfix] Fix the issue of transition animation splash screen in split...

Merge "[Bugfix] Fix the issue of transition animation splash screen in split screen mode." am: 06654903 am: 5d876166 am: a59b7737 am: 4c973b36 am: 70d1aef9

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

Change-Id: Ie00e6a99c7745f3c85ce02ea0ee05c8673a0f943
parents 43bfb312 70d1aef9
Loading
Loading
Loading
Loading
+15 −7
Original line number Diff line number Diff line
@@ -1442,13 +1442,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        }
        final Task rootTask = getRootTask();

        // If we reparent, make sure to remove ourselves from the old animation registry.
        if (mAnimatingActivityRegistry != null) {
            mAnimatingActivityRegistry.notifyFinished(this);
        }
        mAnimatingActivityRegistry = rootTask != null
                ? rootTask.getAnimatingActivityRegistry()
                : null;
        updateAnimatingActivityRegistry();

        if (task == mLastParentBeforePip) {
            // Activity's reparented back from pip, clear the links once established
@@ -1481,6 +1475,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
     * {@link #getTask()} is set before this is called.
+3 −0
Original line number Diff line number Diff line
@@ -1218,6 +1218,9 @@ class Task extends TaskFragment {
        adjustBoundsForDisplayChangeIfNeeded(getDisplayContent());

        mRootWindowContainer.updateUIDsPresentOnDisplay();

        // Ensure all animations are finished at same time in split-screen mode.
        forAllActivities(ActivityRecord::updateAnimatingActivityRegistry);
    }

    @Override