aboutsummaryrefslogtreecommitdiffstats
path: root/cm
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-04-26 22:31:28 -0700
committerSteve Kondik <steve@cyngn.com>2016-04-26 22:36:52 -0700
commit153bd2287cf5658d8eba9e9179404c223fbb9d51 (patch)
tree0c8c99990c9a64c8cbd9eee71b1359f8590c420b /cm
parent4595cfde0bc2a837964a1723e71ab5fbcb0ee90d (diff)
downloadvendor_cmsdk-153bd2287cf5658d8eba9e9179404c223fbb9d51.zip
vendor_cmsdk-153bd2287cf5658d8eba9e9179404c223fbb9d51.tar.gz
vendor_cmsdk-153bd2287cf5658d8eba9e9179404c223fbb9d51.tar.bz2
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
Diffstat (limited to 'cm')
-rw-r--r--cm/lib/main/java/org/cyanogenmod/platform/internal/display/ColorTemperatureController.java11
1 files changed, 2 insertions, 9 deletions
diff --git a/cm/lib/main/java/org/cyanogenmod/platform/internal/display/ColorTemperatureController.java b/cm/lib/main/java/org/cyanogenmod/platform/internal/display/ColorTemperatureController.java
index d20c002..3184d71 100644
--- a/cm/lib/main/java/org/cyanogenmod/platform/internal/display/ColorTemperatureController.java
+++ b/cm/lib/main/java/org/cyanogenmod/platform/internal/display/ColorTemperatureController.java
@@ -96,19 +96,12 @@ public class ColorTemperatureController extends LiveDisplayFeature {
@Override
protected void onScreenStateChanged() {
- // pause/continue transition
- if (isTransitioning()) {
- if (isScreenOn()) {
- mHandler.post(mTransitionRunnable);
- } else {
- mHandler.removeCallbacks(mTransitionRunnable);
- }
- }
+ updateColorTemperature();
}
@Override
protected void onTwilightUpdated() {
- mHandler.post(mTransitionRunnable);
+ updateColorTemperature();
}
@Override