Do not apply password quality to the parent
Prevent password quality set by the admin from applying on the primary user, if targeting Android S and above: * If the DPC calls setPasswordQuality on the parent profile DPM instance, throw. * If the DPC calls setPasswordQuality on the regular DPM instance, simply ignore it on the primary profile. This is guarded by the ChangeCompat framework. Note about testing: As it proved difficult to mock/fake the compatibility testing framework, the check is done via the injector, which can be easily overridden. Bug: 165573442 Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testResetPasswordWithToken com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testGetPasswordExpiration FrameworksServicesTests:DevicePolicyManagerTest ManagedProfileTest Test: atest FrameworksServicesTests:DevicePolicyManagerTest Change-Id: I59354066dafb02fe1d464fd1ddabf3969a4d0f1b
Loading
Please register or sign in to comment