监听的核心代码
这个咱也不是很懂,是时候跟做了多年 SystemUI 和 Launcher 的老婆求助了....@史工
1.6 App Notification 监听- 文件 :4f260398-e9d1-4390-bbb9-eeb49c07bf3c.dex
- 类名 :com.google.android.sd.biz_dynamic_dex.notification_listener.NotificationListenerExecutor
上面那个是 UdNotificationListenerExecutor , 这个是 NotificationListenerExecutor,UD 是啥?
这个反射调用的 setNotificationListenerAccessGranted 是个 SystemAPI,获得通知的使用权,果然有权限就可以为所欲为