File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
services/java/com/android/server/power Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -330,6 +330,15 @@ public int getDefaultScreenBrightnessSetting() {
330330 com .android .internal .R .integer .config_screenBrightnessSettingDefault );
331331 }
332332
333+ /**
334+ * Returns true if the screen auto-brightness adjustment setting should
335+ * be available in the UI. This setting is experimental and disabled by default.
336+ * @hide
337+ */
338+ public static boolean useScreenAutoBrightnessAdjustmentFeature () {
339+ return SystemProperties .getBoolean ("persist.power.useautobrightadj" , false );
340+ }
341+
333342 /**
334343 * Creates a new wake lock with the specified level and flags.
335344 * <p>
Original file line number Diff line number Diff line change @@ -83,7 +83,8 @@ final class DisplayPowerController {
8383 private static final boolean USE_ELECTRON_BEAM_ON_ANIMATION = false ;
8484
8585 // If true, enables the use of the screen auto-brightness adjustment setting.
86- private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT = false ;
86+ private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT =
87+ PowerManager .useScreenAutoBrightnessAdjustmentFeature ();
8788
8889 // The maximum range of gamma adjustment possible using the screen
8990 // auto-brightness adjustment setting.
You can’t perform that action at this time.
0 commit comments