am 6d9eebe7: Merge change 25090 into eclair
Merge commit '6d9eebe7320637f0256c077ba5ed6724b5a4ab0d' into eclair-plus-aosp * commit '6d9eebe7320637f0256c077ba5ed6724b5a4ab0d': Move backlight brightness from HardwareService to PowerManager
This commit is contained in:
@@ -28,12 +28,6 @@ interface IHardwareService
|
||||
boolean getFlashlightEnabled();
|
||||
void setFlashlightEnabled(boolean on);
|
||||
void enableCameraFlash(int milliseconds);
|
||||
|
||||
// sets the brightness of the backlights (screen, keyboard, button) 0-255
|
||||
void setBacklights(int brightness);
|
||||
|
||||
// enables or disables automatic brightness mode
|
||||
void setAutoBrightness(boolean on);
|
||||
|
||||
// for the phone
|
||||
void setAttentionLight(boolean on);
|
||||
|
||||
@@ -31,4 +31,10 @@ interface IPowerManager
|
||||
long getScreenOnTime();
|
||||
void preventScreenOn(boolean prevent);
|
||||
void setScreenBrightnessOverride(int brightness);
|
||||
|
||||
// sets the brightness of the backlights (screen, keyboard, button) 0-255
|
||||
void setBacklightBrightness(int brightness);
|
||||
|
||||
// enables or disables automatic brightness mode
|
||||
void setAutoBrightness(boolean on);
|
||||
}
|
||||
|
||||
@@ -379,6 +379,21 @@ public class PowerManager
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* sets the brightness of the backlights (screen, keyboard, button).
|
||||
*
|
||||
* @param brightness value from 0 to 255
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
public void setBacklightBrightness(int brightness)
|
||||
{
|
||||
try {
|
||||
mService.setBacklightBrightness(brightness);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the set of flags for {@link #newWakeLock(int, String) newWakeLock()}
|
||||
* that are supported on the device.
|
||||
|
||||
Reference in New Issue
Block a user