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

Commit 5d678b64 authored by Nader Jawad's avatar Nader Jawad
Browse files

Update Drawable API to expose getOpticalBounds method as well as

the Insets class

Updated all Drawable implementations to remove the @hide annotation

Fixes: 78942648
Test: Re-run CtsGraphicsTestCases and updated Drawable CTS tests to
verify getOpticalBounds implementations

Change-Id: Id9b6bbbe15173e310bbf44184b4678fb29ef1cd8
parent 49689d7c
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -966,6 +966,10 @@ package android {
    field public static final int onClick = 16843375; // 0x101026f
    field public static final int oneshot = 16843159; // 0x1010197
    field public static final int opacity = 16843550; // 0x101031e
    field public static final int opticalInsetBottom = 16844170; // 0x101058a
    field public static final int opticalInsetLeft = 16844167; // 0x1010587
    field public static final int opticalInsetRight = 16844169; // 0x1010589
    field public static final int opticalInsetTop = 16844168; // 0x1010588
    field public static final int order = 16843242; // 0x10101ea
    field public static final int orderInCategory = 16843231; // 0x10101df
    field public static final int ordering = 16843490; // 0x10102e2
@@ -13748,6 +13752,16 @@ package android.graphics {
    field public static final int YV12 = 842094169; // 0x32315659
  }
  public class Insets {
    method public static android.graphics.Insets of(int, int, int, int);
    method public static android.graphics.Insets of(android.graphics.Rect);
    field public static final android.graphics.Insets NONE;
    field public final int bottom;
    field public final int left;
    field public final int right;
    field public final int top;
  }
  public class Interpolator {
    ctor public Interpolator(int);
    ctor public Interpolator(int, int);
@@ -14714,6 +14728,7 @@ package android.graphics.drawable {
    method public int getMinimumHeight();
    method public int getMinimumWidth();
    method public abstract int getOpacity();
    method public android.graphics.Insets getOpticalInsets();
    method public void getOutline(android.graphics.Outline);
    method public boolean getPadding(android.graphics.Rect);
    method public int[] getState();
+0 −8
Original line number Diff line number Diff line
@@ -1095,19 +1095,16 @@ Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;->mT
Landroid/graphics/drawable/AnimatedStateListDrawable;->mState:Landroid/graphics/drawable/AnimatedStateListDrawable$AnimatedStateListState;
Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;->callOnFinished(Landroid/graphics/drawable/AnimatedVectorDrawable$VectorDrawableAnimatorRT;I)V
Landroid/graphics/drawable/AnimationDrawable;->mCurFrame:I
Landroid/graphics/drawable/BitmapDrawable;->getOpticalInsets()Landroid/graphics/Insets;
Landroid/graphics/drawable/BitmapDrawable;->getTint()Landroid/content/res/ColorStateList;
Landroid/graphics/drawable/BitmapDrawable;->getTintMode()Landroid/graphics/PorterDuff$Mode;
Landroid/graphics/drawable/BitmapDrawable;->mTargetDensity:I
Landroid/graphics/drawable/BitmapDrawable;->setBitmap(Landroid/graphics/Bitmap;)V
Landroid/graphics/drawable/ColorDrawable$ColorState;->mUseColor:I
Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets;
Landroid/graphics/drawable/Drawable;->inflateWithAttributes(Landroid/content/res/Resources;Lorg/xmlpull/v1/XmlPullParser;Landroid/content/res/TypedArray;I)V
Landroid/graphics/drawable/Drawable;->mCallback:Ljava/lang/ref/WeakReference;
Landroid/graphics/drawable/Drawable;->parseTintMode(ILandroid/graphics/PorterDuff$Mode;)Landroid/graphics/PorterDuff$Mode;
Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mConstantPadding:Landroid/graphics/Rect;
Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;->mDrawables:[Landroid/graphics/drawable/Drawable;
Landroid/graphics/drawable/DrawableContainer;->getOpticalInsets()Landroid/graphics/Insets;
Landroid/graphics/drawable/DrawableContainer;->mDrawableContainerState:Landroid/graphics/drawable/DrawableContainer$DrawableContainerState;
Landroid/graphics/drawable/DrawableInflater;->mClassLoader:Ljava/lang/ClassLoader;
Landroid/graphics/drawable/GradientDrawable$GradientState;->mAngle:I
@@ -1129,7 +1126,6 @@ Landroid/graphics/drawable/GradientDrawable$GradientState;->mStrokeWidth:I
Landroid/graphics/drawable/GradientDrawable$GradientState;->mThickness:I
Landroid/graphics/drawable/GradientDrawable$GradientState;->mThicknessRatio:F
Landroid/graphics/drawable/GradientDrawable$GradientState;->mWidth:I
Landroid/graphics/drawable/GradientDrawable;->getOpticalInsets()Landroid/graphics/Insets;
Landroid/graphics/drawable/GradientDrawable;->mFillPaint:Landroid/graphics/Paint;
Landroid/graphics/drawable/GradientDrawable;->mGradientState:Landroid/graphics/drawable/GradientDrawable$GradientState;
Landroid/graphics/drawable/GradientDrawable;->mPadding:Landroid/graphics/Rect;
@@ -1170,10 +1166,6 @@ Landroid/graphics/GraphicBuffer;->createFromExisting(IIIIJ)Landroid/graphics/Gra
Landroid/graphics/GraphicBuffer;->CREATOR:Landroid/os/Parcelable$Creator;
Landroid/graphics/GraphicBuffer;->mNativeObject:J
Landroid/graphics/ImageDecoder;->postProcessAndRelease(Landroid/graphics/Canvas;)I
Landroid/graphics/Insets;->bottom:I
Landroid/graphics/Insets;->left:I
Landroid/graphics/Insets;->right:I
Landroid/graphics/Insets;->top:I
Landroid/graphics/LinearGradient;->mColors:[I
Landroid/graphics/Matrix;->native_instance:J
Landroid/graphics/Movie;-><init>(J)V
+8 −16
Original line number Diff line number Diff line
@@ -5734,17 +5734,13 @@
        <!-- When a tint color is set, specifies its Porter-Duff blending mode. The
             default value is src_in, which treats the drawable as an alpha mask. -->
        <attr name="tintMode" />
        <!-- Left optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Left optical inset. -->
        <attr name="opticalInsetLeft" />
        <!-- Top optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Top optical inset. -->
        <attr name="opticalInsetTop" />
        <!-- Right optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Right optical inset. -->
        <attr name="opticalInsetRight" />
        <!-- Bottom optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Bottom optical inset. -->
        <attr name="opticalInsetBottom" />
    </declare-styleable>

@@ -6243,17 +6239,13 @@
        <!-- The opacity of the whole vector drawable, as a value between 0
             (completely transparent) and 1 (completely opaque). -->
        <attr name="alpha" />
        <!-- Left optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Left optical inset. -->
        <attr name="opticalInsetLeft" format="dimension" />
        <!-- Top optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Top optical inset. -->
        <attr name="opticalInsetTop" format="dimension" />
        <!-- Right optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Right optical inset. -->
        <attr name="opticalInsetRight" format="dimension" />
        <!-- Bottom optical inset.
             @hide Until optical insets are fully supported. -->
        <!-- Bottom optical inset. -->
        <attr name="opticalInsetBottom" format="dimension" />
    </declare-styleable>

+4 −0
Original line number Diff line number Diff line
@@ -2903,6 +2903,10 @@
  <eat-comment />

    <public-group type="attr" first-id="0x01010587">
        <public name="opticalInsetLeft" />
        <public name="opticalInsetTop" />
        <public name="opticalInsetRight" />
        <public name="opticalInsetBottom" />
    </public-group>

    <public-group type="style" first-id="0x010302e2">
+5 −0
Original line number Diff line number Diff line
@@ -3379,4 +3379,9 @@
  <java-symbol type="id" name="user_loading" />

  <java-symbol type="string" name="battery_saver_description_with_learn_more" />

  <java-symbol type="attr" name="opticalInsetLeft" />
  <java-symbol type="attr" name="opticalInsetTop" />
  <java-symbol type="attr" name="opticalInsetRight" />
  <java-symbol type="attr" name="opticalInsetBottom" />
</resources>
Loading