Merge change 27471 into eclair
* changes: Fix power widget brightness for Sholes.
This commit is contained in:
@@ -390,8 +390,14 @@ public class SettingsAppWidgetProvider extends AppWidgetProvider {
|
|||||||
}
|
}
|
||||||
power.setBacklightBrightness(brightness);
|
power.setBacklightBrightness(brightness);
|
||||||
Settings.System.putInt(cr, Settings.System.SCREEN_BRIGHTNESS, brightness);
|
Settings.System.putInt(cr, Settings.System.SCREEN_BRIGHTNESS, brightness);
|
||||||
brightness = Settings.System.getInt(cr,
|
if (context.getResources().getBoolean(
|
||||||
Settings.System.SCREEN_BRIGHTNESS);
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.d(TAG, "toggleBrightness: " + e);
|
Log.d(TAG, "toggleBrightness: " + e);
|
||||||
|
Reference in New Issue
Block a user