Merge "Provide access to a mirror of WallpaperEngine SurfaceControl" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
676a66efc0
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user