summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Lucas Dupin <dupin@google.com> 2017-07-21 18:32:03 +0000
committer android-build-merger <android-build-merger@google.com> 2017-07-21 18:32:03 +0000
commit8c9a80e203630c7df255e0cb97dce807990ddb9f (patch)
tree3509697d78050904e46adfa25b61a6e6d7ec4e4c
parent1eb8b3cf489879a9de29c8f64e01678b79f5369b (diff)
parent6ccce0c175996732bce9ed416267fac6e018d1af (diff)
Merge "Unhide invalidateColors API" into oc-mr1-dev am: a8d14a6ea0
am: 6ccce0c175 Change-Id: Ie10774063dab4d36efa63a6f40445e3d752bac6c
-rw-r--r--api/current.txt2
-rw-r--r--api/system-current.txt2
-rw-r--r--api/test-current.txt2
-rw-r--r--core/java/android/service/wallpaper/WallpaperService.java20
4 files changed, 15 insertions, 11 deletions
diff --git a/api/current.txt b/api/current.txt
index 0094b5ade49c..2428da1a4390 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -37768,8 +37768,10 @@ package android.service.wallpaper {
method public android.view.SurfaceHolder getSurfaceHolder();
method public boolean isPreview();
method public boolean isVisible();
+ method public void notifyColorsChanged();
method public void onApplyWindowInsets(android.view.WindowInsets);
method public android.os.Bundle onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean);
+ method public android.app.WallpaperColors onComputeColors();
method public void onCreate(android.view.SurfaceHolder);
method public void onDesiredSizeChanged(int, int);
method public void onDestroy();
diff --git a/api/system-current.txt b/api/system-current.txt
index 4cc1731632cf..065ae649963a 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -41098,8 +41098,10 @@ package android.service.wallpaper {
method public android.view.SurfaceHolder getSurfaceHolder();
method public boolean isPreview();
method public boolean isVisible();
+ method public void notifyColorsChanged();
method public void onApplyWindowInsets(android.view.WindowInsets);
method public android.os.Bundle onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean);
+ method public android.app.WallpaperColors onComputeColors();
method public void onCreate(android.view.SurfaceHolder);
method public void onDesiredSizeChanged(int, int);
method public void onDestroy();
diff --git a/api/test-current.txt b/api/test-current.txt
index 02ad37d11739..225a749c427c 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -37978,8 +37978,10 @@ package android.service.wallpaper {
method public android.view.SurfaceHolder getSurfaceHolder();
method public boolean isPreview();
method public boolean isVisible();
+ method public void notifyColorsChanged();
method public void onApplyWindowInsets(android.view.WindowInsets);
method public android.os.Bundle onCommand(java.lang.String, int, int, int, android.os.Bundle, boolean);
+ method public android.app.WallpaperColors onComputeColors();
method public void onCreate(android.view.SurfaceHolder);
method public void onDesiredSizeChanged(int, int);
method public void onDestroy();
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: {