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

Commit e7828c57 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Unhide invalidateColors API" into oc-mr1-dev am: a8d14a6e am: 6ccce0c1"

parents 97099cac 8c9a80e2
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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();
+2 −0
Original line number Diff line number Diff line
@@ -41099,8 +41099,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();
+2 −0
Original line number Diff line number Diff line
@@ -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();
+9 −11
Original line number Diff line number Diff line
@@ -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: {