diff options
| author | 2022-11-09 15:46:08 +0000 | |
|---|---|---|
| committer | 2022-11-09 15:46:08 +0000 | |
| commit | ff75ef23a28e63ccdefb508a1c8a8aa9c8f8a1f3 (patch) | |
| tree | 1e4db22700bc62c3a6dcbd2d9e2be3922039ef96 | |
| parent | 5f3f88b05831f66728e3790145b1458ee224220a (diff) | |
| parent | ad3d3b20ec8d1b9056b1898bfffd158c525eec46 (diff) | |
Merge "Lock screen live wallpaper: add home/lock screen flag as argument." into tm-qpr-dev
| -rw-r--r-- | core/java/android/app/DisabledWallpaperManager.java | 10 | ||||
| -rw-r--r-- | core/java/android/app/WallpaperManager.java | 33 |
2 files changed, 37 insertions, 6 deletions
diff --git a/core/java/android/app/DisabledWallpaperManager.java b/core/java/android/app/DisabledWallpaperManager.java index ae3a9e6668ab..0d14c0bcf1c9 100644 --- a/core/java/android/app/DisabledWallpaperManager.java +++ b/core/java/android/app/DisabledWallpaperManager.java @@ -193,6 +193,16 @@ final class DisabledWallpaperManager extends WallpaperManager { } @Override + public WallpaperInfo getWallpaperInfoWithFlags(@SetWallpaperFlags int which) { + return unsupported(); + } + + @Override + public WallpaperInfo getWallpaperInfoWithFlags(@SetWallpaperFlags int which, int userId) { + return unsupported(); + } + + @Override public int getWallpaperId(int which) { return unsupportedInt(); } diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index ff69491352ff..c99fa3d3177c 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -1320,18 +1320,16 @@ public class WallpaperManager { } /** - * Returns the information about the wallpaper if the current wallpaper is - * a live wallpaper component. Otherwise, if the wallpaper is a static image, - * this returns null. + * Returns the information about the home screen wallpaper if its current wallpaper is a live + * wallpaper component. Otherwise, if the wallpaper is a static image, this returns null. */ public WallpaperInfo getWallpaperInfo() { return getWallpaperInfo(mContext.getUserId()); } /** - * Returns the information about the wallpaper if the current wallpaper is - * a live wallpaper component. Otherwise, if the wallpaper is a static image, - * this returns null. + * Returns the information about the home screen wallpaper if its current wallpaper is a live + * wallpaper component. Otherwise, if the wallpaper is a static image, this returns null. * * @param userId Owner of the wallpaper. * @hide @@ -1350,6 +1348,29 @@ public class WallpaperManager { } /** + * Returns the information about the home screen wallpaper if its current wallpaper is a live + * wallpaper component. Otherwise, if the wallpaper is a static image, this returns null. + * + * @param which Specifies wallpaper destination (home or lock). + * @hide + */ + public WallpaperInfo getWallpaperInfoWithFlags(@SetWallpaperFlags int which) { + return getWallpaperInfo(); + } + + /** + * Returns the information about the designated wallpaper if its current wallpaper is a live + * wallpaper component. Otherwise, if the wallpaper is a static image, this returns null. + * + * @param which Specifies wallpaper destination (home or lock). + * @param userId Owner of the wallpaper. + * @hide + */ + public WallpaperInfo getWallpaperInfoWithFlags(@SetWallpaperFlags int which, int userId) { + return getWallpaperInfo(userId); + } + + /** * Get the ID of the current wallpaper of the given kind. If there is no * such wallpaper configured, returns a negative number. * |