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

Commit 92d8a508 authored by Riddle Hsu's avatar Riddle Hsu Committed by Android (Google) Code Review
Browse files

Merge "Remove unused getAnimationFrames" into main

parents cb56d524 21815665
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -9302,16 +9302,6 @@ final class ActivityRecord extends WindowToken {
        return true;
    }

    @Override
    void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
            Rect outSurfaceInsets) {
        final WindowState win = findMainWindow();
        if (win == null) {
            return;
        }
        win.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
    }

    void setPictureInPictureParams(PictureInPictureParams p) {
        pictureInPictureArgs.copyOnlySet(p);
        adjustPictureInPictureParamsIfNeeded(getBounds());
+0 −18
Original line number Diff line number Diff line
@@ -2986,24 +2986,6 @@ class Task extends TaskFragment {
        return isResizeable();
    }

    @Override
    void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
            Rect outSurfaceInsets) {
        // If this task has its adjacent task, it means they should animate together. Use display
        // bounds for them could move same as full screen task.
        if (hasAdjacentTask()) {
            super.getAnimationFrames(outFrame, outInsets, outStableInsets, outSurfaceInsets);
            return;
        }

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

    void setDragResizing(boolean dragResizing) {
        if (mDragResizing != dragResizing) {
            // No need to check if allowed if it's leaving dragResize
+0 −21
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ import android.util.RotationUtils;
import android.util.Slog;
import android.util.SparseArray;
import android.util.proto.ProtoOutputStream;
import android.view.DisplayInfo;
import android.view.InsetsFrameProvider;
import android.view.InsetsSource;
import android.view.InsetsState;
@@ -3248,26 +3247,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        return mLastSurfacePosition;
    }

    /**
     * The {@code outFrame} retrieved by this method specifies where the animation will finish
     * the entrance animation, as the next frame will display the window at these coordinates. In
     * case of exit animation, this is where the animation will start, as the frame before the
     * animation is displaying the window at these bounds.
     *
     * @param outFrame The bounds where entrance animation finishes or exit animation starts.
     * @param outInsets Insets that are covered by system windows.
     * @param outStableInsets Insets that determine the area covered by the stable system windows.
     * @param outSurfaceInsets Positive insets between the drawing surface and window content.
     */
    void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
            Rect outSurfaceInsets) {
        final DisplayInfo displayInfo = getDisplayContent().getDisplayInfo();
        outFrame.set(0, 0, displayInfo.appWidth, displayInfo.appHeight);
        outInsets.setEmpty();
        outStableInsets.setEmpty();
        outSurfaceInsets.setEmpty();
    }

    /** Gets the position of this container in its parent's coordinate. */
    void getRelativePosition(Point outPos) {
        getRelativePosition(getBounds(), outPos);
+0 −30
Original line number Diff line number Diff line
@@ -73,7 +73,6 @@ import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_REGION;
import static android.view.ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_VISIBLE;
import static android.view.WindowInsets.Type.navigationBars;
import static android.view.WindowInsets.Type.systemBars;
import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE;
import static android.view.WindowLayout.UNSPECIFIED_LENGTH;
import static android.view.WindowManager.LayoutParams.FIRST_SUB_WINDOW;
@@ -5562,35 +5561,6 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP
        return mKeyInterceptionInfo;
    }

    @Override
    void getAnimationFrames(Rect outFrame, Rect outInsets, Rect outStableInsets,
            Rect outSurfaceInsets) {
        // Containing frame will usually cover the whole screen, including dialog windows.
        // For freeform workspace windows it will not cover the whole screen and it also
        // won't exactly match the final freeform window frame (e.g. when overlapping with
        // the status bar). In that case we need to use the final frame.
        if (inFreeformWindowingMode()) {
            outFrame.set(getFrame());
        } else if (areAppWindowBoundsLetterboxed() || mToken.isFixedRotationTransforming()) {
            // 1. The letterbox surfaces should be animated with the owner activity, so use task
            //    bounds to include them.
            // 2. If the activity has fixed rotation transform, its windows are rotated in activity
            //    level. Because the animation runs before display is rotated, task bounds should
            //    represent the frames in display space coordinates.
            outFrame.set(getTask().getBounds());
        } else {
            outFrame.set(getParentFrame());
        }
        final Task task = getTask();
        final Rect bounds = task == null ? getBounds() : task.getBounds();
        outSurfaceInsets.set(mAttrs.surfaceInsets);
        final InsetsState state = getInsetsStateWithVisibilityOverride();
        outInsets.set(state.calculateInsets(outFrame, bounds, systemBars(),
                false /* ignoreVisibility */).toRect());
        outStableInsets.set(state.calculateInsets(outFrame, bounds, systemBars(),
                true /* ignoreVisibility */).toRect());
    }

    void setViewVisibility(int viewVisibility) {
        mViewVisibility = viewVisibility;