I'm trying to change the brightness mode and value on my phone, and found a great thread here at SO that I thought answered my question, but on my froyo Dell Streak this code simply does nothing. putInt() is returning true so by all accounts it seems to be successful, yet brightness remains exactly the same, can't even get it to switch between manual and automatic......I have the WRITE_SETTINGS permission set, and logcat doesn't seem to have any other relevant output coming out....stumped right now, gonna take a break for a while o_0
Here's a snippet of how I'm calling it, this is inside my (only) Activity:
public void onCheckedChanged(RadioGroup group, int checked) {
//BrightSettings bright = new BrightSettings();
switch(checked)
{
case R.id.daybutton:
//bright.setBrightMode(BrightSettings.DAY_MODE);
if(Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC))
Log.d("NightMode", "Brightness seems to be set to auto....");
case R.id.nightbutton:
//bright.setBrightMode(BrightSettings.NIGHT_MODE);
if (Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS_MODE, Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL) && Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 2) )
Log.d("NightMode", "Night mode seems to have been set....");
}
}