File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
services/java/com/android/server/power Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -339,6 +339,15 @@ public static boolean useScreenAutoBrightnessAdjustmentFeature() {
339339 return SystemProperties .getBoolean ("persist.power.useautobrightadj" , false );
340340 }
341341
342+ /**
343+ * Returns true if the twilight service should be used to adjust screen brightness
344+ * policy. This setting is experimental and disabled by default.
345+ * @hide
346+ */
347+ public static boolean useTwilightAdjustmentFeature () {
348+ return SystemProperties .getBoolean ("persist.power.usetwilightadj" , false );
349+ }
350+
342351 /**
343352 * Creates a new wake lock with the specified level and flags.
344353 * <p>
Original file line number Diff line number Diff line change 4444import android .view .Display ;
4545
4646import java .io .PrintWriter ;
47- import java .io .StringWriter ;
4847import java .util .concurrent .Executor ;
4948
5049/**
@@ -95,7 +94,8 @@ final class DisplayPowerController {
9594 // when it is especially dark outside. The light sensor tends to perform
9695 // poorly at low light levels so we compensate for it by making an
9796 // assumption about the environment.
98- private static final boolean USE_TWILIGHT_ADJUSTMENT = true ;
97+ private static final boolean USE_TWILIGHT_ADJUSTMENT =
98+ PowerManager .useTwilightAdjustmentFeature ();
9999
100100 // Specifies the maximum magnitude of the time of day adjustment.
101101 private static final float TWILIGHT_ADJUSTMENT_MAX_GAMMA = 1.5f ;
You can’t perform that action at this time.
0 commit comments