自 2025 年 3 月 27 日起,我们建议您使用 android-latest-release
而非 aosp-main
构建 AOSP 并为其做出贡献。如需了解详情,请参阅 AOSP 的变更。
通知使用权和通知监听器政策
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本页面上的内容和代码示例受内容许可部分所述许可的限制。Java 和 OpenJDK 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-27。
[null,null,["最后更新时间 (UTC):2025-07-27。"],[],[],null,["# Notification access and notification listener policy\n\nThe notification access and notification listener policy covers the following permission\nand configuration.\n\n\n- The [ACCESS_NOTIFICATIONS](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/res/AndroidManifest.xml?q=android.permission.ACCESS_NOTIFICATIONS) privileged permission allows an app to read the current set of notifications, including any metadata and attached intents.\n- An app can be designated as a default notification listener by adding its package name to [config_defaultListenerAccessPackages](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/res/res/values/config.xml?q=config_defaultListenerAccessPackages&sq=&ss=android) in `config.xml` or any OEM overlays. A default notification listener is granted access to all incoming notifications, but access to notifications can be turned off by users in the Notification Access settings in the Settings app."]]