summaryrefslogtreecommitdiff
path: root/core/java/android
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2017-07-21 17:51:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2017-07-21 17:51:27 +0000
commita8d14a6ea0c7bb1717d2af03b0d4bce9c486b786 (patch)
tree0cafcff943aa48405ded93740d3c874139b9e748 /core/java/android
parent84c6684bba418c1e902e3bb57c61908ba1a99d6c (diff)
parent98eabbd68a90d92ec31dce0ed473348a6496db77 (diff)
Merge "Unhide invalidateColors API" into oc-mr1-dev
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/service/wallpaper/WallpaperService.java20
1 files changed, 9 insertions, 11 deletions
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index e4d3142ccefe..424967f0e011 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -547,12 +547,11 @@ public abstract class WallpaperService extends Service {
/**
* Notifies the engine that wallpaper colors changed significantly.
- * This will trigger a {@link #onComputeWallpaperColors()} call.
- * @hide
+ * This will trigger a {@link #onComputeColors()} call.
*/
- public void invalidateColors() {
+ public void notifyColorsChanged() {
try {
- mConnection.onWallpaperColorsChanged(onComputeWallpaperColors());
+ mConnection.onWallpaperColorsChanged(onComputeColors());
} catch (RemoteException e) {
Log.w(TAG, "Can't invalidate wallpaper colors because " +
"wallpaper connection was lost", e);
@@ -560,19 +559,18 @@ public abstract class WallpaperService extends Service {
}
/**
- * Notifies the system about what colors the wallpaper is using.
+ * Called by the system when it needs to know what colors the wallpaper is using.
* You might return null if no color information is available at the moment. In that case
- * you might want to call {@link #invalidateColors()} in a near future.
+ * you might want to call {@link #notifyColorsChanged()} in a near future.
* <p>
- * The simplest way of creating A {@link android.app.WallpaperColors} object is by using
+ * The simplest way of creating a {@link android.app.WallpaperColors} object is by using
* {@link android.app.WallpaperColors#fromBitmap(Bitmap)} or
* {@link android.app.WallpaperColors#fromDrawable(Drawable)}, but you can also specify
- * your main colors and dark text support explicitly using one of the constructors.
+ * your main colors by constructing a {@link android.app.WallpaperColors} object manually.
*
* @return Wallpaper colors.
- * @hide
*/
- public @Nullable WallpaperColors onComputeWallpaperColors() {
+ public @Nullable WallpaperColors onComputeColors() {
return null;
}
@@ -1212,7 +1210,7 @@ public abstract class WallpaperService extends Service {
mEngine = engine;
mActiveEngines.add(engine);
engine.attach(this);
- engine.invalidateColors();
+ engine.notifyColorsChanged();
return;
}
case DO_DETACH: {