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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user