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

Commit ee726539 authored by Aurélien Pomini's avatar Aurélien Pomini Committed by Android (Google) Code Review
Browse files

Merge "Fix getWallpaperInfo javadoc (again!)" into main

parents 096656b8 358d6d97
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7701,7 +7701,7 @@ package android.app {
    method @Nullable public android.app.WallpaperColors getWallpaperColors(int);
    method @Nullable @RequiresPermission(anyOf={android.Manifest.permission.MANAGE_EXTERNAL_STORAGE, "android.permission.READ_WALLPAPER_INTERNAL"}) public android.os.ParcelFileDescriptor getWallpaperFile(int);
    method public int getWallpaperId(int);
    method public android.app.WallpaperInfo getWallpaperInfo();
    method @RequiresPermission(value="QUERY_ALL_PACKAGES", conditional=true) public android.app.WallpaperInfo getWallpaperInfo();
    method @Nullable public android.app.WallpaperInfo getWallpaperInfo(int);
    method public boolean hasResourceWallpaper(@RawRes int);
    method public boolean isSetWallpaperAllowed();
+16 −14
Original line number Diff line number Diff line
@@ -1899,15 +1899,22 @@ 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.
     * wallpaper component. Otherwise, if the wallpaper is a static image or is not set, or if the
     * caller doesn't have the appropriate permissions, this returns {@code null}.
     *
     * <p>
     * In order to use this, apps should declare a {@code <queries>} tag with the action
     * {@code "android.service.wallpaper.WallpaperService"}. Otherwise,
     * Before Android U, this method requires the
     * {@link android.Manifest.permission#QUERY_ALL_PACKAGES} permission.
     * </p>
     *
     * <p>
     * Starting from Android U, in order to use this, apps should declare a {@code <queries>} tag
     * with the action {@code "android.service.wallpaper.WallpaperService"}. Otherwise,
     * this method will return {@code null} if the caller doesn't otherwise have
     * <a href="{@docRoot}training/package-visibility">visibility</a> of the wallpaper package.
     * </p>
     */
    @RequiresPermission(value = "QUERY_ALL_PACKAGES", conditional = true)
    public WallpaperInfo getWallpaperInfo() {
        return getWallpaperInfoForUser(mContext.getUserId());
    }
@@ -1924,19 +1931,14 @@ 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 or is not set, or if the
     * Returns the information about the designated wallpaper if its current wallpaper is a live
     * wallpaper component. Otherwise, if the wallpaper is a static image or is not set, or if
     * the caller doesn't have the appropriate permissions, this returns {@code null}.
     *
     * <p>
     * Before Android U, this method requires the
     * {@link android.Manifest.permission#QUERY_ALL_PACKAGES} permission.
     * </p>
     *
     * <p>
     * Starting from Android U, In order to use this, apps should declare a {@code <queries>} tag
     * with the action {@code "android.service.wallpaper.WallpaperService"}. Otherwise,
     * this method will return {@code null} if the caller doesn't otherwise have
     * In order to use this, apps should declare a {@code <queries>} tag with the action
     * {@code "android.service.wallpaper.WallpaperService"}. Otherwise, this method will return
     * {@code null} if the caller doesn't otherwise have
     * <a href="{@docRoot}training/package-visibility">visibility</a> of the wallpaper package.
     * </p>
     *
@@ -1952,7 +1954,7 @@ public class WallpaperManager {
    /**
     * Returns the information about the designated wallpaper if its current wallpaper is a live
     * wallpaper component. Otherwise, if the wallpaper is a static image or is not set, or if the
     * the caller doesn't have the appropriate permissions, this returns {@code null}.
     * caller doesn't have the appropriate permissions, this returns {@code null}.
     *
     * <p>
     * In order to use this, apps should declare a {@code <queries>} tag