Loading api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -42134,7 +42134,7 @@ package android.service.wallpaper { method protected void dump(String, java.io.FileDescriptor, java.io.PrintWriter, String[]); method public int getDesiredMinimumHeight(); method public int getDesiredMinimumWidth(); method public android.content.Context getDisplayContext(); method @Nullable public android.content.Context getDisplayContext(); method public android.view.SurfaceHolder getSurfaceHolder(); method public boolean isPreview(); method public boolean isVisible(); core/java/android/app/WallpaperInfo.java +7 −0 Original line number Diff line number Diff line Loading @@ -371,10 +371,17 @@ public final class WallpaperInfo implements Parcelable { * Returns whether this wallpaper service can support multiple engines to render on each surface * independently. An example use case is a multi-display set-up where the wallpaper service can * render surfaces to each of the connected displays. * <p> * This corresponds to the value {@link android.R.styleable#Wallpaper_supportsMultipleDisplays} * in the XML description of the wallpaper. * <p> * The default value is {@code false}. * * @see WallpaperService#onCreateEngine() * @see WallpaperService.Engine#onCreate(SurfaceHolder) * @return {@code true} if multiple engines can render independently on each surface. * * @attr ref android.R.styleable#Wallpaper_supportsMultipleDisplays */ public boolean supportsMultipleDisplays() { return mSupportMultipleDisplays; Loading core/java/android/service/wallpaper/WallpaperService.java +4 −0 Original line number Diff line number Diff line Loading @@ -1068,9 +1068,13 @@ public abstract class WallpaperService extends Service { * For multiple display environment, multiple engines can be created to render on each * display, but these displays may have different densities. Use this context to get the * corresponding resources for currently display, avoiding the context of the service. * <p> * The display context will never be {@code null} after * {@link Engine#onCreate(SurfaceHolder)} has been called. * * @return A {@link Context} for current display. */ @Nullable public Context getDisplayContext() { return mDisplayContext; } Loading core/res/res/values/attrs.xml +2 −1 Original line number Diff line number Diff line Loading @@ -8004,7 +8004,8 @@ <!-- Indicates that this wallpaper service can support multiple engines to render on each surface independently. An example use case is a multi-display set-up where the wallpaper service can render surfaces to each of the connected displays. --> wallpaper service can render surfaces to each of the connected displays. Corresponds to {@link android.app.WallpaperInfo#supportsMultipleDisplays()} --> <attr name="supportsMultipleDisplays" format="boolean" /> </declare-styleable> Loading Loading
api/current.txt +1 −1 Original line number Diff line number Diff line Loading @@ -42134,7 +42134,7 @@ package android.service.wallpaper { method protected void dump(String, java.io.FileDescriptor, java.io.PrintWriter, String[]); method public int getDesiredMinimumHeight(); method public int getDesiredMinimumWidth(); method public android.content.Context getDisplayContext(); method @Nullable public android.content.Context getDisplayContext(); method public android.view.SurfaceHolder getSurfaceHolder(); method public boolean isPreview(); method public boolean isVisible();
core/java/android/app/WallpaperInfo.java +7 −0 Original line number Diff line number Diff line Loading @@ -371,10 +371,17 @@ public final class WallpaperInfo implements Parcelable { * Returns whether this wallpaper service can support multiple engines to render on each surface * independently. An example use case is a multi-display set-up where the wallpaper service can * render surfaces to each of the connected displays. * <p> * This corresponds to the value {@link android.R.styleable#Wallpaper_supportsMultipleDisplays} * in the XML description of the wallpaper. * <p> * The default value is {@code false}. * * @see WallpaperService#onCreateEngine() * @see WallpaperService.Engine#onCreate(SurfaceHolder) * @return {@code true} if multiple engines can render independently on each surface. * * @attr ref android.R.styleable#Wallpaper_supportsMultipleDisplays */ public boolean supportsMultipleDisplays() { return mSupportMultipleDisplays; Loading
core/java/android/service/wallpaper/WallpaperService.java +4 −0 Original line number Diff line number Diff line Loading @@ -1068,9 +1068,13 @@ public abstract class WallpaperService extends Service { * For multiple display environment, multiple engines can be created to render on each * display, but these displays may have different densities. Use this context to get the * corresponding resources for currently display, avoiding the context of the service. * <p> * The display context will never be {@code null} after * {@link Engine#onCreate(SurfaceHolder)} has been called. * * @return A {@link Context} for current display. */ @Nullable public Context getDisplayContext() { return mDisplayContext; } Loading
core/res/res/values/attrs.xml +2 −1 Original line number Diff line number Diff line Loading @@ -8004,7 +8004,8 @@ <!-- Indicates that this wallpaper service can support multiple engines to render on each surface independently. An example use case is a multi-display set-up where the wallpaper service can render surfaces to each of the connected displays. --> wallpaper service can render surfaces to each of the connected displays. Corresponds to {@link android.app.WallpaperInfo#supportsMultipleDisplays()} --> <attr name="supportsMultipleDisplays" format="boolean" /> </declare-styleable> Loading