Remove PowerManager.setAutoBrightness()

We will use the System.SCREEN_BRIGHTNESS_MODE Settings value instead.

Change-Id: I1850549f513e3541b5761aae28ebc615410377de
Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2009-10-14 21:19:04 -07:00
parent 9f1900dc05
commit cdf42466bf
2 changed files with 7 additions and 18 deletions

View File

@@ -393,10 +393,9 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
if (context.getResources().getBoolean(
com.android.internal.R.bool.config_automatic_brightness_available)) {
// Disable automatic brightness
power.setAutoBrightness(false);
Settings.System.putInt(context.getContentResolver(),
Settings.System.SCREEN_BRIGHTNESS_MODE,
0);
Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
// Set it again in case auto brightness was on
power.setBacklightBrightness(brightness);
}