diff options
Diffstat (limited to 'src/com/android/settings/widget')
-rw-r--r-- | src/com/android/settings/widget/SettingsAppWidgetProvider.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/settings/widget/SettingsAppWidgetProvider.java b/src/com/android/settings/widget/SettingsAppWidgetProvider.java index 4ec5b82..005fc13 100644 --- a/src/com/android/settings/widget/SettingsAppWidgetProvider.java +++ b/src/com/android/settings/widget/SettingsAppWidgetProvider.java @@ -435,6 +435,7 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider { brightness = MAXIMUM_BACKLIGHT; } else { brightnessMode = Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC; + brightness = MINIMUM_BACKLIGHT; } if (context.getResources().getBoolean( @@ -443,6 +444,9 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider { Settings.System.putInt(context.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE, brightnessMode); + } else { + // Make sure we set the brightness if automatic mode isn't available + brightnessMode = Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL; } if (brightnessMode == Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL) { power.setBacklightBrightness(brightness); |