From 9530e3a22d5ffa2019d1a5177b6a441d4d6d048b Mon Sep 17 00:00:00 2001
From: Nicolas Falliere <nicof@google.com>
Date: Mon, 18 Jun 2012 17:21:06 -0700
Subject: Added or fixed doctrings for required permissions.

Bug: 6591338
Change-Id: Ia2092f9994854701b5fa1425c371817367ae07ec
---
 core/java/android/app/DownloadManager.java  |  3 +++
 core/java/android/app/KeyguardManager.java  |  9 +++++++++
 core/java/android/app/WallpaperManager.java | 15 +++++++++++++++
 3 files changed, 27 insertions(+)

(limited to 'core/java/android/app')

diff --git a/core/java/android/app/DownloadManager.java b/core/java/android/app/DownloadManager.java
index 93f732c..17700f9 100644
--- a/core/java/android/app/DownloadManager.java
+++ b/core/java/android/app/DownloadManager.java
@@ -51,6 +51,9 @@ import java.util.List;
  * Apps that request downloads through this API should register a broadcast receiver for
  * {@link #ACTION_NOTIFICATION_CLICKED} to appropriately handle when the user clicks on a running
  * download in a notification or from the downloads UI.
+ *
+ * Note that the application must have the {@link android.Manifest.permission#INTERNET}
+ * permission to use this class.
  */
 public class DownloadManager {
 
diff --git a/core/java/android/app/KeyguardManager.java b/core/java/android/app/KeyguardManager.java
index a79a8fc..ef61af7 100644
--- a/core/java/android/app/KeyguardManager.java
+++ b/core/java/android/app/KeyguardManager.java
@@ -62,6 +62,9 @@ public class KeyguardManager {
          * Note: This call has no effect while any {@link android.app.admin.DevicePolicyManager} 
          * is enabled that requires a password.
          *
+         * <p>This method requires the caller to hold the permission
+         * {@link android.Manifest.permission#DISABLE_KEYGUARD}.
+         *
          * @see #reenableKeyguard()
          */
         public void disableKeyguard() {
@@ -80,6 +83,9 @@ public class KeyguardManager {
          * Note: This call has no effect while any {@link android.app.admin.DevicePolicyManager}
          * is enabled that requires a password.
          *
+         * <p>This method requires the caller to hold the permission
+         * {@link android.Manifest.permission#DISABLE_KEYGUARD}.
+         *
          * @see #disableKeyguard()
          */
         public void reenableKeyguard() {
@@ -188,6 +194,9 @@ public class KeyguardManager {
      * This will, if the keyguard is secure, bring up the unlock screen of
      * the keyguard.
      *
+     * <p>This method requires the caller to hold the permission
+     * {@link android.Manifest.permission#DISABLE_KEYGUARD}.
+     *
      * @param callback Let's you know whether the operation was succesful and
      *   it is safe to launch anything that would normally be considered safe
      *   once the user has gotten past the keyguard.
diff --git a/core/java/android/app/WallpaperManager.java b/core/java/android/app/WallpaperManager.java
index 3824f44..c131549 100644
--- a/core/java/android/app/WallpaperManager.java
+++ b/core/java/android/app/WallpaperManager.java
@@ -468,6 +468,9 @@ public class WallpaperManager {
      * wallpaper; it must be a valid PNG or JPEG image.  On success, the intent
      * {@link Intent#ACTION_WALLPAPER_CHANGED} is broadcast.
      *
+     * <p>This method requires the caller to hold the permission
+     * {@link android.Manifest.permission#SET_WALLPAPER}.
+     *
      * @param resid The bitmap to save.
      *
      * @throws IOException If an error occurs reverting to the default
@@ -504,6 +507,9 @@ public class WallpaperManager {
      * converted to a PNG and stored as the wallpaper.  On success, the intent
      * {@link Intent#ACTION_WALLPAPER_CHANGED} is broadcast.
      *
+     * <p>This method requires the caller to hold the permission
+     * {@link android.Manifest.permission#SET_WALLPAPER}.
+     *
      * @param bitmap The bitmap to save.
      *
      * @throws IOException If an error occurs reverting to the default
@@ -540,6 +546,9 @@ public class WallpaperManager {
      * image.  On success, the intent {@link Intent#ACTION_WALLPAPER_CHANGED}
      * is broadcast.
      *
+     * <p>This method requires the caller to hold the permission
+     * {@link android.Manifest.permission#SET_WALLPAPER}.
+     *
      * @param data A stream containing the raw data to install as a wallpaper.
      *
      * @throws IOException If an error occurs reverting to the default
@@ -645,6 +654,9 @@ public class WallpaperManager {
      * <b>retrieve</b> the suggested size so they can construct a wallpaper
      * that matches it.
      *
+     * <p>This method requires the caller to hold the permission
+     * {@link android.Manifest.permission#SET_WALLPAPER_HINTS}.
+     *
      * @param minimumWidth Desired minimum width
      * @param minimumHeight Desired minimum height
      */
@@ -746,6 +758,9 @@ public class WallpaperManager {
      * wallpaper. On success, the intent {@link Intent#ACTION_WALLPAPER_CHANGED}
      * is broadcast.
      *
+     * <p>This method requires the caller to hold the permission
+     * {@link android.Manifest.permission#SET_WALLPAPER}.
+     *
      * @throws IOException If an error occurs reverting to the default
      * wallpaper.
      */
-- 
cgit v1.1