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

Commit ad287d07 authored by Issei Suzuki's avatar Issei Suzuki
Browse files

Override getAnimationFrames in Task and TaskStack.

Bug: 142617871
Bug: 131661052
Test: test app to apply animation on TaskStack.
Change-Id: I83d0bbb7db72a497e83dff04c55a8ca26746adbf
parent dd663ea3
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -471,6 +471,17 @@ class Task extends WindowContainer<ActivityRecord> implements ConfigurationConta
        }
    }

    @Override
    void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
            Rect outSurfaceInsets) {
        final WindowState windowState = getTopVisibleAppMainWindow();
        if (windowState != null) {
            windowState.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
        } else {
            super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
        }
    }

    /**
     * Calculate the maximum visible area of this task. If the task has only one app,
     * the result will be visible frame of that app. If the task has more than one apps,
+11 −0
Original line number Diff line number Diff line
@@ -1870,6 +1870,17 @@ public class TaskStack extends WindowContainer<Task> implements
        return mAnimatingActivityRegistry;
    }

    @Override
    void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
            Rect outSurfaceInsets) {
        final Task task = getTopChild();
        if (task != null) {
            task.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
        } else {
            super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
        }
    }

    @Override
    RemoteAnimationTarget createRemoteAnimationTarget(
            RemoteAnimationController.RemoteAnimationRecord record) {