livedisplay: Fix another transition issue
* If the screen is off during the entire transition period, when we turn the display back on it is not updated with the correct color temperature. * The code here is trying to be Mr. Smarty Pants and avoid extra updates, but it's totally pointless and also broken. There's no ill effects from writing to the hardware when the screen comes on, and updateColorTemperature already has all the other conditionals we need. * Just call updateColorTemperature every time, regardless. The LiveDisplayService ensures the callbacks run on the handler thread and all this crap can be removed. Change-Id: Ib9560e13870a5c6bbe9c5a26fad40f5ec1cefa83
This commit is contained in:
parent
4595cfde0b
commit
153bd2287c
@ -96,19 +96,12 @@ public class ColorTemperatureController extends LiveDisplayFeature {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onScreenStateChanged() {
|
protected void onScreenStateChanged() {
|
||||||
// pause/continue transition
|
updateColorTemperature();
|
||||||
if (isTransitioning()) {
|
|
||||||
if (isScreenOn()) {
|
|
||||||
mHandler.post(mTransitionRunnable);
|
|
||||||
} else {
|
|
||||||
mHandler.removeCallbacks(mTransitionRunnable);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onTwilightUpdated() {
|
protected void onTwilightUpdated() {
|
||||||
mHandler.post(mTransitionRunnable);
|
updateColorTemperature();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user