Merge "Enable auto-brightness adjustment feature with system prop." into jb-mr1-dev

This commit is contained in:
Jeff Brown
2012-09-08 15:53:49 -07:00
committed by Android (Google) Code Review
2 changed files with 11 additions and 1 deletions

View File

@@ -330,6 +330,15 @@ public final class PowerManager {
com.android.internal.R.integer.config_screenBrightnessSettingDefault); 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. * Creates a new wake lock with the specified level and flags.
* <p> * <p>

View File

@@ -83,7 +83,8 @@ final class DisplayPowerController {
private static final boolean USE_ELECTRON_BEAM_ON_ANIMATION = false; private static final boolean USE_ELECTRON_BEAM_ON_ANIMATION = false;
// If true, enables the use of the screen auto-brightness adjustment setting. // 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 // The maximum range of gamma adjustment possible using the screen
// auto-brightness adjustment setting. // auto-brightness adjustment setting.