Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Example Analysis of getIServiceManager ()

Shulou Source: shulou.com Published: 2022-06-01 05:54:31 11月24日 Update

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!

Tags: Articles examples analysis content not much most examples objects more source code knowledge results industry information information channels channels references learning help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology MySQL Microsoft NVidia Shulou Information