Merge "Lock screen live wallpaper: add home/lock screen flag as argument." into tm-qpr-dev am: ff75ef23a2

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20404658

Change-Id: Ia1a2de7c9ac9c26c3768b3dc0b6586c2ffcfa4b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Chris Poultney
2022-11-09 16:11:36 +00:00
committed by Automerger Merge Worker
2 changed files with 37 additions and 6 deletions

View File

@@ -192,6 +192,16 @@ final class DisabledWallpaperManager extends WallpaperManager {
return unsupported(); return unsupported();
} }
@Override
public WallpaperInfo getWallpaperInfoWithFlags(@SetWallpaperFlags int which) {
return unsupported();
}
@Override
public WallpaperInfo getWallpaperInfoWithFlags(@SetWallpaperFlags int which, int userId) {
return unsupported();
}
@Override @Override
public int getWallpaperId(int which) { public int getWallpaperId(int which) {
return unsupportedInt(); return unsupportedInt();

View File

@@ -1320,18 +1320,16 @@ public class WallpaperManager {
} }
/** /**
* Returns the information about the wallpaper if the current wallpaper is * Returns the information about the home screen wallpaper if its current wallpaper is a live
* a live wallpaper component. Otherwise, if the wallpaper is a static image, * wallpaper component. Otherwise, if the wallpaper is a static image, this returns null.
* this returns null.
*/ */
public WallpaperInfo getWallpaperInfo() { public WallpaperInfo getWallpaperInfo() {
return getWallpaperInfo(mContext.getUserId()); return getWallpaperInfo(mContext.getUserId());
} }
/** /**
* Returns the information about the wallpaper if the current wallpaper is * Returns the information about the home screen wallpaper if its current wallpaper is a live
* a live wallpaper component. Otherwise, if the wallpaper is a static image, * wallpaper component. Otherwise, if the wallpaper is a static image, this returns null.
* this returns null.
* *
* @param userId Owner of the wallpaper. * @param userId Owner of the wallpaper.
* @hide * @hide
@@ -1349,6 +1347,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 * Get the ID of the current wallpaper of the given kind. If there is no
* such wallpaper configured, returns a negative number. * such wallpaper configured, returns a negative number.