当前位置:网站首页>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
边栏推荐
- 图-无向图
- delete、truncate、drop 有什么区别,误删数据怎么办
- Youtube订阅——解决在弹窗内使用Youtube订阅按钮高度显示不全的问题
- 痞子衡嵌入式:RT-UFL - 一个适用全平台i.MXRT的超级下载算法设计
- proxy 的不完整polyfill
- CSDN bug3: to be added
- JS solves the problem of automatic pagination in browser printing
- Centos7 operating system security hardening series (2)
- Prometheus installation configuration
- Simple use of JMeter
猜你喜欢
OSChina 周二乱弹 —— 我养的绿植分别为土豆,生姜,蒜
z-index属性详解
Promote China manufacturing upgrade, 3D visualization of production line in automobile assembly workshop
图-无向图
CSDN bug6: to be added
Raspberry pie drum set WiFi
CSDN bug8: to be added
One image can hold 16x16 words! ——Transformers for large scale image scaling recognition (a brief review of ICLR 2021 papers)
The solution of polar experience insensitive verification
商品管统——采购需求合并到采购单
随机推荐
Promote China manufacturing upgrade, 3D visualization of production line in automobile assembly workshop
After seven years of pursuing, nearly one billion US dollars of bitcoin was eventually confiscated and confiscated by the US government
极验无感验证破解
Centos7 operating system security hardening series (2)
CUDA_ Shared memory, memory access mechanism, access optimization
对于程序员,那些既陌生又熟悉的计算机硬件
【LeetCode】 92 整数反转
[论文阅读笔记] Network Embedding with Attribute Refinement
异常:Invalid or unexpected token
商品管统——采购需求合并到采购单
C / C + + Programming Notes: C language development tank war! In memory of our lost little overlord game
Thinking about competitive programming: myths and shocking facts
The length of the last word in leetcode
Error running app: default activity not found solution
The solution of polar experience insensitive verification
Algorithm template arrangement (1)
js label语法跳出多重循环
推动中国制造升级,汽车装配车间生产流水线 3D 可视化
Oschina: my green plants are potatoes, ginger and garlic
小度“破圈”提速,IoT迎来新故事