Loading api/current.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -22303,7 +22303,7 @@ package android.os { field public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32; // 0x20 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_BRIGHT_WAKE_LOCK = 10; // 0xa field public static final deprecated int SCREEN_DIM_WAKE_LOCK = 6; // 0x6 field public static final deprecated int SCREEN_DIM_WAKE_LOCK = 6; // 0x6 field public static final int WAIT_FOR_PROXIMITY_NEGATIVE = 1; // 0x1 field public static final int WAIT_FOR_DISTANT_PROXIMITY = 1; // 0x1 } } public final class PowerManager.WakeLock { public final class PowerManager.WakeLock { core/java/android/os/PowerManager.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -248,7 +248,7 @@ public final class PowerManager { * {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor * {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor * indicates that an object is not in close proximity. * indicates that an object is not in close proximity. */ */ public static final int WAIT_FOR_PROXIMITY_NEGATIVE = 1; public static final int WAIT_FOR_DISTANT_PROXIMITY = 1; /** /** * Brightness value for fully on. * Brightness value for fully on. Loading Loading @@ -961,7 +961,8 @@ public final class PowerManager { * </p> * </p> * * * @param flags Combination of flag values to modify the release behavior. * @param flags Combination of flag values to modify the release behavior. * Currently only {@link #WAIT_FOR_PROXIMITY_NEGATIVE} is supported. * Currently only {@link #WAIT_FOR_DISTANT_PROXIMITY} is supported. Passing 0 is * equivalent to calling {@link #release()}. */ */ public void release(int flags) { public void release(int flags) { synchronized (mToken) { synchronized (mToken) { Loading services/core/java/com/android/server/power/PowerManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -821,7 +821,7 @@ public final class PowerManagerService extends com.android.server.SystemService + " [" + wakeLock.mTag + "], flags=0x" + Integer.toHexString(flags)); + " [" + wakeLock.mTag + "], flags=0x" + Integer.toHexString(flags)); } } if ((flags & PowerManager.WAIT_FOR_PROXIMITY_NEGATIVE) != 0) { if ((flags & PowerManager.WAIT_FOR_DISTANT_PROXIMITY) != 0) { mRequestWaitForNegativeProximity = true; mRequestWaitForNegativeProximity = true; } } Loading tests/StatusBar/src/com/android/statusbartest/PowerTest.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -77,9 +77,9 @@ public class PowerTest extends TestActivity mProx.release(); mProx.release(); } } }, }, new Test("Disable proximity (WAIT_FOR_PROXIMITY_NEGATIVE)") { new Test("Disable proximity (WAIT_FOR_DISTANT_PROXIMITY") { public void run() { public void run() { mProx.release(PowerManager.WAIT_FOR_PROXIMITY_NEGATIVE); mProx.release(PowerManager.WAIT_FOR_DISTANT_PROXIMITY); } } }, }, new Test("Enable proximity, wait 5 seconds then disable") { new Test("Enable proximity, wait 5 seconds then disable") { Loading @@ -93,13 +93,13 @@ public class PowerTest extends TestActivity }, 5000); }, 5000); } } }, }, new Test("Enable proximity, wait 5 seconds then disable (WAIT_FOR_PROXIMITY_NEGATIVE)") { new Test("Enable proximity, wait 5 seconds then disable (WAIT_FOR_DISTANT_PROXIMITY)") { public void run() { public void run() { mProx.acquire(); mProx.acquire(); mHandler.postDelayed(new Runnable() { mHandler.postDelayed(new Runnable() { @Override @Override public void run() { public void run() { mProx.release(PowerManager.WAIT_FOR_PROXIMITY_NEGATIVE); mProx.release(PowerManager.WAIT_FOR_DISTANT_PROXIMITY); } } }, 5000); }, 5000); } } Loading Loading
api/current.txt +1 −1 Original line number Original line Diff line number Diff line Loading @@ -22303,7 +22303,7 @@ package android.os { field public static final int PROXIMITY_SCREEN_OFF_WAKE_LOCK = 32; // 0x20 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_BRIGHT_WAKE_LOCK = 10; // 0xa field public static final deprecated int SCREEN_DIM_WAKE_LOCK = 6; // 0x6 field public static final deprecated int SCREEN_DIM_WAKE_LOCK = 6; // 0x6 field public static final int WAIT_FOR_PROXIMITY_NEGATIVE = 1; // 0x1 field public static final int WAIT_FOR_DISTANT_PROXIMITY = 1; // 0x1 } } public final class PowerManager.WakeLock { public final class PowerManager.WakeLock {
core/java/android/os/PowerManager.java +3 −2 Original line number Original line Diff line number Diff line Loading @@ -248,7 +248,7 @@ public final class PowerManager { * {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor * {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor * indicates that an object is not in close proximity. * indicates that an object is not in close proximity. */ */ public static final int WAIT_FOR_PROXIMITY_NEGATIVE = 1; public static final int WAIT_FOR_DISTANT_PROXIMITY = 1; /** /** * Brightness value for fully on. * Brightness value for fully on. Loading Loading @@ -961,7 +961,8 @@ public final class PowerManager { * </p> * </p> * * * @param flags Combination of flag values to modify the release behavior. * @param flags Combination of flag values to modify the release behavior. * Currently only {@link #WAIT_FOR_PROXIMITY_NEGATIVE} is supported. * Currently only {@link #WAIT_FOR_DISTANT_PROXIMITY} is supported. Passing 0 is * equivalent to calling {@link #release()}. */ */ public void release(int flags) { public void release(int flags) { synchronized (mToken) { synchronized (mToken) { Loading
services/core/java/com/android/server/power/PowerManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -821,7 +821,7 @@ public final class PowerManagerService extends com.android.server.SystemService + " [" + wakeLock.mTag + "], flags=0x" + Integer.toHexString(flags)); + " [" + wakeLock.mTag + "], flags=0x" + Integer.toHexString(flags)); } } if ((flags & PowerManager.WAIT_FOR_PROXIMITY_NEGATIVE) != 0) { if ((flags & PowerManager.WAIT_FOR_DISTANT_PROXIMITY) != 0) { mRequestWaitForNegativeProximity = true; mRequestWaitForNegativeProximity = true; } } Loading
tests/StatusBar/src/com/android/statusbartest/PowerTest.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -77,9 +77,9 @@ public class PowerTest extends TestActivity mProx.release(); mProx.release(); } } }, }, new Test("Disable proximity (WAIT_FOR_PROXIMITY_NEGATIVE)") { new Test("Disable proximity (WAIT_FOR_DISTANT_PROXIMITY") { public void run() { public void run() { mProx.release(PowerManager.WAIT_FOR_PROXIMITY_NEGATIVE); mProx.release(PowerManager.WAIT_FOR_DISTANT_PROXIMITY); } } }, }, new Test("Enable proximity, wait 5 seconds then disable") { new Test("Enable proximity, wait 5 seconds then disable") { Loading @@ -93,13 +93,13 @@ public class PowerTest extends TestActivity }, 5000); }, 5000); } } }, }, new Test("Enable proximity, wait 5 seconds then disable (WAIT_FOR_PROXIMITY_NEGATIVE)") { new Test("Enable proximity, wait 5 seconds then disable (WAIT_FOR_DISTANT_PROXIMITY)") { public void run() { public void run() { mProx.acquire(); mProx.acquire(); mHandler.postDelayed(new Runnable() { mHandler.postDelayed(new Runnable() { @Override @Override public void run() { public void run() { mProx.release(PowerManager.WAIT_FOR_PROXIMITY_NEGATIVE); mProx.release(PowerManager.WAIT_FOR_DISTANT_PROXIMITY); } } }, 5000); }, 5000); } } Loading