Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 655f1a45 authored by Dmitrii Merkurev's avatar Dmitrii Merkurev
Browse files

Currently, Uri Permissions read/write grants are modified/accessed from...

Currently, Uri Permissions read/write grants  are modified/accessed from different parts across the system:

* `UriGrantsManagerService.revokeUriPermissionFromOwner` (which is using `owner.removeUriPermission` (iterating over all read/write permissions for owner) without locking)

* `UriGrantsManagerService.grantUriPermissionUnchecked` (which is using `UriPermission.grantModes` (adding new read/write permissions for owner) without any locking)

* `UriGrantsManagerService.removeUriPermissionsForPackageLocked` and `UriGrantsManagerService.revokeUriPermissionLocked` (which is using `UriPermission.revokeModes` (removing read/write permissions for owner) with main UriGrantsManagerService lock)

* `WindowManager` and `ActivityManager` (that using `removeUriPermissions` directly (iterating over all read/write permissions for owner) without any locking)

Introduce synchronization for this part of the system.

Bug: 213993781
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/uri/
Change-Id: Idbe02e53e2b4c9fcb02d6e22dc92480d711c7779
parent 71f72f13
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment