diff options
author | Alex Kershaw <alexkershaw@google.com> | 2020-12-05 10:03:00 +0000 |
---|---|---|
committer | kholoud mohamed <kholoudm@google.com> | 2020-12-17 13:27:34 +0000 |
commit | f764d9e98f9fadb1c76b89e768683bb02595363c (patch) | |
tree | 460df70ae6ceeb92d9e4804cf0a5f21f59905685 /tools/aapt2/java/ProguardRules_test.cpp | |
parent | 6403bb4cc2f9dd141a08e34f74d81ab34da85210 (diff) |
DO NOT MERGE Correctly reset cross-profile app-op
Delegate the resetting of the INTERACT_ACROSS_PROFILES app-op to
DevicePolicyManager, which knows whether it should be pre-granted and
knows to apply it equally across all users in the profile group.
Further unit tests for DevicePolicyManagerInternal will be added in
b/175440570 when we have the better infra for that.
The CrossProfileAppsServiceImpl changes look more complex than they are.
They consist of the following:
- Inclusive language changes to 'allowlist'
- Static imports of permissions to improve readability
- Previously, the setInteractAcrossProfilesAppOp method would set the
app-op for every user within the profile group of the 'calling user'.
However, given that we are now exposing this as a server-side internal
API where we need to pass in a user ID (from AppOpsService), we don't
necessarily have the guarantee that the 'calling user' is in the same
profile group. So we split it up: the client-side API and AIDL API still
set the app-op for the calling profile group, whereas the internal API
sets the app-op for every user within the profile group of the provided
user. The changes simply abstract away references to the 'calling user
ID'.
Fixes: 166561076
Bug: 175440570
Test: atest services/robotests/src/com/android/server/pm/CrossProfileAppsServiceImplRoboTest.java --verbose -c
Test: manual
Change-Id: I2181fe66022aaf6c3e6d784c0569d2f41ab66537
(cherry picked from commit d004f41188ba39afd2c75e4e7dede6b755a9d752)
Diffstat (limited to 'tools/aapt2/java/ProguardRules_test.cpp')
0 files changed, 0 insertions, 0 deletions