Merge "Make brightness transition to ON immediate if the screen was OFF because of close proxiity" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e40c77a2bd
@@ -1204,6 +1204,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
}
|
}
|
||||||
assert(state != Display.STATE_UNKNOWN);
|
assert(state != Display.STATE_UNKNOWN);
|
||||||
|
|
||||||
|
boolean skipRampBecauseOfProximityChangeToNegative = false;
|
||||||
// Apply the proximity sensor.
|
// Apply the proximity sensor.
|
||||||
if (mProximitySensor != null) {
|
if (mProximitySensor != null) {
|
||||||
if (mPowerRequest.useProximitySensor && state != Display.STATE_OFF) {
|
if (mPowerRequest.useProximitySensor && state != Display.STATE_OFF) {
|
||||||
@@ -1241,6 +1242,7 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
// the screen back on. Also turn it back on if we've been asked to ignore the
|
// the screen back on. Also turn it back on if we've been asked to ignore the
|
||||||
// prox sensor temporarily.
|
// prox sensor temporarily.
|
||||||
mScreenOffBecauseOfProximity = false;
|
mScreenOffBecauseOfProximity = false;
|
||||||
|
skipRampBecauseOfProximityChangeToNegative = true;
|
||||||
sendOnProximityNegativeWithWakelock();
|
sendOnProximityNegativeWithWakelock();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1523,8 +1525,8 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
|||||||
|
|
||||||
final boolean wasOrWillBeInVr =
|
final boolean wasOrWillBeInVr =
|
||||||
(state == Display.STATE_VR || oldState == Display.STATE_VR);
|
(state == Display.STATE_VR || oldState == Display.STATE_VR);
|
||||||
final boolean initialRampSkip =
|
final boolean initialRampSkip = (state == Display.STATE_ON && mSkipRampState
|
||||||
state == Display.STATE_ON && mSkipRampState != RAMP_STATE_SKIP_NONE;
|
!= RAMP_STATE_SKIP_NONE) || skipRampBecauseOfProximityChangeToNegative;
|
||||||
// While dozing, sometimes the brightness is split into buckets. Rather than animating
|
// While dozing, sometimes the brightness is split into buckets. Rather than animating
|
||||||
// through the buckets, which is unlikely to be smooth in the first place, just jump
|
// through the buckets, which is unlikely to be smooth in the first place, just jump
|
||||||
// right to the suggested brightness.
|
// right to the suggested brightness.
|
||||||
|
|||||||
Reference in New Issue
Block a user