summaryrefslogtreecommitdiff
path: root/core/java/android/os/PowerManager.java
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2022-01-26 22:23:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-01-26 22:23:16 +0000
commit596e34d6ab8ba5bf6bd4fb09a5b6cff065b8e61a (patch)
tree9e9221b9d68d8699102065fe16705bed44189b4c /core/java/android/os/PowerManager.java
parent4795ed77af9d50dc3d755a367f6af5868e8fb1d4 (diff)
parentf2d038adbecc443ad17cef456b17fd9f42071045 (diff)
Merge "Update PowerManager class docs."
Diffstat (limited to 'core/java/android/os/PowerManager.java')
-rw-r--r--core/java/android/os/PowerManager.java19
1 files changed, 6 insertions, 13 deletions
diff --git a/core/java/android/os/PowerManager.java b/core/java/android/os/PowerManager.java
index b75459873eb9..881fcedea6f7 100644
--- a/core/java/android/os/PowerManager.java
+++ b/core/java/android/os/PowerManager.java
@@ -49,19 +49,7 @@ import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicLong;
/**
- * This class gives you control of the power state of the device.
- *
- * <p>
- * <b>Device battery life will be significantly affected by the use of this API.</b>
- * Do not acquire {@link WakeLock}s unless you really need them, use the minimum levels
- * possible, and be sure to release them as soon as possible. In most cases,
- * you'll want to use
- * {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead.
- *
- * <p>
- * Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
- * permission in an {@code <uses-permission>} element of the application's manifest.
- * </p>
+ * This class lets you query and request control of aspects of the device's power state.
*/
@SystemService(Context.POWER_SERVICE)
public final class PowerManager {
@@ -1196,6 +1184,11 @@ public final class PowerManager {
* Although a wake lock can be created without special permissions,
* the {@link android.Manifest.permission#WAKE_LOCK} permission is
* required to actually acquire or release the wake lock that is returned.
+ *
+ * </p><p>
+ * <b>Device battery life will be significantly affected by the use of this API.</b>
+ * Do not acquire {@link WakeLock}s unless you really need them, use the minimum levels
+ * possible, and be sure to release them as soon as possible.
* </p><p class="note">
* If using this to keep the screen on, you should strongly consider using
* {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead.