diff --git a/lineage/lib/main/java/org/lineageos/platform/internal/display/ColorTemperatureController.java b/lineage/lib/main/java/org/lineageos/platform/internal/display/ColorTemperatureController.java index 27b86d9a..40bc681f 100644 --- a/lineage/lib/main/java/org/lineageos/platform/internal/display/ColorTemperatureController.java +++ b/lineage/lib/main/java/org/lineageos/platform/internal/display/ColorTemperatureController.java @@ -62,7 +62,7 @@ public class ColorTemperatureController extends LiveDisplayFeature { private final LineageHardwareManager mHardware; - private static final long TWILIGHT_ADJUSTMENT_TIME = DateUtils.HOUR_IN_MILLIS * 1; + private static final long TWILIGHT_ADJUSTMENT_TIME = DateUtils.HOUR_IN_MILLIS / 2; private static final Uri DISPLAY_TEMPERATURE_DAY = LineageSettings.System.getUriFor(LineageSettings.System.DISPLAY_TEMPERATURE_DAY); @@ -295,21 +295,21 @@ public class ColorTemperatureController extends LiveDisplayFeature { if (sunset < 0 || sunrise < 0 || now < (sunset - TWILIGHT_ADJUSTMENT_TIME) || now > (sunrise + TWILIGHT_ADJUSTMENT_TIME)) { - // More than 1hr after civil sunrise or before civil sunset + // More than 0.5hr after civil sunrise or before civil sunset return 1.0f; } - // Scale the transition into night mode in 1hr before civil sunset + // Scale the transition into night mode in 0.5hr before civil sunset if (now <= sunset) { return (float) (sunset - now) / TWILIGHT_ADJUSTMENT_TIME; } - // Scale the transition into day mode in 1hr after civil sunrise + // Scale the transition into day mode in 0.5hr after civil sunrise if (now >= sunrise) { return (float) (now - sunrise) / TWILIGHT_ADJUSTMENT_TIME; } - // More than 1hr past civil sunset + // More than 0.5hr past civil sunset return 0.0f; }