Example Analysis of getIServiceManager ()
Editor to share with you the example analysis of getIServiceManager (), I believe that most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
According to the source code, the returned result is an instance of ServiceManagerProxy object.
Private static IServiceManager getIServiceManager () {if (sServiceManager! = null) {return sServiceManager;} / / Find the service manager sServiceManager = ServiceManagerNative .asInterface (Binder.allowBlocking (BinderInternal.getContextObject ()); return sServiceManager;} static public IServiceManager asInterface (IBinder obj) {if (obj = = null) {return null } IServiceManager in = (IServiceManager) obj.queryLocalInterface (descriptor); if (in! = null) {return in;} return new ServiceManagerProxy (obj);} above is all the content of the article "sample Analysis of getIServiceManager ()". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!