From 3e93b16fd13dc116e16c9ba077947e72082bff32 Mon Sep 17 00:00:00 2001 From: Jay Thomas Sullivan Date: Sun, 22 Oct 2023 22:08:05 -0700 Subject: [Role Logic Move] Make RoleManager methods user-aware Some RoleManager API methods are not multi-user-aware; for example, the methods named "...FromController", among others. These methods lead to Binder.getCallingUid(). And, many of those methods are called from the role-controller business logic. But, that business logic will will be moving from a per-user app into SystemServer. So, we need to make these methods multi-user-aware to support the Role Business Logic Move project. To do so, modify these methods to receive the user from the context, and mark the APIs as @UserHandleAware. For compatibility reasons, use CompatChanges, which will only enable this change for callers with targetSdk V+. Since this is the first time we've used CompatChanges in the Permission APEX, this involves updating Android.bp files. Test: atest CtsRoleTestCases Bug: 303742236 Change-Id: I8efae9ffe083f8e33ea1bd221bc1ed05c1100a13 --- Android.bp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Android.bp') diff --git a/Android.bp b/Android.bp index bf7437814..59742acc1 100644 --- a/Android.bp +++ b/Android.bp @@ -21,6 +21,9 @@ apex { name: "com.android.permission", defaults: ["com.android.permission-defaults"], manifest: "apex_manifest.json", + compat_configs: [ + "framework-permission-s-compat-config" + ], } apex_defaults { -- cgit v1.2.3-59-g8ed1b