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

Commit 3bd05102 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "m3: change gradient_drawable_shape_rounded_cap namespace to wear" into main

parents 0a3f7fd7 1bb3dfc2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18112,7 +18112,7 @@ package android.graphics.drawable {
    method public void setThickness(@Px int);
    method public void setThicknessRatio(@FloatRange(from=0.0f, fromInclusive=false) float);
    method public void setUseLevel(boolean);
    field @FlaggedApi("com.android.graphics.flags.gradient_drawable_shape_rounded_cap") public static final int ARC = 4; // 0x4
    field @FlaggedApi("com.android.graphics.flags.gradient_drawable_shape_arc_for_rounded_cap") public static final int ARC = 4; // 0x4
    field public static final int LINE = 2; // 0x2
    field public static final int LINEAR_GRADIENT = 0; // 0x0
    field public static final int OVAL = 1; // 0x1
+3 −3
Original line number Diff line number Diff line
@@ -44,9 +44,9 @@ flag {
}

flag {
  name: "gradient_drawable_shape_rounded_cap"
  name: "gradient_drawable_shape_arc_for_rounded_cap"
  is_fixed_read_only: true
  namespace: "core_graphics"
  description: "Make GradientDrawable support drawing ring with rounded stroke cap."
  namespace: "wear_frameworks"
  description: "Make GradientDrawable support arc shape for drawing ring with rounded stroke cap."
  bug: "380000245"
}
+4 −5
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@

package android.graphics.drawable;

import static com.android.graphics.flags.Flags.FLAG_GRADIENT_DRAWABLE_SHAPE_ROUNDED_CAP;
import static com.android.graphics.flags.Flags.gradientDrawableShapeRoundedCap;
import static com.android.graphics.flags.Flags.FLAG_GRADIENT_DRAWABLE_SHAPE_ARC_FOR_ROUNDED_CAP;
import static com.android.graphics.flags.Flags.gradientDrawableShapeArcForRoundedCap;

import android.annotation.ColorInt;
import android.annotation.FlaggedApi;
@@ -132,7 +132,7 @@ public class GradientDrawable extends Drawable {
    /**
     * Shape is an arc.
     */
    @FlaggedApi(FLAG_GRADIENT_DRAWABLE_SHAPE_ROUNDED_CAP)
    @FlaggedApi(FLAG_GRADIENT_DRAWABLE_SHAPE_ARC_FOR_ROUNDED_CAP)
    public static final int ARC = 4;

    /** @hide */
@@ -874,7 +874,7 @@ public class GradientDrawable extends Drawable {
                break;
            }
            case ARC:
                if (gradientDrawableShapeRoundedCap()) {
                if (gradientDrawableShapeArcForRoundedCap()) {
                    // TODO(b/394988176): Consider applying ARC drawing logic to RING shape.
                    float centerX = mRect.centerX();
                    float centerY = mRect.centerY();
@@ -2159,7 +2159,6 @@ public class GradientDrawable extends Drawable {
        public int mInnerRadius = -1;
        @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 124050218)
        public int mThickness = -1;
        @UnsupportedAppUsage(trackingBug = 380000245)
        @StrokeCap public int mStrokeCap = ROUND;

        public boolean mDither = false;