2020-05-09 Android Binder

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;
    }
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。