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

Commit 040ddba0 authored by Issei Suzuki's avatar Issei Suzuki
Browse files

Remove non-hierarchical animation logic.

Bug: 162231708
Test: atest AppTransitionControllerTest
Change-Id: Ic6eb3aa7424a351ec1fd8648ded76b30e73c46b3
parent 3805b471
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -5919,10 +5919,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        // stack, i.e. the hierarchy of the surfaces is unchanged.
        if (inPinnedWindowingMode()) {
            return getStack().getSurfaceControl();
        } else if (WindowManagerService.sHierarchicalAnimations) {
            return super.getAnimationLeashParent();
        } else {
            return getAppAnimationLayer();
            return super.getAnimationLeashParent();
        }
    }

@@ -6010,11 +6008,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
            mAnimationBoundsLayer = createAnimationBoundsLayer(t);

            // Crop to stack bounds.
            if (!WindowManagerService.sHierarchicalAnimations) {
                // For Hierarchical animation, we don't need to set window crop since the leash
                // surface size has already same as the animating container.
                t.setWindowCrop(mAnimationBoundsLayer, mTmpRect);
            }
            t.setLayer(leash, 0);
            t.setLayer(mAnimationBoundsLayer, getAnimationLayer());

+0 −4
Original line number Diff line number Diff line
@@ -411,10 +411,6 @@ public class AppTransitionController {
            }
        }

        if (!WindowManagerService.sHierarchicalAnimations) {
            return new ArraySet<>(candidates);
        }

        final ArraySet<ActivityRecord> otherApps = visible ? closingApps : openingApps;
        // Ancestors of closing apps while finding animation targets for opening apps, or ancestors
        // of opening apps while finding animation targets for closing apps.
+0 −11
Original line number Diff line number Diff line
@@ -3729,17 +3729,6 @@ class Task extends WindowContainer<WindowContainer> {
        return super.makeAnimationLeash().setMetadata(METADATA_TASK_ID, mTaskId);
    }

    @Override
    public SurfaceControl getAnimationLeashParent() {
        if (WindowManagerService.sHierarchicalAnimations) {
            return super.getAnimationLeashParent();
        }
        // Currently, only the recents animation will create animation leashes for tasks. In this
        // case, reparent the task to the home animation layer while it is being animated to allow
        // the home activity to reorder the app windows relative to its own.
        return getAppAnimationLayer(ANIMATION_LAYER_HOME);
    }

    @Override
    void resetSurfacePositionForAnimationLeash(SurfaceControl.Transaction t) {
        if (isOrganized()) return;
+0 −5
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import static com.android.server.wm.WindowManagerDebugConfig.DEBUG_ANIM;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WITH_CLASS_NAME;
import static com.android.server.wm.WindowManagerDebugConfig.TAG_WM;
import static com.android.server.wm.WindowManagerService.logWithStack;
import static com.android.server.wm.WindowManagerService.sHierarchicalAnimations;
import static com.android.server.wm.WindowStateAnimator.STACK_CLIP_AFTER_ANIM;

import android.annotation.CallSuper;
@@ -2366,10 +2365,6 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
        final Rect screenBounds = getAnimationBounds(appStackClipMode);
        mTmpRect.set(screenBounds);
        getAnimationPosition(mTmpPoint);
        if (!sHierarchicalAnimations) {
            // Non-hierarchical animation uses position in global coordinates.
            mTmpPoint.set(mTmpRect.left, mTmpRect.top);
        }
        mTmpRect.offsetTo(0, 0);

        final RemoteAnimationController controller =
+0 −16
Original line number Diff line number Diff line
@@ -395,25 +395,9 @@ public class WindowManagerService extends IWindowManager.Stub
    // trying to apply a new one.
    private static final boolean ALWAYS_KEEP_CURRENT = true;

    /**
     * If set, new app transition framework which supports setting animation on any element
     * in a surface is used.
     * <p>
     * Only set this to non-zero once the new app transition framework is productionalized.
     * </p>
     */
    private static final String HIERARCHICAL_ANIMATIONS_PROPERTY =
            "persist.wm.hierarchical_animations";

    private static final String DISABLE_TRIPLE_BUFFERING_PROPERTY =
            "ro.sf.disable_triple_buffer";

    /**
     * @see #HIERARCHICAL_ANIMATIONS_PROPERTY
     */
    static boolean sHierarchicalAnimations =
            SystemProperties.getBoolean(HIERARCHICAL_ANIMATIONS_PROPERTY, true);

    static boolean sEnableTripleBuffering = !SystemProperties.getBoolean(
            DISABLE_TRIPLE_BUFFERING_PROPERTY, false);

Loading