hi,all
I have a question that how to get a service?
I have two different method to set backlightbrightness
1.
IPowerManager pm =
IPowerManager.Stub.asInterface(ServiceManager.getService(Context.POWER_SERVICE));
pm.setBacklightBrightness(0);
2.
PowerManager mpm =
(PowerManager)mContext.getSystemService(Context.POWEER_SERVICE);
mpm.setBacklightBrightness(0);
and I read the source code, that the two method will use the first method.
PowerManager.java
public void setBacklightBrightness(int brightness)
{
try {
mService.setBacklightBightness(brightness);
}catch(RemoteException e) {
}
}
what is the difference of the two method?
thanks in advance.
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en