summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-03-16 10:05:23 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-16 10:05:23 -0700
commit63fce8c56d72c28fcf9c3edac9263dd7c49cb132 (patch)
tree7ac9370ca7c7c394befb6615800cd3e0bb1edf09
parent55685a6965d7be3a2784bce8b6a84632f5f9908d (diff)
parentd710fb500c121b3f9563ccfbe488f7c9d3ec4985 (diff)
downloadframeworks_base-63fce8c56d72c28fcf9c3edac9263dd7c49cb132.zip
frameworks_base-63fce8c56d72c28fcf9c3edac9263dd7c49cb132.tar.gz
frameworks_base-63fce8c56d72c28fcf9c3edac9263dd7c49cb132.tar.bz2
Merge "Update WakeLock-related docs to mention permissions"
-rw-r--r--core/java/android/os/PowerManager.java10
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java7
2 files changed, 12 insertions, 5 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index efb8415..57fdb0c 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -97,7 +97,8 @@ import android.util.Log;
* </tbody>
* </table>
*
- *
+ * Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
+ * permission in an {@code &lt;uses-permission&gt;} element of the application's manifest.
*/
public class PowerManager
{
@@ -188,8 +189,11 @@ public class PowerManager
/**
* Class lets you say that you need to have the device on.
- *
- * <p>Call release when you are done and don't need the lock anymore.
+ * <p>
+ * Call release when you are done and don't need the lock anymore.
+ * <p>
+ * Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
+ * permission in an {@code &lt;uses-permission&gt;} element of the application's manifest.
*/
public class WakeLock
{
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index 2e49a77..d40f146 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1193,16 +1193,19 @@ public class WifiManager {
* Acquiring a WifiLock will keep the radio on until the lock is released. Multiple
* applications may hold WifiLocks, and the radio will only be allowed to turn off when no
* WifiLocks are held in any application.
- *
+ * <p>
* Before using a WifiLock, consider carefully if your application requires Wi-Fi access, or
* could function over a mobile network, if available. A program that needs to download large
* files should hold a WifiLock to ensure that the download will complete, but a program whose
* network usage is occasional or low-bandwidth should not hold a WifiLock to avoid adversely
* affecting battery life.
- *
+ * <p>
* Note that WifiLocks cannot override the user-level "Wi-Fi Enabled" setting, nor Airplane
* Mode. They simply keep the radio from turning off when Wi-Fi is already on but the device
* is idle.
+ * <p>
+ * Any application using a WifiLock must request the {@code android.permission.WAKE_LOCK}
+ * permission in an {@code &lt;uses-permission&gt;} element of the application's manifest.
*/
public class WifiLock {
private String mTag;