summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/java/android/accounts/AccountManager.java3
-rw-r--r--core/java/android/app/DownloadManager.java3
-rw-r--r--core/java/android/app/KeyguardManager.java9
-rw-r--r--core/java/android/app/WallpaperManager.java15
-rw-r--r--core/java/android/content/ContentResolver.java30
-rw-r--r--core/java/android/content/Context.java6
-rw-r--r--core/java/android/net/ConnectivityManager.java8
-rw-r--r--core/java/android/os/Vibrator.java6
8 files changed, 79 insertions, 1 deletions
diff --git a/core/java/android/accounts/AccountManager.java b/core/java/android/accounts/AccountManager.java
index 39e83e0..f3c6566 100644
--- a/core/java/android/accounts/AccountManager.java
+++ b/core/java/android/accounts/AccountManager.java
@@ -1916,7 +1916,8 @@ public class AccountManager {
*
* <p>It is safe to call this method from the main thread.
*
- * <p>No permission is required to call this method.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#GET_ACCOUNTS}.
*
* @param listener The listener to send notifications to
* @param handler {@link Handler} identifying the thread to use
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.
*/
diff --git a/core/java/android/content/ContentResolver.java b/core/java/android/content/ContentResolver.java
index 34b5a30..0a5a26a 100644
--- a/core/java/android/content/ContentResolver.java
+++ b/core/java/android/content/ContentResolver.java
@@ -1415,6 +1415,8 @@ public abstract class ContentResolver {
/**
* Check if the provider should be synced when a network tickle is received
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
*
* @param account the account whose setting we are querying
* @param authority the provider whose setting we are querying
@@ -1430,6 +1432,8 @@ public abstract class ContentResolver {
/**
* Set whether or not the provider is synced when it receives a network tickle.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
*
* @param account the account whose setting we are querying
* @param authority the provider whose behavior is being controlled
@@ -1461,6 +1465,9 @@ public abstract class ContentResolver {
* {@link #SYNC_EXTRAS_EXPEDITED}, {@link #SYNC_EXTRAS_MANUAL} set to true.
* If any are supplied then an {@link IllegalArgumentException} will be thrown.
*
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
+ *
* @param account the account to specify in the sync
* @param authority the provider to specify in the sync request
* @param extras extra parameters to go along with the sync request
@@ -1497,6 +1504,8 @@ public abstract class ContentResolver {
/**
* Remove a periodic sync. Has no affect if account, authority and extras don't match
* an existing periodic sync.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
*
* @param account the account of the periodic sync to remove
* @param authority the provider of the periodic sync to remove
@@ -1519,6 +1528,8 @@ public abstract class ContentResolver {
/**
* Get the list of information about the periodic syncs for the given account and authority.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
*
* @param account the account whose periodic syncs we are querying
* @param authority the provider whose periodic syncs we are querying
@@ -1540,6 +1551,8 @@ public abstract class ContentResolver {
/**
* Check if this account/provider is syncable.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
* @return >0 if it is syncable, 0 if not, and <0 if the state isn't known yet.
*/
public static int getIsSyncable(Account account, String authority) {
@@ -1552,6 +1565,8 @@ public abstract class ContentResolver {
/**
* Set whether this account/provider is syncable.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
* @param syncable >0 denotes syncable, 0 means not syncable, <0 means unknown
*/
public static void setIsSyncable(Account account, String authority, int syncable) {
@@ -1566,6 +1581,8 @@ public abstract class ContentResolver {
/**
* Gets the master auto-sync setting that applies to all the providers and accounts.
* If this is false then the per-provider auto-sync setting is ignored.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_SETTINGS}.
*
* @return the master auto-sync setting that applies to all the providers and accounts
*/
@@ -1580,6 +1597,8 @@ public abstract class ContentResolver {
/**
* Sets the master auto-sync setting that applies to all the providers and accounts.
* If this is false then the per-provider auto-sync setting is ignored.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#WRITE_SYNC_SETTINGS}.
*
* @param sync the master auto-sync setting that applies to all the providers and accounts
*/
@@ -1595,6 +1614,8 @@ public abstract class ContentResolver {
/**
* Returns true if there is currently a sync operation for the given
* account or authority in the pending list, or actively being processed.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
* @param account the account whose setting we are querying
* @param authority the provider whose behavior is being queried
* @return true if a sync is active for the given account or authority.
@@ -1610,6 +1631,9 @@ public abstract class ContentResolver {
/**
* If a sync is active returns the information about it, otherwise returns null.
* <p>
+ * This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
+ * <p>
* @return the SyncInfo for the currently active sync or null if one is not active.
* @deprecated
* Since multiple concurrent syncs are now supported you should use
@@ -1633,6 +1657,10 @@ public abstract class ContentResolver {
/**
* Returns a list with information about all the active syncs. This list will be empty
* if there are no active syncs.
+ * <p>
+ * This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
+ * <p>
* @return a List of SyncInfo objects for the currently active syncs.
*/
public static List<SyncInfo> getCurrentSyncs() {
@@ -1660,6 +1688,8 @@ public abstract class ContentResolver {
/**
* Return true if the pending status is true of any matching authorities.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#READ_SYNC_STATS}.
* @param account the account whose setting we are querying
* @param authority the provider whose behavior is being queried
* @return true if there is a pending sync with the matching account and authority
diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java
index 11b4906..2800930 100644
--- a/core/java/android/content/Context.java
+++ b/core/java/android/content/Context.java
@@ -813,6 +813,8 @@ public abstract class Context {
/**
* @deprecated Use {@link android.app.WallpaperManager#setBitmap(Bitmap)
* WallpaperManager.set()} instead.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#SET_WALLPAPER}.
*/
@Deprecated
public abstract void setWallpaper(Bitmap bitmap) throws IOException;
@@ -820,6 +822,8 @@ public abstract class Context {
/**
* @deprecated Use {@link android.app.WallpaperManager#setStream(InputStream)
* WallpaperManager.set()} instead.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#SET_WALLPAPER}.
*/
@Deprecated
public abstract void setWallpaper(InputStream data) throws IOException;
@@ -827,6 +831,8 @@ public abstract class Context {
/**
* @deprecated Use {@link android.app.WallpaperManager#clear
* WallpaperManager.clear()} instead.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#SET_WALLPAPER}.
*/
@Deprecated
public abstract void clearWallpaper() throws IOException;
diff --git a/core/java/android/net/ConnectivityManager.java b/core/java/android/net/ConnectivityManager.java
index ef4209f..5f8793c 100644
--- a/core/java/android/net/ConnectivityManager.java
+++ b/core/java/android/net/ConnectivityManager.java
@@ -377,6 +377,8 @@ public class ConnectivityManager {
* this network is the default route for outgoing connections. You should
* always check {@link NetworkInfo#isConnected()} before initiating network
* traffic. This may return {@code null} when no networks are available.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#ACCESS_NETWORK_STATE}.
*/
public NetworkInfo getActiveNetworkInfo() {
try {
@@ -451,6 +453,8 @@ public class ConnectivityManager {
* Tells the underlying networking system that the caller wants to
* begin using the named feature. The interpretation of {@code feature}
* is completely up to each networking implementation.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#CHANGE_NETWORK_STATE}.
* @param networkType specifies which network the request pertains to
* @param feature the name of the feature to be used
* @return an integer value representing the outcome of the request.
@@ -471,6 +475,8 @@ public class ConnectivityManager {
* Tells the underlying networking system that the caller is finished
* using the named feature. The interpretation of {@code feature}
* is completely up to each networking implementation.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#CHANGE_NETWORK_STATE}.
* @param networkType specifies which network the request pertains to
* @param feature the name of the feature that is no longer needed
* @return an integer value representing the outcome of the request.
@@ -490,6 +496,8 @@ public class ConnectivityManager {
* Ensure that a network route exists to deliver traffic to the specified
* host via the specified network interface. An attempt to add a route that
* already exists is ignored, but treated as successful.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#CHANGE_NETWORK_STATE}.
* @param networkType the type of the network over which traffic to the specified
* host is to be routed
* @param hostAddress the IP address of the host to which the route is desired
diff --git a/core/java/android/os/Vibrator.java b/core/java/android/os/Vibrator.java
index 3f783c9..b67be4b 100644
--- a/core/java/android/os/Vibrator.java
+++ b/core/java/android/os/Vibrator.java
@@ -43,6 +43,8 @@ public abstract class Vibrator {
/**
* Vibrate constantly for the specified period of time.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#VIBRATE}.
*
* @param milliseconds The number of milliseconds to vibrate.
*/
@@ -61,6 +63,8 @@ public abstract class Vibrator {
* To cause the pattern to repeat, pass the index into the pattern array at which
* to start the repeat, or -1 to disable repeating.
* </p>
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#VIBRATE}.
*
* @param pattern an array of longs of times for which to turn the vibrator on or off.
* @param repeat the index into pattern at which to repeat, or -1 if
@@ -70,6 +74,8 @@ public abstract class Vibrator {
/**
* Turn the vibrator off.
+ * <p>This method requires the caller to hold the permission
+ * {@link android.Manifest.permission#VIBRATE}.
*/
public abstract void cancel();
}