Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2d038ad authored by Michael Wright's avatar Michael Wright
Browse files

Update PowerManager class docs.

They generally refer to the Wakelock API, but PowerManager controls more
than that these days.

Bug: 216373630
Test: compiles
Change-Id: I117460292b0da8563fbc249e7e2e27671eaf0da5
parent 230b32ce
Loading
Loading
Loading
Loading
+6 −13
Original line number Original line Diff line number Diff line
@@ -48,19 +48,7 @@ import java.util.concurrent.Executor;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicLong;


/**
/**
 * This class gives you control of the power state of the device.
 * This class lets you query and request control of aspects of the device's power state.
 *
 * <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>
 */
 */
@SystemService(Context.POWER_SERVICE)
@SystemService(Context.POWER_SERVICE)
public final class PowerManager {
public final class PowerManager {
@@ -1180,6 +1168,11 @@ public final class PowerManager {
     * Although a wake lock can be created without special permissions,
     * Although a wake lock can be created without special permissions,
     * the {@link android.Manifest.permission#WAKE_LOCK} permission is
     * the {@link android.Manifest.permission#WAKE_LOCK} permission is
     * required to actually acquire or release the wake lock that is returned.
     * 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">
     * </p><p class="note">
     * If using this to keep the screen on, you should strongly consider using
     * If using this to keep the screen on, you should strongly consider using
     * {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead.
     * {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead.