美文网首页
2020-05-09 Android Binder

2020-05-09 Android Binder

作者: 托托1 | 来源:发表于2020-05-12 17:25 被阅读0次

Android 是一个基于Binder机制通信的C/S架构,包含:Client Server Servicemanager三部分。


image.png

ProcessState.cpp

image

https://www.jianshu.com/p/27f62f00c9ca


AIDL的用法
https://www.jianshu.com/p/5043a1a69269


NotificationManager提供的函数:

ServiceManager通过懒加载提供NotificationManager对象

 static public INotificationManager getService()
    {
        if (sService != null) {//懒加载-----
            return sService;
        }
        IBinder b = ServiceManager.getService("notification");
        sService = INotificationManager.Stub.asInterface(b);
        return sService;
    }

相关文章

网友评论

      本文标题:2020-05-09 Android Binder

      本文链接:https://www.haomeiwen.com/subject/whbhnhtx.html