am 89f5a462: Merge "More paths for turning on screen immediately." into jb-dev

* commit '89f5a4624bfa487cb5fb192d9c3c9b30937b3f26':
  More paths for turning on screen immediately.
This commit is contained in:
Craig Mautner
2012-06-18 18:04:42 -07:00
committed by Android Git Automerger

View File

@@ -2117,6 +2117,10 @@ public class PowerManagerService extends IPowerManager.Stub
brightness = mScreenBrightnessDim;
}
}
if (mWaitingForFirstLightSensor && (newState & SCREEN_ON_BIT) != 0) {
steps = IMMEDIATE_ANIM_STEPS;
}
long identity = Binder.clearCallingIdentity();
try {
mBatteryStats.noteScreenBrightness(brightness);
@@ -3359,6 +3363,7 @@ public class PowerManagerService extends IPowerManager.Stub
}
SensorEventListener mLightListener = new SensorEventListener() {
@Override
public void onSensorChanged(SensorEvent event) {
if (mDebugLightSensor) {
Slog.d(TAG, "onSensorChanged: light value: " + event.values[0]);
@@ -3369,12 +3374,16 @@ public class PowerManagerService extends IPowerManager.Stub
return;
}
handleLightSensorValue((int)event.values[0], mWaitingForFirstLightSensor);
if (mWaitingForFirstLightSensor) {
if (mWaitingForFirstLightSensor && !mPreparingForScreenOn) {
if (mDebugLightAnimation) {
Slog.d(TAG, "onSensorChanged: Clearing mWaitingForFirstLightSensor.");
}
mWaitingForFirstLightSensor = false;
}
}
}
@Override
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// ignore
}