当前位置:网站首页>getIServiceManager() 源码分析
getIServiceManager() 源码分析
2020-11-10 08:34:00 【天王盖地虎626】
通过源码得知,返回结果是ServiceManagerProxy 对象实例
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);
}
版权声明
本文为[天王盖地虎626]所创,转载请带上原文链接,感谢
https://my.oschina.net/u/920274/blog/4708361
边栏推荐
- 利用尾巴作为时间序列进行处理来识别鲸鱼
- [elixir! #0073] beam 内置的内存数据库 —— ETS
- 消防知识线上答题活动小程序复盘
- Coding style: SSM environment in MVC mode, code hierarchical management
- 港股上市公司移卡收购创信众42.5%股权 谋划加快营销服务布局
- [论文阅读笔记] Community-oriented attributed network embedding
- Exception: invalid or unexpected token
- 一幅图像能顶16x16字!——用于大规模图像缩放识别的变压器(对ICLR 2021年论文的简要回顾)
- Several solutions to the problem that selenium webdriver always fails to use click
- Common concepts and points for attention of CUDA
猜你喜欢
初级工程师如何在职场生存
图-无向图
CSDN bug6: to be added
一幅图像能顶16x16字!——用于大规模图像缩放识别的变压器(对ICLR 2021年论文的简要回顾)
Filezilla server配置FTP服务器中的各种问题与解决方法
Notes on Python cookbook 3rd (2.2): String start or end match
csdn bug11:待加
Prometheus installation configuration
JMeter interface test -- a solution with token
编码风格:Mvc模式下SSM环境,代码分层管理
随机推荐
selenium webdriver使用click一直失效问题的几种解决方法
lodash.js Source code flatten
js解决浏览器打印自动分页的问题
JS label syntax jumps out of multiple loops
Centos7 operating system security hardening series (2)
Error running app: default activity not found solution
[leetcode] 92 integer inversion
CSDN BUG1: to be added
Android quick shutdown app
《Python Cookbook 3rd》笔记(2.1):使用多个界定符分割字符串
JMeter interface test -- a solution with token
[paper reading notes] network embedding with attribute refinement
走进C# abstract,了解抽象类与接口的异同
About CentOS start error: the solution of failed to start crash recovery kernel arming
Fire knowledge online answer activity small program
csdn bug8:待加
浅谈字节最新开源联邦机器学习平台Fedlearner
Promote China manufacturing upgrade, 3D visualization of production line in automobile assembly workshop
jt-day10
Learning from scratch YoMo series: Opening