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

Commit 358d6d97 authored by Aurélien Pomini's avatar Aurélien Pomini
Browse files

Fix getWallpaperInfo javadoc (again!)

A mistakes was made in ag/24905907: the mention "before Android U" was
accidentally added to the overload that was added in U.

Also fix a couple typos.

Bug: 285731765
Test: NA, javadoc change
Flag: NA
Change-Id: Ie927639822a247a19aa0e051b430bfe12b25d52b
parent ae30e283
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7698,7 +7698,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
@@ -1727,15 +1727,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());
    }
@@ -1752,19 +1759,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>
     *
@@ -1780,7 +1782,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