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

Commit 9c043fed authored by Satoshi Niwa's avatar Satoshi Niwa
Browse files

PermissionService: Use user-specific context for PermissionControllerManager

PermissionService was using a single, system-wide instance of PermissionControllerManager, which was created with the context of the system user (user 0).

This caused EACCES (Permission denied) errors during backup and restore operations on multi-user devices, particularly HSUM.
The PermissionController service, running as the system user, was incorrectly trying to access files in the target user's device-encrypted storage (e.g., /data/user_de/10/...).

This change fixes the issue by maintaining a cache of PermissionControllerManager instances, one for each user.

Bug: 415449393
Test: atest android.backup.cts.PermissionTest
Flag: EXEMPT bug fix
Change-Id: If1f83bc5c18a886fdac8f8d5fb450afef1020e86
parent 58668a9a
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