From 7754079bc09219a2d264d6a23049655dbbb8f6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pomini?= Date: Wed, 7 Jun 2023 15:57:50 +0000 Subject: [PATCH] Fix WallpaperManager javadoc for new U methods The message about permissions for old methods was wrongly copied for the new U methods. Don't mention versions <= S and T for methods that have been added in U. Also add a couple missing "{". Bug: 285731765 Test: none, only javadoc changes Change-Id: I54085b28562a286584208d7dec0aee88d1cb43fa --- core/java/android/app/WallpaperManager.java | 84 +++++---------------- 1 file changed, 19 insertions(+), 65 deletions(-) diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java index 57935e3bd5b11..16707e12943f6 100644 --- a/core/java/android/app/WallpaperManager.java +++ b/core/java/android/app/WallpaperManager.java @@ -913,7 +913,7 @@ public class WallpaperManager { * instead the default system wallpaper is returned * (some versions of T may throw a {@code SecurityException}). *
  • From version U, this method should not be used - * and will always throw a @code SecurityException}.
  • + * and will always throw a {@code SecurityException}. *
  • Apps with {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} * can still access the real wallpaper on all versions.
  • * @@ -935,18 +935,9 @@ public class WallpaperManager { } /** - * Important note: - * + * Important note: only apps with + * {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} should use this method. + * Otherwise, a {@code SecurityException} will be thrown. * *

    * Retrieve the requested wallpaper for the specified wallpaper type if the wallpaper is not @@ -1206,7 +1197,7 @@ public class WallpaperManager { * instead the default system wallpaper is returned * (some versions of T may throw a {@code SecurityException}). *

  • From version U, this method should not be used - * and will always throw a @code SecurityException}.
  • + * and will always throw a {@code SecurityException}. *
  • Apps with {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} * can still access the real wallpaper on all versions.
  • * @@ -1228,18 +1219,9 @@ public class WallpaperManager { } /** - * Important note: - * + * Important note: only apps with + * {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} should use this method. + * Otherwise, a {@code SecurityException} will be thrown. * *

    * Equivalent to {@link #getDrawable(int)}. @@ -1268,7 +1250,7 @@ public class WallpaperManager { * instead the default wallpaper is returned * (some versions of T may throw a {@code SecurityException}). *

  • From version U, this method should not be used - * and will always throw a @code SecurityException}.
  • + * and will always throw a {@code SecurityException}. *
  • Apps with {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} * can still access the real wallpaper on all versions.
  • * @@ -1290,19 +1272,9 @@ public class WallpaperManager { } /** - * Important note: - * - *
    + * Important note: only apps with + * {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} should use this method. + * Otherwise, a {@code SecurityException} will be thrown. * * Like {@link #getDrawable(int)}, but the returned Drawable has a number * of limitations to reduce its overhead as much as possible. It will @@ -1334,18 +1306,9 @@ public class WallpaperManager { } /** - * Important note: - * + * Important note: only apps with + * {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} should use this method. + * Otherwise, a {@code SecurityException} will be thrown. * *

    * Equivalent to {@link #getFastDrawable()}. @@ -1364,18 +1327,9 @@ public class WallpaperManager { } /** - * Important note: - *

    + * Important note: only apps with + * {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} + * should use this method. Otherwise, a {@code SecurityException} will be thrown. * *

    * Equivalent to {@link #getFastDrawable(int)}. @@ -1562,7 +1516,7 @@ public class WallpaperManager { * instead the default system wallpaper is returned * (some versions of T may throw a {@code SecurityException}). *

  • From version U, this method should not be used - * and will always throw a @code SecurityException}.
  • + * and will always throw a {@code SecurityException}. *
  • Apps with {@link android.Manifest.permission#MANAGE_EXTERNAL_STORAGE} * can still access the real wallpaper on all versions.
  • *