Home
last modified time | relevance | path

Searched refs:PRIMARY_USER_ID (Results 1 – 19 of 19) sorted by relevance

/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/
DSyntheticPasswordTests.java144 mService.initializeSyntheticPassword(PRIMARY_USER_ID); in testFrpCredentialSyncedIfDeviceProvisioned()
154 mService.initializeSyntheticPassword(PRIMARY_USER_ID); in testEmptyFrpCredentialNotSyncedIfDeviceNotProvisioned()
164 mService.initializeSyntheticPassword(PRIMARY_USER_ID); in testNonEmptyFrpCredentialSyncedIfDeviceNotProvisioned()
166 mService.setLockCredential(newPassword("password"), nonePassword(), PRIMARY_USER_ID); in testNonEmptyFrpCredentialSyncedIfDeviceNotProvisioned()
175 initSpAndSetCredential(PRIMARY_USER_ID, password); in testChangeCredential()
176 long sid = mGateKeeperService.getSecureUserId(PRIMARY_USER_ID); in testChangeCredential()
177 mService.setLockCredential(newPassword, password, PRIMARY_USER_ID); in testChangeCredential()
179 newPassword, PRIMARY_USER_ID, 0 /* flags */).getResponseCode()); in testChangeCredential()
180 assertEquals(sid, mGateKeeperService.getSecureUserId(PRIMARY_USER_ID)); in testChangeCredential()
188 initSpAndSetCredential(PRIMARY_USER_ID, password); in testVerifyCredential()
[all …]
DWeakEscrowTokenTests.java55 mService.initializeSyntheticPassword(PRIMARY_USER_ID); in setUp()
65 long handle = mService.addWeakEscrowToken(token, PRIMARY_USER_ID, mockListener); in testWeakTokenActivatedImmediatelyIfNoUserPassword()
66 assertTrue(mService.isWeakEscrowTokenActive(handle, PRIMARY_USER_ID)); in testWeakTokenActivatedImmediatelyIfNoUserPassword()
67 assertTrue(mService.isWeakEscrowTokenValid(handle, token, PRIMARY_USER_ID)); in testWeakTokenActivatedImmediatelyIfNoUserPassword()
68 verify(mockListener).onWeakEscrowTokenActivated(handle, PRIMARY_USER_ID); in testWeakTokenActivatedImmediatelyIfNoUserPassword()
79 mService.setLockCredential(password, nonePassword(), PRIMARY_USER_ID); in testWeakTokenActivatedLaterWithUserPassword()
81 long handle = mService.addWeakEscrowToken(token, PRIMARY_USER_ID, mockListener); in testWeakTokenActivatedLaterWithUserPassword()
83 assertFalse(mService.isWeakEscrowTokenActive(handle, PRIMARY_USER_ID)); in testWeakTokenActivatedLaterWithUserPassword()
86 password, PRIMARY_USER_ID, 0 /* flags */).getResponseCode()); in testWeakTokenActivatedLaterWithUserPassword()
88 assertTrue(mService.isWeakEscrowTokenActive(handle, PRIMARY_USER_ID)); in testWeakTokenActivatedLaterWithUserPassword()
[all …]
DLockSettingsServiceTests.java78 mService.initializeSyntheticPassword(PRIMARY_USER_ID); in setUp()
84 setAndVerifyCredential(PRIMARY_USER_ID, newPassword("password")); in testSetPasswordPrimaryUser()
89 testSetCredentialFailsWithoutLockScreen(PRIMARY_USER_ID, newPassword("password")); in testSetPasswordFailsWithoutLockScreen()
94 mService.setLockCredential(newPattern("123"), nonePassword(), PRIMARY_USER_ID); in testSetTooShortPatternFails()
99 mService.setLockCredential(newPin("123"), nonePassword(), PRIMARY_USER_ID); in testSetTooShortPinFails()
104 mService.setLockCredential(newPassword("123"), nonePassword(), PRIMARY_USER_ID); in testSetTooShortPassword()
109 mService.setLockCredential(newPassword("§µ¿¶¥£"), nonePassword(), PRIMARY_USER_ID); in testSetPasswordWithInvalidChars()
114 setAndVerifyCredential(PRIMARY_USER_ID, newPattern("123456789")); in testSetPatternPrimaryUser()
119 testSetCredentialFailsWithoutLockScreen(PRIMARY_USER_ID, newPattern("123456789")); in testSetPatternFailsWithoutLockScreen()
124 testChangeCredential(PRIMARY_USER_ID, newPattern("78963214"), newPassword("asdfghjk")); in testChangePasswordPrimaryUser()
[all …]
DLockSettingsStrongAuthTest.java66 private static final int PRIMARY_USER_ID = 0; field in LockSettingsStrongAuthTest
97 mStrongAuth.scheduleNonStrongBiometricIdleTimeout(PRIMARY_USER_ID); in testScheduleNonStrongBiometricIdleTimeout()
101 .mNonStrongBiometricIdleTimeoutAlarmListener.get(PRIMARY_USER_ID); in testScheduleNonStrongBiometricIdleTimeout()
110 mStrongAuth.setIsNonStrongBiometricAllowed(false /* allowed */, PRIMARY_USER_ID); in testSetIsNonStrongBiometricAllowed_disallowed()
115 .get(PRIMARY_USER_ID, mDefaultIsNonStrongBiometricAllowed)); in testSetIsNonStrongBiometricAllowed_disallowed()
123 mStrongAuth.reportSuccessfulBiometricUnlock(false /* isStrongBiometric */, PRIMARY_USER_ID); in testReportSuccessfulBiometricUnlock_nonStrongBiometric_fallbackTimeout()
127 mStrongAuth.mNonStrongBiometricTimeoutAlarmListener.get(PRIMARY_USER_ID); in testReportSuccessfulBiometricUnlock_nonStrongBiometric_fallbackTimeout()
138 PRIMARY_USER_ID); in testRequireStrongAuth_nonStrongBiometric_fallbackTimeout()
143 verifyStrongAuthFlags(expectedFlag, PRIMARY_USER_ID); in testRequireStrongAuth_nonStrongBiometric_fallbackTimeout()
149 mStrongAuth.scheduleNonStrongBiometricIdleTimeout(PRIMARY_USER_ID); in testReportSuccessfulBiometricUnlock_nonStrongBiometric_cancelIdleTimeout()
[all …]
DLockscreenRepairModeTest.java48 mService.initializeSyntheticPassword(PRIMARY_USER_ID); in setUp()
53 mService.setLockCredential(newPin("1234"), nonePassword(), PRIMARY_USER_ID); in verifyPin_writeRepairModePW()
58 newPin("1234"), PRIMARY_USER_ID, VERIFY_FLAG_WRITE_REPAIR_MODE_PW) in verifyPin_writeRepairModePW()
66 mService.setLockCredential(newPattern("4321"), nonePassword(), PRIMARY_USER_ID); in verifyPattern_writeRepairModePW()
71 newPattern("4321"), PRIMARY_USER_ID, VERIFY_FLAG_WRITE_REPAIR_MODE_PW) in verifyPattern_writeRepairModePW()
79 mService.setLockCredential(newPassword("4321"), nonePassword(), PRIMARY_USER_ID); in verifyPassword_writeRepairModePW()
84 newPassword("4321"), PRIMARY_USER_ID, VERIFY_FLAG_WRITE_REPAIR_MODE_PW) in verifyPassword_writeRepairModePW()
92 mService.setLockCredential(newPin("1234"), nonePassword(), PRIMARY_USER_ID); in verifyCredential_writeRepairModePW_repairModeActive()
98 newPin("1234"), PRIMARY_USER_ID, VERIFY_FLAG_WRITE_REPAIR_MODE_PW) in verifyCredential_writeRepairModePW_repairModeActive()
105 mService.setLockCredential(newPin("1234"), nonePassword(), PRIMARY_USER_ID); in deleteRepairModePersistentData()
[all …]
DLockscreenFrpTest.java58 mService.initializeSyntheticPassword(PRIMARY_USER_ID); in setUp()
63 mService.setLockCredential(newPin("1234"), nonePassword(), PRIMARY_USER_ID); in testFrpCredential_setPin()
73 mService.setLockCredential(newPattern("4321"), nonePassword(), PRIMARY_USER_ID); in testFrpCredential_setPattern()
83 mService.setLockCredential(newPassword("4321"), nonePassword(), PRIMARY_USER_ID); in testFrpCredential_setPassword()
93 mService.setLockCredential(newPassword("1234"), nonePassword(), PRIMARY_USER_ID); in testFrpCredential_changeCredential()
94 mService.setLockCredential(newPattern("5678"), newPassword("1234"), PRIMARY_USER_ID); in testFrpCredential_changeCredential()
104 mService.setLockCredential(newPassword("1234"), nonePassword(), PRIMARY_USER_ID); in testFrpCredential_removeCredential()
108 mService.setLockCredential(nonePassword(), newPassword("1234"), PRIMARY_USER_ID); in testFrpCredential_removeCredential()
114 mService.setLockCredential(newPin("1234"), nonePassword(), PRIMARY_USER_ID); in testFrpCredential_cannotVerifyAfterProvsioning()
124 mService.setLockCredential(newPin("1234"), nonePassword(), PRIMARY_USER_ID); in testFrpCredential_legacyPinTypePersistentData()
[all …]
DRebootEscrowManagerTests.java91 protected static final int PRIMARY_USER_ID = 0; field in RebootEscrowManagerTests
338 users.add(createUser(PRIMARY_USER_ID, "primary", FLAG_PRIMARY, PRIMARY_USER_ID)); in setUp_baseServices()
339 users.add(createUser(WORK_PROFILE_USER_ID, "work", FLAG_PROFILE, PRIMARY_USER_ID)); in setUp_baseServices()
345 when(mCallbacks.isUserSecure(PRIMARY_USER_ID)).thenReturn(true); in setUp_baseServices()
404 callToRebootEscrowIfNeededAndWait(PRIMARY_USER_ID); in prepareRebootEscrow_Success()
416 callToRebootEscrowIfNeededAndWait(PRIMARY_USER_ID); in prepareRebootEscrowServerBased_Success()
426 callToRebootEscrowIfNeededAndWait(PRIMARY_USER_ID); in prepareRebootEscrow_ClearCredentials_Success()
450 callToRebootEscrowIfNeededAndWait(PRIMARY_USER_ID); in armService_Success()
462 assertTrue(mStorage.hasRebootEscrow(PRIMARY_USER_ID)); in armService_Success()
474 callToRebootEscrowIfNeededAndWait(PRIMARY_USER_ID); in armServiceServerBased_Success()
[all …]
DBaseLockSettingsServiceTests.java78 protected static final int PRIMARY_USER_ID = 0; field in BaseLockSettingsServiceTests
178 PRIMARY_USER_ID, in setUp_baseServices()
199 when(mUserManager.getUserInfo(eq(PRIMARY_USER_ID))).thenReturn(mPrimaryUserInfo); in setUp_baseServices()
200 when(mUserManagerInternal.getUserInfo(eq(PRIMARY_USER_ID))).thenReturn(mPrimaryUserInfo); in setUp_baseServices()
234 mockBiometricsHardwareFingerprintsAndTemplates(PRIMARY_USER_ID); in setUp_baseServices()
280 userInfo.profileGroupId = PRIMARY_USER_ID; in installChildProfile()
/frameworks/base/services/tests/servicestests/src/com/android/server/adaptiveauth/
DAdaptiveAuthServiceTest.java78 private static final int PRIMARY_USER_ID = 0; field in AdaptiveAuthServiceTest
137 .thenReturn(PRIMARY_USER_ID); in setUp()
150 mLockSettingsStateListenerCaptor.getValue().onAuthenticationSucceeded(PRIMARY_USER_ID); in testReportAuthAttempt_primaryAuthSucceeded()
154 PRIMARY_USER_ID); in testReportAuthAttempt_primaryAuthSucceeded()
160 mLockSettingsStateListenerCaptor.getValue().onAuthenticationFailed(PRIMARY_USER_ID); in testReportAuthAttempt_primaryAuthFailed_once()
163 verifyNotLockDevice(1 /* expectedCntFailedAttempts */, PRIMARY_USER_ID); in testReportAuthAttempt_primaryAuthFailed_once()
170 when(mKeyguardManager.isDeviceLocked(PRIMARY_USER_ID)).thenReturn(true); in testReportAuthAttempt_primaryAuthFailed_multiple_deviceCurrentlyLocked()
174 mLockSettingsStateListenerCaptor.getValue().onAuthenticationFailed(PRIMARY_USER_ID); in testReportAuthAttempt_primaryAuthFailed_multiple_deviceCurrentlyLocked()
179 PRIMARY_USER_ID); in testReportAuthAttempt_primaryAuthFailed_multiple_deviceCurrentlyLocked()
186 when(mKeyguardManager.isDeviceLocked(PRIMARY_USER_ID)).thenReturn(false); in testReportAuthAttempt_primaryAuthFailed_multiple_deviceCurrentlyNotLocked()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/repository/
DBiometricSettingsRepositoryTest.kt162 enrollmentChange(UNDER_DISPLAY_FINGERPRINT, PRIMARY_USER_ID, true) in fingerprintEnrollmentChange()
169 enrollmentChange(UNDER_DISPLAY_FINGERPRINT, PRIMARY_USER_ID, false) in fingerprintEnrollmentChange()
183 enrollmentChange(UNDER_DISPLAY_FINGERPRINT, PRIMARY_USER_ID, true) in fingerprintEnabledStateChange()
207 onStrongAuthChanged(STRONG_AUTH_NOT_REQUIRED, PRIMARY_USER_ID) in strongBiometricAllowedChange()
210 onStrongAuthChanged(STRONG_AUTH_REQUIRED_AFTER_BOOT, PRIMARY_USER_ID) in strongBiometricAllowedChange()
226 onStrongAuthChanged(STRONG_AUTH_NOT_REQUIRED, PRIMARY_USER_ID) in convenienceBiometricAllowedChange()
227 onNonStrongAuthChanged(true, PRIMARY_USER_ID) in convenienceBiometricAllowedChange()
234 onNonStrongAuthChanged(false, PRIMARY_USER_ID) in convenienceBiometricAllowedChange()
269 onNonStrongAuthChanged(true, PRIMARY_USER_ID) in whenStrongAuthRequiredAfterBoot_nonStrongBiometricNotAllowed()
292 onStrongAuthChanged(STRONG_AUTH_NOT_REQUIRED, PRIMARY_USER_ID) in whenStrongBiometricAuthIsNotAllowed_nonStrongBiometrics_alsoNotAllowed()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/webkit/
DTestSystemImpl.java43 public static final int PRIMARY_USER_ID = 0; field in TestSystemImpl
50 mUsers.add(PRIMARY_USER_ID); in TestSystemImpl()
128 PackageInfo ret = userPackages.get(PRIMARY_USER_ID); in getPackageInfoForProvider()
154 setPackageInfoForUser(PRIMARY_USER_ID, pi); in setPackageInfo()
171 mPackages.get(packageName).remove(PRIMARY_USER_ID); in removePackageInfo()
180 pi = userPackages.get(PRIMARY_USER_ID); in getFactoryPackageVersion()
DWebViewUpdateServiceTest.java116 setEnabledAndValidPackageInfosForUser(TestSystemImpl.PRIMARY_USER_ID, providers); in setEnabledAndValidPackageInfos()
389 WebViewUpdateService.PACKAGE_ADDED, TestSystemImpl.PRIMARY_USER_ID); in testFailListingEmptyWebviewPackages()
398 WebViewUpdateService.PACKAGE_REMOVED, TestSystemImpl.PRIMARY_USER_ID); in testFailListingEmptyWebviewPackages()
428 WebViewUpdateService.PACKAGE_ADDED_REPLACED, TestSystemImpl.PRIMARY_USER_ID); in testFailListingInvalidWebviewPackage()
529 TestSystemImpl.PRIMARY_USER_ID); in checkChangingProviderDuringRelroCreation()
541 TestSystemImpl.PRIMARY_USER_ID); in checkChangingProviderDuringRelroCreation()
580 testPackage, WebViewUpdateService.PACKAGE_CHANGED, TestSystemImpl.PRIMARY_USER_ID); in testFallbackPackageEnabling()
617 WebViewUpdateService.PACKAGE_ADDED_REPLACED, TestSystemImpl.PRIMARY_USER_ID); in testInstallingPrimaryPackage()
662 int userIdToChangePackageFor = multiUser ? secondaryUserId : TestSystemImpl.PRIMARY_USER_ID; in checkRemovingSecondarySelectsPrimary()
667 setEnabledAndValidPackageInfosForUser(TestSystemImpl.PRIMARY_USER_ID, packages); in checkRemovingSecondarySelectsPrimary()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/dreams/homecontrols/
DHomeControlsComponentInteractorTest.kt197 UserHandle.of(PRIMARY_USER_ID), in testMonitoringUpdatesAndRestart()
210 UserHandle.of(PRIMARY_USER_ID), in testMonitoringUpdatesAndRestart()
241 UserHandle.of(PRIMARY_USER_ID), in testMonitoringUpdatesAndRestart_dreamEndsAfterDelay()
254 UserHandle.of(PRIMARY_USER_ID), in testMonitoringUpdatesAndRestart_dreamEndsAfterDelay()
330 private const val PRIMARY_USER_ID = 0 constant
333 /* id= */ PRIMARY_USER_ID,
DHomeControlsDreamStartableTest.kt183 private const val PRIMARY_USER_ID = 0 constant
186 /* id= */ PRIMARY_USER_ID,
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/panels/data/
DQSPreferencesRepositoryTest.kt124 private const val PRIMARY_USER_ID = 0 constant
125 private val PRIMARY_USER = UserInfo(PRIMARY_USER_ID, "user 0", UserInfo.FLAG_MAIN)
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/domain/interactor/
DBouncerMessageInteractorTest.kt87 whenever(securityModel.getSecurityMode(PRIMARY_USER_ID)).thenReturn(PIN) in <lambda>()
139 whenever(securityModel.getSecurityMode(PRIMARY_USER_ID)).thenReturn(Pattern) in <lambda>()
561 AuthenticationFlags(PRIMARY_USER_ID, flag) in <lambda>()
577 private const val PRIMARY_USER_ID = 0 in <lambda>() constant
580 /* id= */ PRIMARY_USER_ID, in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/
DSecurityControllerTest.java166 final int PRIMARY_USER_ID = 0; in testWorkAccount() local
168 List<UserInfo> profiles = Arrays.asList(new UserInfo(PRIMARY_USER_ID, "Primary", in testWorkAccount()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/bouncer/ui/viewmodel/
DBouncerMessageViewModelTest.kt424 AuthenticationFlags(userId = PRIMARY_USER_ID, flag = flag) in <lambda>()
447 private const val PRIMARY_USER_ID = 0 in <lambda>() constant
450 /* id= */ PRIMARY_USER_ID, in <lambda>()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/qs/tiles/
DQuickAccessWalletTileTest.java96 private static final int PRIMARY_USER_ID = 0; field in QuickAccessWalletTileTest
214 when(mHost.getUserId()).thenReturn(PRIMARY_USER_ID); in testIsAvailable_nfcUnavailableWalletAvailable()