summaryrefslogtreecommitdiffstats
path: root/wifi
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2011-03-15 17:39:45 -0700
committerKenny Root <kroot@google.com>2011-03-16 09:38:11 -0700
commitd710fb500c121b3f9563ccfbe488f7c9d3ec4985 (patch)
tree7aa046fcd4c5586af61b6a7844bd50f8469c8152 /wifi
parentd022c23aed0d022057c0074a158b522c83e906e4 (diff)
downloadframeworks_base-d710fb500c121b3f9563ccfbe488f7c9d3ec4985.zip
frameworks_base-d710fb500c121b3f9563ccfbe488f7c9d3ec4985.tar.gz
frameworks_base-d710fb500c121b3f9563ccfbe488f7c9d3ec4985.tar.bz2
Update WakeLock-related docs to mention permissions
android.permission.WAKE_LOCK permission is required to use WakeLock or WifiLock, but nowhere is it mentioned that you must declare that permission to use it. Change-Id: Ib5f5294d37e39169fe5678743f380d95c4e5a842
Diffstat (limited to 'wifi')
-rw-r--r--wifi/java/android/net/wifi/WifiManager.java7
1 files changed, 5 insertions, 2 deletions
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;