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
Loading
Please register or sign in to comment