问题
I saw this post Brightness Screen Filter
which describes how to create a simple screen filter.
That code used
private void setBrightness(int brightness) {
try {
IHardwareService hardware = IHardwareService.Stub.asInterface(
ServiceManager.getService("hardware"));
if (hardware != null) {
hardware.setScreenBacklight(brightness);
}
} catch (RemoteException doe) {
}
}
But i could not find the IHardwareService.jar
Can anyone explain me the code that i should use to create this simple app?
Providing the jar file would be also appreciated!
回答1:
I found your jar file. It can be obtained in this link
by clicking "View raw file" on the right bottom side of the page.
Hope it helps you.
If the link is broken, just warn me.
来源:https://stackoverflow.com/questions/22748031/create-a-simple-screen-filter