Merge "Remove refs of isSeparateProfileChallengeAllowed"

This commit is contained in:
Ayush Sharma
2021-08-13 15:49:11 +00:00
committed by Android (Google) Code Review
10 changed files with 14 additions and 56 deletions

View File

@@ -16,8 +16,6 @@
package com.android.settings.biometrics.fingerprint;
import static com.android.settings.core.BasePreferenceController.DISABLED_FOR_USER;
import static com.google.common.truth.Truth.assertThat;
import static org.mockito.ArgumentMatchers.anyInt;
@@ -82,27 +80,6 @@ public class FingerprintProfileStatusPreferenceControllerTest {
assertThat(mController.getUserId()).isEqualTo(FAKE_PROFILE_USER_ID);
}
@Test
public void isUserSupported_separateChallengeAllowed_true() {
when(mLockPatternUtils.isSeparateProfileChallengeAllowed(anyInt())).thenReturn(true);
assertThat(mController.isUserSupported()).isTrue();
}
@Test
public void isUserSupported_separateChallengeNotAllowed_false() {
when(mLockPatternUtils.isSeparateProfileChallengeAllowed(anyInt())).thenReturn(false);
assertThat(mController.isUserSupported()).isFalse();
}
@Test
public void getAvailabilityStatus_userNotSupported_DISABLED() {
when(mFingerprintManager.isHardwareDetected()).thenReturn(true);
when(mLockPatternUtils.isSeparateProfileChallengeAllowed(anyInt())).thenReturn(false);
assertThat(mController.getAvailabilityStatus()).isEqualTo(DISABLED_FOR_USER);
}
@Test
public void getPreferenceKey_byDefault_returnsDefaultValue() {
mController = new FingerprintProfileStatusPreferenceController(mContext);

View File

@@ -83,22 +83,6 @@ public class LockUnificationPreferenceControllerTest {
assertThat(mController.isAvailable()).isFalse();
}
@Test
public void isAvailable_separateChallengeNotAllowed_false() {
when(mLockPatternUtils.isSeparateProfileChallengeAllowed(anyInt())).thenReturn(false);
init();
assertThat(mController.isAvailable()).isFalse();
}
@Test
public void isAvailable_separateChallengeAllowed_true() {
when(mLockPatternUtils.isSeparateProfileChallengeAllowed(anyInt())).thenReturn(true);
init();
assertThat(mController.isAvailable()).isTrue();
}
@Test
public void getPreferenceKey_byDefault_returnsDefaultValue() {
init();