OSDN Git Service

Unhide the proximity sensor wakelock.
authorJeff Brown <jeffbrown@google.com>
Fri, 22 Aug 2014 01:01:51 +0000 (18:01 -0700)
committerJeff Brown <jeffbrown@google.com>
Fri, 22 Aug 2014 05:20:48 +0000 (22:20 -0700)
Bug: 5354313
Change-Id: I59c6bfcd8ff2cebe264f69c49032737a45326373

api/current.txt
core/java/android/os/PowerManager.java

index 37b8327..46b3801 100644 (file)
@@ -22469,6 +22469,7 @@ package android.os {
     method public boolean isInteractive();
     method public boolean isPowerSaveMode();
     method public deprecated boolean isScreenOn();
+    method public boolean isWakeLockLevelSupported(int);
     method public android.os.PowerManager.WakeLock newWakeLock(int, java.lang.String);
     method public void reboot(java.lang.String);
     method public void userActivity(long, boolean);
@@ -22478,8 +22479,10 @@ package android.os {
     field public static final deprecated int FULL_WAKE_LOCK = 26; // 0x1a
     field public static final int ON_AFTER_RELEASE = 536870912; // 0x20000000
     field public static final int PARTIAL_WAKE_LOCK = 1; // 0x1
+    field public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32; // 0x20
     field public static final deprecated int SCREEN_BRIGHT_WAKE_LOCK = 10; // 0xa
     field public static final deprecated int SCREEN_DIM_WAKE_LOCK = 6; // 0x6
+    field public static final int WAIT_FOR_PROXIMITY_NEGATIVE = 1; // 0x1
   }
 
   public final class PowerManager.WakeLock {
@@ -22487,6 +22490,7 @@ package android.os {
     method public void acquire(long);
     method public boolean isHeld();
     method public void release();
+    method public void release(int);
     method public void setReferenceCounted(boolean);
     method public void setWorkSource(android.os.WorkSource);
   }
index 75f8279..b167549 100644 (file)
@@ -186,8 +186,6 @@ public final class PowerManager {
      * </p><p>
      * Cannot be used with {@link #ACQUIRE_CAUSES_WAKEUP}.
      * </p>
-     *
-     * {@hide}
      */
     public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK = 0x00000020;
 
@@ -243,11 +241,9 @@ public final class PowerManager {
     public static final int UNIMPORTANT_FOR_LOGGING = 0x40000000;
 
     /**
-     * Flag for {@link WakeLock#release release(int)} to defer releasing a
-     * {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor returns
-     * a negative value.
-     *
-     * {@hide}
+     * Flag for {@link WakeLock#release WakeLock.release(int)}: Defer releasing a
+     * {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor
+     * indicates that an object is not in close proximity.
      */
     public static final int WAIT_FOR_PROXIMITY_NEGATIVE = 1;
 
@@ -456,6 +452,7 @@ public final class PowerManager {
      * @see #FULL_WAKE_LOCK
      * @see #SCREEN_DIM_WAKE_LOCK
      * @see #SCREEN_BRIGHT_WAKE_LOCK
+     * @see #PROXIMITY_SCREEN_OFF_WAKE_LOCK
      * @see #ACQUIRE_CAUSES_WAKEUP
      * @see #ON_AFTER_RELEASE
      */
@@ -619,8 +616,6 @@ public final class PowerManager {
      *
      * @param level The wake lock level to check.
      * @return True if the specified wake lock level is supported.
-     *
-     * {@hide}
      */
     public boolean isWakeLockLevelSupported(int level) {
         try {
@@ -893,8 +888,6 @@ public final class PowerManager {
          *
          * @param flags Combination of flag values to modify the release behavior.
          * Currently only {@link #WAIT_FOR_PROXIMITY_NEGATIVE} is supported.
-         *
-         * {@hide}
          */
         public void release(int flags) {
             synchronized (mToken) {