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

Commit 676a66ef authored by Santiago Etchebehere's avatar Santiago Etchebehere Committed by Android (Google) Code Review
Browse files

Merge "Provide access to a mirror of WallpaperEngine SurfaceControl" into sc-dev

parents 4c15ae91 8a884b22
Loading
Loading
Loading
Loading
+15 −13
Original line number Diff line number Diff line
@@ -21,27 +21,29 @@ import android.app.WallpaperColors;
import android.graphics.Rect;
import android.graphics.RectF;
import android.view.MotionEvent;
import android.view.SurfaceControl;
import android.os.Bundle;

/**
 * @hide
 */
oneway interface IWallpaperEngine {
    void setDesiredSize(int width, int height);
    void setDisplayPadding(in Rect padding);
interface IWallpaperEngine {
    oneway void setDesiredSize(int width, int height);
    oneway void setDisplayPadding(in Rect padding);
    @UnsupportedAppUsage
    void setVisibility(boolean visible);
    void setInAmbientMode(boolean inAmbientDisplay, long animationDuration);
    oneway void setVisibility(boolean visible);
    oneway void setInAmbientMode(boolean inAmbientDisplay, long animationDuration);
    @UnsupportedAppUsage
    void dispatchPointer(in MotionEvent event);
    oneway void dispatchPointer(in MotionEvent event);
    @UnsupportedAppUsage
    void dispatchWallpaperCommand(String action, int x, int y,
    oneway void dispatchWallpaperCommand(String action, int x, int y,
            int z, in Bundle extras);
    void requestWallpaperColors();
    oneway void requestWallpaperColors();
    @UnsupportedAppUsage
    void destroy();
    void setZoomOut(float scale);
    void scalePreview(in Rect positionInWindow);
    void removeLocalColorsAreas(in List<RectF> regions);
    void addLocalColorsAreas(in List<RectF> regions);
    oneway void destroy();
    oneway void setZoomOut(float scale);
    oneway void scalePreview(in Rect positionInWindow);
    oneway void removeLocalColorsAreas(in List<RectF> regions);
    oneway void addLocalColorsAreas(in List<RectF> regions);
    SurfaceControl mirrorSurfaceControl();
}
+5 −0
Original line number Diff line number Diff line
@@ -1982,6 +1982,11 @@ public abstract class WallpaperService extends Service {
            mCaller.sendMessage(msg);
        }

        @Nullable
        public SurfaceControl mirrorSurfaceControl() {
            return mEngine == null ? null : SurfaceControl.mirrorSurface(mEngine.mSurfaceControl);
        }

        private void doDetachEngine() {
            mActiveEngines.remove(mEngine);
            mEngine.detach();