Hide all color hints references
Change-Id: I9714bf8a982e0f58cab7e707129e81ee3d8cf5db
Fixes: 63096109
Test: make
diff --git a/api/current.txt b/api/current.txt
index d7f8ecd..6b18058 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -6089,17 +6089,15 @@
public final class WallpaperColors implements android.os.Parcelable {
ctor public WallpaperColors(android.os.Parcel);
- ctor public WallpaperColors(android.graphics.Color, android.graphics.Color, android.graphics.Color, int);
+ ctor public WallpaperColors(android.graphics.Color, android.graphics.Color, android.graphics.Color);
method public int describeContents();
method public static android.app.WallpaperColors fromBitmap(android.graphics.Bitmap);
method public static android.app.WallpaperColors fromDrawable(android.graphics.drawable.Drawable);
- method public int getColorHints();
method public android.graphics.Color getPrimaryColor();
method public android.graphics.Color getSecondaryColor();
method public android.graphics.Color getTertiaryColor();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.app.WallpaperColors> CREATOR;
- field public static final int HINT_SUPPORTS_DARK_TEXT = 1; // 0x1
}
public final class WallpaperInfo implements android.os.Parcelable {
diff --git a/api/system-current.txt b/api/system-current.txt
index 85e9175..62be1d3 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -6299,17 +6299,15 @@
public final class WallpaperColors implements android.os.Parcelable {
ctor public WallpaperColors(android.os.Parcel);
- ctor public WallpaperColors(android.graphics.Color, android.graphics.Color, android.graphics.Color, int);
+ ctor public WallpaperColors(android.graphics.Color, android.graphics.Color, android.graphics.Color);
method public int describeContents();
method public static android.app.WallpaperColors fromBitmap(android.graphics.Bitmap);
method public static android.app.WallpaperColors fromDrawable(android.graphics.drawable.Drawable);
- method public int getColorHints();
method public android.graphics.Color getPrimaryColor();
method public android.graphics.Color getSecondaryColor();
method public android.graphics.Color getTertiaryColor();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.app.WallpaperColors> CREATOR;
- field public static final int HINT_SUPPORTS_DARK_TEXT = 1; // 0x1
}
public final class WallpaperInfo implements android.os.Parcelable {
diff --git a/api/test-current.txt b/api/test-current.txt
index ed9071a..1aaf288 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -6110,17 +6110,15 @@
public final class WallpaperColors implements android.os.Parcelable {
ctor public WallpaperColors(android.os.Parcel);
- ctor public WallpaperColors(android.graphics.Color, android.graphics.Color, android.graphics.Color, int);
+ ctor public WallpaperColors(android.graphics.Color, android.graphics.Color, android.graphics.Color);
method public int describeContents();
method public static android.app.WallpaperColors fromBitmap(android.graphics.Bitmap);
method public static android.app.WallpaperColors fromDrawable(android.graphics.drawable.Drawable);
- method public int getColorHints();
method public android.graphics.Color getPrimaryColor();
method public android.graphics.Color getSecondaryColor();
method public android.graphics.Color getTertiaryColor();
method public void writeToParcel(android.os.Parcel, int);
field public static final android.os.Parcelable.Creator<android.app.WallpaperColors> CREATOR;
- field public static final int HINT_SUPPORTS_DARK_TEXT = 1; // 0x1
}
public final class WallpaperInfo implements android.os.Parcelable {
diff --git a/core/java/android/app/WallpaperColors.java b/core/java/android/app/WallpaperColors.java
index 8f172ba..57c7efc 100644
--- a/core/java/android/app/WallpaperColors.java
+++ b/core/java/android/app/WallpaperColors.java
@@ -36,16 +36,9 @@
/**
* Provides information about the colors of a wallpaper.
* <p>
- * This class contains two main components:
- * <ul>
- * <li>Named colors: Most visually representative colors of a wallpaper. Can be either
+ * Exposes the 3 most visually representative colors of a wallpaper. Can be either
* {@link WallpaperColors#getPrimaryColor()}, {@link WallpaperColors#getSecondaryColor()}
* or {@link WallpaperColors#getTertiaryColor()}.
- * </li>
- * <li>Hints: How colors may affect other system components. Currently the only supported hint is
- * {@link WallpaperColors#HINT_SUPPORTS_DARK_TEXT}, which specifies if dark text is preferred
- * over the wallpaper.</li>
- * </ul>
*/
public final class WallpaperColors implements Parcelable {
@@ -53,6 +46,7 @@
* Specifies that dark text is preferred over the current wallpaper for best presentation.
* <p>
* eg. A launcher may set its text color to black if this flag is specified.
+ * @hide
*/
public static final int HINT_SUPPORTS_DARK_TEXT = 0x1;
@@ -91,9 +85,8 @@
/**
* Constructs {@link WallpaperColors} from a drawable.
* <p>
- * Main colors will be extracted from the drawable and hints will be calculated.
+ * Main colors will be extracted from the drawable.
*
- * @see WallpaperColors#HINT_SUPPORTS_DARK_TEXT
* @param drawable Source where to extract from.
*/
public static WallpaperColors fromDrawable(Drawable drawable) {
@@ -122,9 +115,8 @@
/**
* Constructs {@link WallpaperColors} from a bitmap.
* <p>
- * Main colors will be extracted from the bitmap and hints will be calculated.
+ * Main colors will be extracted from the bitmap.
*
- * @see WallpaperColors#HINT_SUPPORTS_DARK_TEXT
* @param bitmap Source where to extract from.
*/
public static WallpaperColors fromBitmap(@NonNull Bitmap bitmap) {
@@ -185,6 +177,20 @@
}
/**
+ * Constructs a new object from three colors.
+ *
+ * @param primaryColor Primary color.
+ * @param secondaryColor Secondary color.
+ * @param tertiaryColor Tertiary color.
+ * @see WallpaperColors#fromBitmap(Bitmap)
+ * @see WallpaperColors#fromDrawable(Drawable)
+ */
+ public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor,
+ @Nullable Color tertiaryColor) {
+ this(primaryColor, secondaryColor, tertiaryColor, 0);
+ }
+
+ /**
* Constructs a new object from three colors, where hints can be specified.
*
* @param primaryColor Primary color.
@@ -194,6 +200,7 @@
* @see WallpaperColors#HINT_SUPPORTS_DARK_TEXT
* @see WallpaperColors#fromBitmap(Bitmap)
* @see WallpaperColors#fromDrawable(Drawable)
+ * @hide
*/
public WallpaperColors(@NonNull Color primaryColor, @Nullable Color secondaryColor,
@Nullable Color tertiaryColor, int colorHints) {
@@ -307,6 +314,7 @@
*
* @see WallpaperColors#HINT_SUPPORTS_DARK_TEXT
* @return True if dark text is supported.
+ * @hide
*/
public int getColorHints() {
return mColorHints;