IPowerManager power = IPowerManager.Stub.asInterface(
ServiceManager.getService("power"));
if (power != null) {
try {
power.setTemporaryScreenBrightnessSettingOverride(0);
} catch (RemoteException darn) {
}
}
Settings.System.putInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 0);