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

Commit af612001 authored by Robin Lee's avatar Robin Lee Committed by Android (Google) Code Review
Browse files

Revert "Edge extension effect: extend surfaces"

This reverts commit a7dad1fe.

Reason for revert: Claimed 3% increase in SF memory
Fix: 355860613

Change-Id: I2d181af33a2c6bfcef1074e8d8fa5bffd6af4e3f
parent a7dad1fe
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@ aconfig_declarations_group {
        "framework_graphics_flags_java_lib",
        "hwui_flags_java_lib",
        "libcore_exported_aconfig_flags_lib",
        "libgui_flags_java_lib",
        "power_flags_lib",
        "sdk_sandbox_flags_lib",
        "surfaceflinger_flags_java_lib",
@@ -1213,12 +1212,6 @@ java_aconfig_library {
    defaults: ["framework-minus-apex-aconfig-java-defaults"],
}

java_aconfig_library {
    name: "libgui_flags_java_lib",
    aconfig_declarations: "libgui_flags",
    defaults: ["framework-minus-apex-aconfig-java-defaults"],
}

// Content Capture
aconfig_declarations {
    name: "android.view.contentcapture.flags-aconfig",
+0 −17
Original line number Diff line number Diff line
@@ -164,9 +164,6 @@ public final class SurfaceControl implements Parcelable {
            float width, float height, float vecX, float vecY,
            float maxStretchAmountX, float maxStretchAmountY, float childRelativeLeft,
            float childRelativeTop, float childRelativeRight, float childRelativeBottom);
    private static native void nativeSetEdgeExtensionEffect(long transactionObj, long nativeObj,
                                                            boolean leftEdge, boolean rightEdge,
                                                            boolean topEdge, boolean bottomEdge);
    private static native void nativeSetTrustedOverlay(long transactionObj, long nativeObject,
            int isTrustedOverlay);
    private static native void nativeSetDropInputMode(
@@ -3513,19 +3510,6 @@ public final class SurfaceControl implements Parcelable {
            return this;
        }

        /**
         * @hide
         */
        public Transaction setEdgeExtensionEffect(SurfaceControl sc, int edge) {
            checkPreconditions(sc);

            nativeSetEdgeExtensionEffect(
                    mNativeObject, sc.mNativeObject,
                    (edge & WindowInsets.Side.LEFT) != 0, (edge & WindowInsets.Side.RIGHT) != 0,
                    (edge & WindowInsets.Side.TOP) != 0, (edge & WindowInsets.Side.BOTTOM) != 0);
            return this;
        }

        /**
         * @hide
         */
@@ -4898,5 +4882,4 @@ public final class SurfaceControl implements Parcelable {
    public static void notifyShutdown() {
        nativeNotifyShutdown();
    }

}
+3 −5
Original line number Diff line number Diff line
@@ -28,7 +28,6 @@ import android.os.Handler;
import android.os.SystemProperties;
import android.util.AttributeSet;
import android.util.TypedValue;
import android.view.WindowInsets;

import dalvik.system.CloseGuard;

@@ -882,13 +881,12 @@ public abstract class Animation implements Cloneable {
    }

    /**
     * @return the edges to which outsets can be applied to
     * @return if a window animation has outsets applied to it.
     *
     * @hide
     */
    @WindowInsets.Side.InsetsSide
    public int getExtensionEdges() {
        return 0x0;
    public boolean hasExtension() {
        return false;
    }

    /**
+5 −6
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import android.content.res.TypedArray;
import android.graphics.RectF;
import android.os.Build;
import android.util.AttributeSet;
import android.view.WindowInsets;

import java.util.ArrayList;
import java.util.List;
@@ -541,12 +540,12 @@ public class AnimationSet extends Animation {

    /** @hide */
    @Override
    @WindowInsets.Side.InsetsSide
    public int getExtensionEdges() {
        int edge = 0x0;
    public boolean hasExtension() {
        for (Animation animation : mAnimations) {
            edge |= animation.getExtensionEdges();
            if (animation.hasExtension()) {
                return true;
            }
        return edge;
        }
        return false;
    }
}
+3 −19
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@ import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Insets;
import android.util.AttributeSet;
import android.view.WindowInsets;

/**
 * An animation that controls the outset of an object.
@@ -51,8 +50,6 @@ public class ExtendAnimation extends Animation {
    private float mToRightValue;
    private float mToBottomValue;

    private int mExtensionEdges = 0x0;

    /**
     * Constructor used when an ExtendAnimation is loaded from a resource.
     *
@@ -154,22 +151,9 @@ public class ExtendAnimation extends Animation {

    /** @hide */
    @Override
    @WindowInsets.Side.InsetsSide
    public int getExtensionEdges() {
        mExtensionEdges = 0x0;
        if (mFromLeftValue > 0 || mToLeftValue > 0) {
            mExtensionEdges |= WindowInsets.Side.LEFT;
        }
        if (mFromRightValue > 0 || mToRightValue > 0) {
            mExtensionEdges |= WindowInsets.Side.RIGHT;
        }
        if (mFromTopValue > 0 || mToTopValue > 0) {
            mExtensionEdges |= WindowInsets.Side.TOP;
        }
        if (mFromBottomValue > 0 || mToBottomValue > 0) {
            mExtensionEdges |= WindowInsets.Side.BOTTOM;
        }
        return mExtensionEdges;
    public boolean hasExtension() {
        return mFromInsets.left < 0 || mFromInsets.top < 0 || mFromInsets.right < 0
                || mFromInsets.bottom < 0;
    }

    @Override
Loading