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
ServiceManager通过懒加载提供NotificationManager对象
static public INotificationManager getService()
{
if (sService != null) {//懒加载-----
return sService;
}
IBinder b = ServiceManager.getService("notification");
sService = INotificationManager.Stub.asInterface(b);
return sService;
}