Skip to content

DRAFT: Add RECEIVE_SENSITIVE_NOTIFICATIONS permission

Simon Redman requested to merge work/siredman/android-15-otp into master

Summary

Add the (undocumented) RECEIVE_SENSITIVE_NOTIFICATIONS permission, to allow Android 15+ to show us sensitive notifications, such as those which contain one-time login codes.

This permission is only allowed for signature|role, meaning a manufacturer-signed system app, or one with the appropriate role. We would fit the COMPANION_DEVICE_COMPUTER role[1], except that role is defined to require to be installed in the system partition[2]

[1] https://source.android.com/docs/core/permissions/android-roles

[2] https://android.googlesource.com/platform/packages/modules/Permission/+/7816a6a2bfed3e4727f6b6f767a3e0f825dce880/PermissionController/res/xml/roles.xml#1102

Draft because my local build is currently not working. I will race CI vs. my machine to see who gets me an APK first.

BUG: 495146

Test Plan

Before:

Notifications which would contain sensitive information, are instead replaced as "Sensitive notification content hidden".

After:

Sensitive notifications are forwarded correctly, as before Android 15.

Edited by Simon Redman

Merge request reports

Loading