Skip to content
Commit 750185ba authored by Rubin Xu's avatar Rubin Xu
Browse files

Remove some getCallerIdentity variants in DevicePolicyManagerService

CallerIdentity object should only wrap around caller-provided and
authenticated (uid, ComponentName, PackageName) tuple. In some
instances the caller does not provide ComponentName or PackageName,
and CallerIdentity should keep track of this instead of trying to
infer the associated ComponentName or PackageName. This is because
there is one-many mapping from uid to package name, so the inference
can be imprecise as well as losing information of what the caller
supplied originally. Instead all the isXX() access control methods
should handle the case that ComponentName or PackageName might
be missing.

Bug: 167960209
Test: atest OrgOwnedProfileOwnerTest
Test: atest MixedDeviceOwnerTest
Test: atest MixedManagedProfileOwnerTest
Test: atest MixedProfileOwnerTest
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Change-Id: I8d2dfeb2e5137ea06f941855d2e5608998a86912
parent 976aa3d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment