Expose PowerManager.isScreenOn in the public api.
Change-Id: I6ccd2ebcbf3f8ad9ffa4b86a9c037cb0c25a7b78
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 611a86e..270e3cb 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -1780,13 +1780,13 @@
}
}
- boolean screenIsOn() {
+ public boolean isScreenOn() {
synchronized (mLocks) {
return (mPowerState & SCREEN_ON_BIT) != 0;
}
}
- boolean screenIsBright() {
+ boolean isScreenBright() {
synchronized (mLocks) {
return (mPowerState & SCREEN_BRIGHT) == SCREEN_BRIGHT;
}
@@ -2089,7 +2089,7 @@
boolean enabled = (mode == SCREEN_BRIGHTNESS_MODE_AUTOMATIC);
if (mUseSoftwareAutoBrightness && mAutoBrightessEnabled != enabled) {
mAutoBrightessEnabled = enabled;
- if (screenIsOn()) {
+ if (isScreenOn()) {
// force recompute of backlight values
if (mLightSensorValue >= 0) {
int value = (int)mLightSensorValue;