When using EXTRA_USER_HANDLE, check for INTERACT_ACROSS_USERS_FULL permission on calling package.
Bug: 259385017
Test:
1. Build a test app that creates and starts an intent to NOTIFICATION_LISTENER_DETAIL_SETTINGS while setting the intent extra "android.intent.extra.user_handle" to UserHandle(secondaryUserId).
2. Create and switch to a secondary user
Settings > System > Multiple users > Allow multiple users > Add user > Switch to New user
3. Open Settings > Notifications > Device & app notifications and choose an app from the list (uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE). Enable Device & app notifications for selected app and disable all attributed permissions.
4. Switch back to the Owner user.
5. Get the userId of the secondary user: adb shell pm list users.
6. Open the test app and enter the userId for the secondary user and the component name that uses android.permission.BIND_NOTIFICATION_LISTENER_SERVICE.
8. In the settings window that open, enable all 4 sub-options.
9. Switch to the secondary user and note that the all sub-options for the app are disabled.
Change-Id: I875b9f2fc32c252acdcf8374a14067836e0f1ac6
Regardless if the target package exists or not.
Test: Launch dnd and NLS screen with valid and invalid
packages; ensure the result code is the same for both
Bug: 195412179
Change-Id: I1bacd54c2971afb3733ca2f1462bcaabaada300b
- Update strings
- Link to NLS page from notifications
- And fix an ordering issue on that page
Test: manual
Fixes: 181855978
Fixes: 181125178
Change-Id: I93d975763326d1e6d0cd02887abc515ad55329d0
If a notification listener has access via the
companion device manager api, list the name(s) of the
associated devices to give the user more context about
why the app has notification listener access.
Test: settings unit
Bug: 181125174
Change-Id: I01771b2c4e136fe16d23e89f33f85f63803e3f7c
- Allow an app to tell us they will never bridge a notification
type. We will then not let a user select that type
- Checkboxes everywhere.
Test: Settings unit
Bug: 181125165
Bug: 181124973
Change-Id: I73939d3d0e99016456e009b2f104cdded98411c6
Now users can prevent a given notification listener from seeing
notifications from particular apps.
Test: settings unit tests
Bug: 173052211
Change-Id: Ia868d6dc2da1ae7f75c0dca47034e28910584acd