diff --git a/api/current.txt b/api/current.txt index 6a2c8424ef66b..c25a0bc7c6678 100644 --- a/api/current.txt +++ b/api/current.txt @@ -13552,10 +13552,12 @@ package android.graphics { method public static android.graphics.Bitmap createScaledBitmap(@NonNull android.graphics.Bitmap, int, int, boolean); method public int describeContents(); method public void eraseColor(@ColorInt int); + method public void eraseColor(@ColorLong long); method @CheckResult public android.graphics.Bitmap extractAlpha(); method @CheckResult public android.graphics.Bitmap extractAlpha(android.graphics.Paint, int[]); method public int getAllocationByteCount(); method public int getByteCount(); + method public android.graphics.Color getColor(int, int); method @Nullable public android.graphics.ColorSpace getColorSpace(); method public android.graphics.Bitmap.Config getConfig(); method public int getDensity(); @@ -13581,6 +13583,7 @@ package android.graphics { method public void reconfigure(int, int, android.graphics.Bitmap.Config); method public void recycle(); method public boolean sameAs(android.graphics.Bitmap); + method public void setColorSpace(@NonNull android.graphics.ColorSpace); method public void setConfig(android.graphics.Bitmap.Config); method public void setDensity(int); method public void setHasAlpha(boolean); @@ -14380,6 +14383,7 @@ package android.graphics { method @Nullable public android.graphics.BlendMode getBlendMode(); method @ColorInt public int getColor(); method public android.graphics.ColorFilter getColorFilter(); + method @ColorLong public long getColorLong(); method public boolean getFillPath(android.graphics.Path, android.graphics.Path); method public int getFlags(); method public String getFontFeatureSettings(); @@ -14400,6 +14404,7 @@ package android.graphics { method public float getRunAdvance(CharSequence, int, int, int, int, boolean, int); method public android.graphics.Shader getShader(); method @ColorInt public int getShadowLayerColor(); + method @ColorLong public long getShadowLayerColorLong(); method public float getShadowLayerDx(); method public float getShadowLayerDy(); method public float getShadowLayerRadius(); @@ -14454,6 +14459,7 @@ package android.graphics { method public void setAntiAlias(boolean); method public void setBlendMode(@Nullable android.graphics.BlendMode); method public void setColor(@ColorInt int); + method public void setColor(@ColorLong long); method public android.graphics.ColorFilter setColorFilter(android.graphics.ColorFilter); method public void setDither(boolean); method public void setElegantTextHeight(boolean); @@ -14470,6 +14476,7 @@ package android.graphics { method public android.graphics.PathEffect setPathEffect(android.graphics.PathEffect); method public android.graphics.Shader setShader(android.graphics.Shader); method public void setShadowLayer(float, float, float, @ColorInt int); + method public void setShadowLayer(float, float, float, @ColorLong long); method public void setStrikeThruText(boolean); method public void setStrokeCap(android.graphics.Paint.Cap); method public void setStrokeJoin(android.graphics.Paint.Join); diff --git a/api/test-current.txt b/api/test-current.txt index 91d00191a5436..43a29128b60c5 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -518,23 +518,10 @@ package android.database.sqlite { package android.graphics { - public final class Bitmap implements android.os.Parcelable { - method public void eraseColor(@ColorLong long); - method public android.graphics.Color getColor(int, int); - method public void setColorSpace(@NonNull android.graphics.ColorSpace); - } - public final class ImageDecoder implements java.lang.AutoCloseable { method @AnyThread @NonNull public static android.graphics.ImageDecoder.Source createSource(android.content.res.Resources, java.io.InputStream, int); } - public class Paint { - method @ColorLong public long getColorLong(); - method @ColorLong public long getShadowLayerColorLong(); - method public void setColor(@ColorLong long); - method public void setShadowLayer(float, float, float, @ColorLong long); - } - } package android.graphics.drawable { diff --git a/graphics/java/android/graphics/Bitmap.java b/graphics/java/android/graphics/Bitmap.java index 97cb2ec2b4f71..f9e7dd1773424 100644 --- a/graphics/java/android/graphics/Bitmap.java +++ b/graphics/java/android/graphics/Bitmap.java @@ -21,7 +21,6 @@ import android.annotation.ColorInt; import android.annotation.ColorLong; import android.annotation.NonNull; import android.annotation.Nullable; -import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.annotation.WorkerThread; import android.content.res.ResourcesImpl; @@ -1762,9 +1761,7 @@ public final class Bitmap implements Parcelable { * previously assigned color space. * * @param colorSpace to assign to the bitmap - * @hide */ - @TestApi public void setColorSpace(@NonNull ColorSpace colorSpace) { checkRecycled("setColorSpace called on a recycled bitmap"); if (colorSpace == null) { @@ -1815,9 +1812,7 @@ public final class Bitmap implements Parcelable { * @throws IllegalArgumentException if the color space encoded in the long * is invalid or unknown. * - * @hide pending API approval */ - @TestApi public void eraseColor(@ColorLong long c) { checkRecycled("Can't erase a recycled bitmap"); if (!isMutable()) { @@ -1864,9 +1859,7 @@ public final class Bitmap implements Parcelable { * @throws IllegalArgumentException if x, y exceed the bitmap's bounds * @throws IllegalStateException if the bitmap's config is {@link Config#HARDWARE} * - * @hide pending API approval */ - @TestApi public Color getColor(int x, int y) { checkRecycled("Can't call getColor() on a recycled bitmap"); checkHardware("unable to getColor(), " diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java index 7eee6f4bf37df..73442db1c1430 100644 --- a/graphics/java/android/graphics/Paint.java +++ b/graphics/java/android/graphics/Paint.java @@ -24,7 +24,6 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.annotation.Px; import android.annotation.Size; -import android.annotation.TestApi; import android.annotation.UnsupportedAppUsage; import android.graphics.fonts.FontVariationAxis; import android.os.Build; @@ -974,10 +973,7 @@ public class Paint { * @see Color for APIs that help manipulate a color long. * * @return the paint's color (and alpha). - * - * @hide pending API approval */ - @TestApi @ColorLong public long getColorLong() { return mColor; @@ -1006,10 +1002,7 @@ public class Paint { * to set in the paint. * @throws IllegalArgumentException if the color space encoded in the long * is invalid or unknown. - * - * @hide pending API approval */ - @TestApi public void setColor(@ColorLong long color) { ColorSpace cs = Color.colorSpace(color); float r = Color.red(color); @@ -1445,10 +1438,7 @@ public class Paint { * * @throws IllegalArgumentException if the color space encoded in the long * is invalid or unknown. - * - * @hide pending API approval */ - @TestApi public void setShadowLayer(float radius, float dx, float dy, @ColorLong long shadowColor) { ColorSpace cs = Color.colorSpace(shadowColor); float r = Color.red(shadowColor); @@ -1517,9 +1507,7 @@ public class Paint { * Returns the color of the shadow layer. * @see #setShadowLayer(float,float,float,int) * @see #setShadowLayer(float,float,float,long) - * @hide pending API approval */ - @TestApi public @ColorLong long getShadowLayerColorLong() { return mShadowLayerColor; }