diff options
author | Eran Messeri <eranm@google.com> | 2020-01-16 10:21:26 +0000 |
---|---|---|
committer | Eran Messeri <eranm@google.com> | 2020-03-24 14:29:39 +0000 |
commit | 957d31d1b5fab827fa3af6c990ec33355db1219a (patch) | |
tree | 57c5c3bc16536202b330951a0d0d79a8add4c1cf /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | 6ef8f5e1abc2676b0ea01f19570544274082eb5a (diff) |
Remove unnecessary parent restriction check
When checking whether provisioning of a managed profile is allowed, it
is unnecessary to check whether there's a restriction on the parent user
because the check is done from the primary user.
If the check is done from inside a managed profile, then the check
should return false because a managed profile cannot be provisioned from
within another managed profile.
The DevicePolicyManagerTest was incorrectly returning user 0 as the
"parent user" for user 0, so changed the test to return null as the
profile parent for user 0.
Bug: 147631026
Test: atest FrameworksServicesTests:DevicePolicyManagerTest
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.ManagedProfileTest#testIsProvisioningAllowed
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.DeviceOwnerTest#testIsManagedDeviceProvisioningAllowed
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.DeviceOwnerPlusProfileOwnerTest#testProvisioningNotAllowedWithDeviceOwner
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.CustomDeviceOwnerTest#testIsProvisioningAllowed
Test: atest CtsDevicePolicyManagerTestCases:com.android.cts.devicepolicy.CustomManagedProfileTest#testIsProvisioningAllowed
Change-Id: Ia62dce93265ec65b61a048c4d96f96baa4598a57
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions