Merge "Enable auto-brightness adjustment feature with system prop." into jb-mr1-dev
This commit is contained in:
@@ -330,6 +330,15 @@ public final class PowerManager {
|
||||
com.android.internal.R.integer.config_screenBrightnessSettingDefault);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the screen auto-brightness adjustment setting should
|
||||
* be available in the UI. This setting is experimental and disabled by default.
|
||||
* @hide
|
||||
*/
|
||||
public static boolean useScreenAutoBrightnessAdjustmentFeature() {
|
||||
return SystemProperties.getBoolean("persist.power.useautobrightadj", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new wake lock with the specified level and flags.
|
||||
* <p>
|
||||
|
||||
@@ -83,7 +83,8 @@ final class DisplayPowerController {
|
||||
private static final boolean USE_ELECTRON_BEAM_ON_ANIMATION = false;
|
||||
|
||||
// If true, enables the use of the screen auto-brightness adjustment setting.
|
||||
private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT = false;
|
||||
private static final boolean USE_SCREEN_AUTO_BRIGHTNESS_ADJUSTMENT =
|
||||
PowerManager.useScreenAutoBrightnessAdjustmentFeature();
|
||||
|
||||
// The maximum range of gamma adjustment possible using the screen
|
||||
// auto-brightness adjustment setting.
|
||||
|
||||
Reference in New Issue
Block a user