Loading AconfigFlags.bp +7 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ 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", Loading Loading @@ -1208,6 +1209,12 @@ 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", Loading core/java/android/view/SurfaceControl.java +17 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,9 @@ 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( Loading Loading @@ -3510,6 +3513,19 @@ 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 */ Loading Loading @@ -4882,4 +4898,5 @@ public final class SurfaceControl implements Parcelable { public static void notifyShutdown() { nativeNotifyShutdown(); } } core/java/android/view/animation/Animation.java +5 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Handler; import android.os.SystemProperties; import android.util.AttributeSet; import android.util.TypedValue; import android.view.WindowInsets; import dalvik.system.CloseGuard; Loading Loading @@ -881,12 +882,13 @@ public abstract class Animation implements Cloneable { } /** * @return if a window animation has outsets applied to it. * @return the edges to which outsets can be applied to * * @hide */ public boolean hasExtension() { return false; @WindowInsets.Side.InsetsSide public int getExtensionEdges() { return 0x0; } /** Loading core/java/android/view/animation/AnimationSet.java +6 −5 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ 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; Loading Loading @@ -540,12 +541,12 @@ public class AnimationSet extends Animation { /** @hide */ @Override public boolean hasExtension() { @WindowInsets.Side.InsetsSide public int getExtensionEdges() { int edge = 0x0; for (Animation animation : mAnimations) { if (animation.hasExtension()) { return true; edge |= animation.getExtensionEdges(); } } return false; return edge; } } core/java/android/view/animation/ExtendAnimation.java +19 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ 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. Loading Loading @@ -50,6 +51,8 @@ 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. * Loading Loading @@ -151,9 +154,22 @@ public class ExtendAnimation extends Animation { /** @hide */ @Override public boolean hasExtension() { return mFromInsets.left < 0 || mFromInsets.top < 0 || mFromInsets.right < 0 || mFromInsets.bottom < 0; @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; } @Override Loading Loading
AconfigFlags.bp +7 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,7 @@ 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", Loading Loading @@ -1208,6 +1209,12 @@ 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", Loading
core/java/android/view/SurfaceControl.java +17 −0 Original line number Diff line number Diff line Loading @@ -164,6 +164,9 @@ 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( Loading Loading @@ -3510,6 +3513,19 @@ 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 */ Loading Loading @@ -4882,4 +4898,5 @@ public final class SurfaceControl implements Parcelable { public static void notifyShutdown() { nativeNotifyShutdown(); } }
core/java/android/view/animation/Animation.java +5 −3 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ import android.os.Handler; import android.os.SystemProperties; import android.util.AttributeSet; import android.util.TypedValue; import android.view.WindowInsets; import dalvik.system.CloseGuard; Loading Loading @@ -881,12 +882,13 @@ public abstract class Animation implements Cloneable { } /** * @return if a window animation has outsets applied to it. * @return the edges to which outsets can be applied to * * @hide */ public boolean hasExtension() { return false; @WindowInsets.Side.InsetsSide public int getExtensionEdges() { return 0x0; } /** Loading
core/java/android/view/animation/AnimationSet.java +6 −5 Original line number Diff line number Diff line Loading @@ -21,6 +21,7 @@ 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; Loading Loading @@ -540,12 +541,12 @@ public class AnimationSet extends Animation { /** @hide */ @Override public boolean hasExtension() { @WindowInsets.Side.InsetsSide public int getExtensionEdges() { int edge = 0x0; for (Animation animation : mAnimations) { if (animation.hasExtension()) { return true; edge |= animation.getExtensionEdges(); } } return false; return edge; } }
core/java/android/view/animation/ExtendAnimation.java +19 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ 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. Loading Loading @@ -50,6 +51,8 @@ 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. * Loading Loading @@ -151,9 +154,22 @@ public class ExtendAnimation extends Animation { /** @hide */ @Override public boolean hasExtension() { return mFromInsets.left < 0 || mFromInsets.top < 0 || mFromInsets.right < 0 || mFromInsets.bottom < 0; @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; } @Override Loading