Merge "Fix "max failed login attempts" disclosure" into oc-dr1-dev am: 262aacd353

am: cfc3ccdb82

Change-Id: I2c73cf6895da1188027d0f8704f795490f1e7be1
This commit is contained in:
Bartosz Fabianowski
2017-07-25 10:22:09 +00:00
committed by android-build-merger
4 changed files with 23 additions and 3 deletions

View File

@@ -231,6 +231,7 @@ public final class EnterprisePrivacyFeatureProviderImplTest {
@Test
public void testGetMaximumFailedPasswordsForWipeInCurrentUser() {
when(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser()).thenReturn(null);
when(mDevicePolicyManager.getProfileOwnerAsUser(MY_USER_ID)).thenReturn(null);
when(mDevicePolicyManager.getMaximumFailedPasswordsForWipe(OWNER, MY_USER_ID))
.thenReturn(10);
@@ -238,6 +239,10 @@ public final class EnterprisePrivacyFeatureProviderImplTest {
when(mDevicePolicyManager.getProfileOwnerAsUser(MY_USER_ID)).thenReturn(OWNER);
assertThat(mProvider.getMaximumFailedPasswordsBeforeWipeInCurrentUser()).isEqualTo(10);
when(mDevicePolicyManager.getDeviceOwnerComponentOnCallingUser()).thenReturn(OWNER);
when(mDevicePolicyManager.getProfileOwnerAsUser(MY_USER_ID)).thenReturn(null);
assertThat(mProvider.getMaximumFailedPasswordsBeforeWipeInCurrentUser()).isEqualTo(10);
}
@Test