Home
last modified time | relevance | path

Searched refs:USER_ID (Results 1 – 25 of 147) sorted by relevance

123456

/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DUserVisibilityMediatorVisibleBackgroundUserTestCase.java51 onVisible(USER_ID)); in testStartFgUser_onDefaultDisplay()
53 int result = mMediator.assignUserToDisplayOnStart(USER_ID, USER_ID, FG, in testStartFgUser_onDefaultDisplay()
56 expectUserCannotBeUnassignedFromDisplay(USER_ID, DEFAULT_DISPLAY); in testStartFgUser_onDefaultDisplay()
58 expectUserIsVisible(USER_ID); in testStartFgUser_onDefaultDisplay()
59 expectUserIsVisibleOnDisplay(USER_ID, DEFAULT_DISPLAY); in testStartFgUser_onDefaultDisplay()
60 expectUserIsNotVisibleOnDisplay(USER_ID, INVALID_DISPLAY); in testStartFgUser_onDefaultDisplay()
61 expectUserIsNotVisibleOnDisplay(USER_ID, SECONDARY_DISPLAY_ID); in testStartFgUser_onDefaultDisplay()
62 expectVisibleUsers(USER_ID); in testStartFgUser_onDefaultDisplay()
64 expectDisplayAssignedToUser(USER_ID, DEFAULT_DISPLAY); in testStartFgUser_onDefaultDisplay()
65 expectUserAssignedToDisplay(DEFAULT_DISPLAY, USER_ID); in testStartFgUser_onDefaultDisplay()
[all …]
DUserVisibilityMediatorSUSDTest.java55 onVisible(USER_ID)); in testStartFgUser_onDefaultDisplay()
57 int result = mMediator.assignUserToDisplayOnStart(USER_ID, USER_ID, FG, in testStartFgUser_onDefaultDisplay()
60 expectUserCannotBeUnassignedFromDisplay(USER_ID, DEFAULT_DISPLAY); in testStartFgUser_onDefaultDisplay()
62 expectUserIsVisible(USER_ID); in testStartFgUser_onDefaultDisplay()
63 expectUserIsNotVisibleOnDisplay(USER_ID, INVALID_DISPLAY); in testStartFgUser_onDefaultDisplay()
64 expectUserIsVisibleOnDisplay(USER_ID, DEFAULT_DISPLAY); in testStartFgUser_onDefaultDisplay()
65 expectUserIsVisibleOnDisplay(USER_ID, SECONDARY_DISPLAY_ID); in testStartFgUser_onDefaultDisplay()
66 expectVisibleUsers(USER_ID); in testStartFgUser_onDefaultDisplay()
68 expectDisplayAssignedToUser(USER_ID, DEFAULT_DISPLAY); in testStartFgUser_onDefaultDisplay()
69 expectUserAssignedToDisplay(DEFAULT_DISPLAY, USER_ID); in testStartFgUser_onDefaultDisplay()
[all …]
DUserManagerServiceTest.java105 private static final int USER_ID = 600; field in UserManagerServiceTest
226 mockCurrentAndTargetUser(USER_ID, OTHER_USER_ID); in testGetCurrentAndTargetUserIds()
230 .isEqualTo(new Pair<>(USER_ID, OTHER_USER_ID)); in testGetCurrentAndTargetUserIds()
235 mockCurrentUser(USER_ID); in testGetCurrentUserId()
238 .isEqualTo(USER_ID); in testGetCurrentUserId()
243 mockCurrentUser(USER_ID); in testIsCurrentUserOrRunningProfileOfCurrentUser_currentUser()
245 assertWithMessage("isCurrentUserOrRunningProfileOfCurrentUser(%s)", USER_ID) in testIsCurrentUserOrRunningProfileOfCurrentUser_currentUser()
246 .that(mUms.isCurrentUserOrRunningProfileOfCurrentUser(USER_ID)).isTrue(); in testIsCurrentUserOrRunningProfileOfCurrentUser_currentUser()
253 assertWithMessage("isCurrentUserOrRunningProfileOfCurrentUser(%s)", USER_ID) in testIsCurrentUserOrRunningProfileOfCurrentUser_notCurrentUser()
254 .that(mUms.isCurrentUserOrRunningProfileOfCurrentUser(USER_ID)).isFalse(); in testIsCurrentUserOrRunningProfileOfCurrentUser_notCurrentUser()
[all …]
DUserVisibilityMediatorTestCase.java74 protected static final int USER_ID = 600; field in UserVisibilityMediatorTestCase
151 .assignUserToDisplayOnStart(USER_NULL, USER_ID, FG, DEFAULT_DISPLAY, false)); in testAssignUserToDisplayOnStart_invalidUserIds()
153 .assignUserToDisplayOnStart(USER_ALL, USER_ID, FG, DEFAULT_DISPLAY, false)); in testAssignUserToDisplayOnStart_invalidUserIds()
155 .assignUserToDisplayOnStart(USER_CURRENT, USER_ID, FG, DEFAULT_DISPLAY, false)); in testAssignUserToDisplayOnStart_invalidUserIds()
157 .assignUserToDisplayOnStart(USER_CURRENT_OR_SELF, USER_ID, FG, DEFAULT_DISPLAY, in testAssignUserToDisplayOnStart_invalidUserIds()
164 .assignUserToDisplayOnStart(USER_ID, USER_ID, 666, DEFAULT_DISPLAY, false)); in testAssignUserToDisplayOnStart_invalidUserStartMode()
171 int result = mMediator.assignUserToDisplayOnStart(USER_ID, USER_ID, FG, in testStartFgUser_onSecondaryDisplay()
175 expectUserIsNotVisibleAtAll(USER_ID); in testStartFgUser_onSecondaryDisplay()
176 expectNoDisplayAssignedToUser(USER_ID); in testStartFgUser_onSecondaryDisplay()
186 int result = mMediator.assignUserToDisplayOnStart(USER_ID, USER_ID, BG, DEFAULT_DISPLAY, in testStartBgUser_onDefaultDisplay()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/usage/
DAppIdleHistoryTests.java49 private static final int USER_ID = 0; field in AppIdleHistoryTests
72 aih.writeAppIdleTimes(USER_ID, /* elapsedRealtime= */ 2000); in testFilesCreation()
74 assertTrue(new File(new File(mStorageDir, "users/" + USER_ID), in testFilesCreation()
102 aih.setAppStandbyBucket(PACKAGE_1, USER_ID, 1000, STANDBY_BUCKET_ACTIVE, in testBuckets()
105 assertFalse(aih.isIdle(PACKAGE_1, USER_ID, 2000)); in testBuckets()
107 aih.setAppStandbyBucket(PACKAGE_2, USER_ID, 2000, STANDBY_BUCKET_ACTIVE, in testBuckets()
109 aih.setAppStandbyBucket(PACKAGE_3, USER_ID, 2500, STANDBY_BUCKET_RESTRICTED, in testBuckets()
112 aih.setAppStandbyBucket(PACKAGE_4, USER_ID, 2750, STANDBY_BUCKET_RESTRICTED, in testBuckets()
114 aih.setAppStandbyBucket(PACKAGE_1, USER_ID, 3000, STANDBY_BUCKET_RARE, in testBuckets()
117 assertEquals(aih.getAppStandbyBucket(PACKAGE_1, USER_ID, 3000), STANDBY_BUCKET_RARE); in testBuckets()
[all …]
DAppStandbyControllerTests.java154 private static final int USER_ID = 0; field in AppStandbyControllerTests
244 int[] mRunningUsers = new int[] {USER_ID};
520 controller.initializeDefaultsForSystemApps(USER_ID); in setupController()
526 controller.checkIdleStates(USER_ID); in setupController()
528 controller.getAppStandbyBucket(PACKAGE_1, USER_ID, in setupController()
537 final int[] userIds = new int[] { USER_ID, USER_ID2, USER_ID3 }; in setupInitialUsageHistory()
665 mController.setAppStandbyBucket(PACKAGE_1, USER_ID, STANDBY_BUCKET_RARE, in testIsAppIdle_Charging()
668 assertTrue(mController.isAppIdleFiltered(PACKAGE_1, UID_1, USER_ID, 0)); in testIsAppIdle_Charging()
669 assertTrue(mController.isAppIdleFiltered(PACKAGE_1, UID_1, USER_ID, false)); in testIsAppIdle_Charging()
677 assertFalse(mController.isAppIdleFiltered(PACKAGE_1, UID_1, USER_ID, 0)); in testIsAppIdle_Charging()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/
DMultiRateLimiterTest.java34 private static final int USER_ID = 1; field in MultiRateLimiterTest
67 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in testSingleRateLimit_belowLimit_isWithinQuota()
68 multiRateLimiter.noteEvent(USER_ID, PACKAGE_NAME_1, TAG); in testSingleRateLimit_belowLimit_isWithinQuota()
71 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in testSingleRateLimit_belowLimit_isWithinQuota()
72 multiRateLimiter.noteEvent(USER_ID, PACKAGE_NAME_1, TAG); in testSingleRateLimit_belowLimit_isWithinQuota()
75 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isTrue(); in testSingleRateLimit_belowLimit_isWithinQuota()
85 multiRateLimiter.noteEvent(USER_ID, PACKAGE_NAME_1, TAG); in testSingleRateLimit_aboveLimit_isNotWithinQuota()
88 multiRateLimiter.noteEvent(USER_ID, PACKAGE_NAME_1, TAG); in testSingleRateLimit_aboveLimit_isNotWithinQuota()
91 multiRateLimiter.noteEvent(USER_ID, PACKAGE_NAME_1, TAG); in testSingleRateLimit_aboveLimit_isNotWithinQuota()
95 assertThat(multiRateLimiter.isWithinQuota(USER_ID, PACKAGE_NAME_1, TAG)).isFalse(); in testSingleRateLimit_aboveLimit_isNotWithinQuota()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/statusbar/
DTileRequestTrackerTest.java52 private static final int USER_ID = 0; field in TileRequestTrackerTest
55 private static final int USER_UID = UserHandle.getUid(USER_ID, APP_UID);
89 assertFalse(mTileRequestTracker.shouldBeDenied(USER_ID, TEST_COMPONENT)); in testNoDenialsFromStart()
91 assertFalse(mTileRequestTracker.shouldBeDenied(USER_ID, TEST_COMPONENT_OTHER)); in testNoDenialsFromStart()
98 mTileRequestTracker.addDenial(USER_ID, TEST_COMPONENT); in testNoDenialBeforeMax()
101 assertFalse(mTileRequestTracker.shouldBeDenied(USER_ID, TEST_COMPONENT)); in testNoDenialBeforeMax()
107 mTileRequestTracker.addDenial(USER_ID, TEST_COMPONENT); in testDenialOnMax()
109 assertTrue(mTileRequestTracker.shouldBeDenied(USER_ID, TEST_COMPONENT)); in testDenialOnMax()
115 mTileRequestTracker.addDenial(USER_ID, TEST_COMPONENT); in testDenialPerUser()
124 mTileRequestTracker.addDenial(USER_ID, TEST_COMPONENT); in testDenialPerComponent()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/biometrics/domain/interactor/
DCredentialInteractorImplTest.kt35 private const val USER_ID = 22 constant
60 whenever(userManager.getUserInfo(eq(USER_ID))).thenReturn(UserInfo(USER_ID, "", 0)) in setup()
61 whenever(devicePolicyManager.getProfileWithMinimumFailedPasswordsForWipe(eq(USER_ID))) in setup()
62 .thenReturn(USER_ID) in setup()
77 whenever(lockPatternUtils.isVisiblePatternEnabled(eq(USER_ID))).thenReturn(value) in testStealthMode()
79 assertThat(interactor.isStealthModeActive(USER_ID)).isEqualTo(!value) in testStealthMode()
86 whenever(userManager.getCredentialOwnerProfile(eq(USER_ID))).thenReturn(value) in testCredentialOwner()
88 assertThat(interactor.getCredentialOwnerOrSelfId(USER_ID)).isEqualTo(value) in testCredentialOwner()
95 whenever(userManager.getProfileParent(eq(USER_ID))) in testParentProfile()
98 assertThat(interactor.getParentProfileIdOrSelfId(USER_ID)).isEqualTo(value) in testParentProfile()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/inputmethod/domain/interactor/
DInputMethodInteractorTest.kt46 fakeInputMethodRepository.setEnabledInputMethods(USER_ID) in hasMultipleEnabledImesOrSubtypes_noImes_returnsFalse()
48 assertThat(underTest.hasMultipleEnabledImesOrSubtypes(USER_ID)).isFalse() in hasMultipleEnabledImesOrSubtypes_noImes_returnsFalse()
55 USER_ID, in hasMultipleEnabledImesOrSubtypes_noMatches_returnsFalse()
60 assertThat(underTest.hasMultipleEnabledImesOrSubtypes(USER_ID)).isFalse() in hasMultipleEnabledImesOrSubtypes_noMatches_returnsFalse()
67 USER_ID, in hasMultipleEnabledImesOrSubtypes_oneMatch_returnsFalse()
71 assertThat(underTest.hasMultipleEnabledImesOrSubtypes(USER_ID)).isFalse() in hasMultipleEnabledImesOrSubtypes_oneMatch_returnsFalse()
78 USER_ID, in hasMultipleEnabledImesOrSubtypes_twoMatches_returnsTrue()
83 assertThat(underTest.hasMultipleEnabledImesOrSubtypes(USER_ID)).isTrue() in hasMultipleEnabledImesOrSubtypes_twoMatches_returnsTrue()
90 USER_ID, in hasMultipleEnabledImesOrSubtypes_oneWithNonAux_returnsFalse()
94 assertThat(underTest.hasMultipleEnabledImesOrSubtypes(USER_ID)).isFalse() in hasMultipleEnabledImesOrSubtypes_oneWithNonAux_returnsFalse()
[all …]
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/qs/pipeline/domain/autoaddable/
DA11yShortcutAutoAddableTest.kt49 val signal by collectLastValue(underTest.autoAddSignal(USER_ID)) in settingNotSet_noSignal()
57 val signal by collectLastValue(underTest.autoAddSignal(USER_ID)) in settingSetWithTarget_addSignal()
61 USER_ID, in settingSetWithTarget_addSignal()
71 val signal by collectLastValue(flow = underTest.autoAddSignal(USER_ID)) in settingSetWithoutTarget_removeSignal()
75 USER_ID, in settingSetWithoutTarget_removeSignal()
85 val signal by collectLastValue(underTest.autoAddSignal(USER_ID)) in settingSetWithMultipleComponents_containsTarget_addSignal()
89 USER_ID, in settingSetWithMultipleComponents_containsTarget_addSignal()
99 val signal by collectLastValue(underTest.autoAddSignal(USER_ID)) in settingSetWithMultipleComponents_doesNotContainTarget_removeSignal()
103 USER_ID, in settingSetWithMultipleComponents_doesNotContainTarget_removeSignal()
113 val signals by collectValues(underTest.autoAddSignal(USER_ID)) in multipleChangesWithTarget_onlyOneAddSignal()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
DCleanupManagerTest.java44 private static final int USER_ID = 10; field in CleanupManagerTest
67 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_unknownUser_storesInDb()
72 mManager.registerRecoveryAgent(USER_ID, UID); in registerRecoveryAgent_unknownUser_storesInDb()
75 verify(mDatabase).setUserSerialNumber(USER_ID, USER_SERIAL_NUMBER); in registerRecoveryAgent_unknownUser_storesInDb()
83 when(mUserManager.getSerialNumberForUser(eq(UserHandle.of(USER_ID)))) in registerRecoveryAgent_registersSameUser_doesntChangeDb()
86 mManager.registerRecoveryAgent(USER_ID, UID); in registerRecoveryAgent_registersSameUser_doesntChangeDb()
87 mManager.registerRecoveryAgent(USER_ID, UID); // ignored. in registerRecoveryAgent_registersSameUser_doesntChangeDb()
89 verify(mDatabase, times(1)).setUserSerialNumber(USER_ID, USER_SERIAL_NUMBER); in registerRecoveryAgent_registersSameUser_doesntChangeDb()
95 knownSerialNumbers.put(USER_ID, USER_SERIAL_NUMBER); in verifyKnownUsers_newSerialNumber_deletesData()
99 when(mDatabase.getRecoveryAgents(USER_ID)).thenReturn(recoveryAgents); in verifyKnownUsers_newSerialNumber_deletesData()
[all …]
DRemoteLockscreenValidationSessionStorageTest.java36 private static final int USER_ID = 0; field in RemoteLockscreenValidationSessionStorageTest
48 assertThat(mStorage.get(USER_ID)).isNull(); in get_noStoredSessions_returnsNull()
53 mStorage.startSession(USER_ID); in startSession()
55 assertThat(mStorage.get(USER_ID)).isNotNull(); in startSession()
61 mStorage.startSession(USER_ID); in finishSession_removesSessionFromStorage()
63 mStorage.finishSession(USER_ID); in finishSession_removesSessionFromStorage()
65 assertThat(mStorage.get(USER_ID)).isNull(); in finishSession_removesSessionFromStorage()
73 USER_ID, mStorage.new LockscreenVerificationSession( in getLockscreenValidationCleanupTask()
81 assertThat(mStorage.get(USER_ID)).isNull(); in getLockscreenValidationCleanupTask()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/devicepolicy/
DOwnerShellDataTest.java33 private static final int USER_ID = 007; field in OwnerShellDataTest
40 () -> OwnerShellData.forDeviceOwner(USER_ID, /* admin= */ null)); in testForDeviceOwner_noAdmin()
51 OwnerShellData dto = OwnerShellData.forDeviceOwner(USER_ID, ADMIN); in testForDeviceOwner()
53 assertWithMessage("dto(%s).userId", dto).that(dto.userId).isEqualTo(USER_ID); in testForDeviceOwner()
67 () -> OwnerShellData.forUserProfileOwner(USER_ID, /* admin= */ null)); in testForUserProfileOwner_noAdmin()
78 OwnerShellData dto = OwnerShellData.forUserProfileOwner(USER_ID, ADMIN); in testForUserProfileOwner()
80 assertWithMessage("dto(%s).userId", dto).that(dto.userId).isEqualTo(USER_ID); in testForUserProfileOwner()
94 () -> OwnerShellData.forManagedProfileOwner(USER_ID, PARENT_USER_ID, null)); in testForManagedProfileOwner_noAdmin()
106 () -> OwnerShellData.forManagedProfileOwner(USER_ID, USER_NULL, ADMIN)); in testForManagedProfileOwner_invalidParent()
112 () -> OwnerShellData.forManagedProfileOwner(USER_ID, USER_ID, ADMIN)); in testForManagedProfileOwner_parentOfItself()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/biometrics/data/repository/
DFaceSettingsRepositoryImplTest.kt46 private const val USER_ID = 8 constant
69 val userRepo = repository.forUser(USER_ID) in createsOneRepositoryPerUser()
71 assertThat(userRepo.userId).isEqualTo(USER_ID) in createsOneRepositoryPerUser()
73 assertThat(repository.forUser(USER_ID)).isSameInstanceAs(userRepo) in createsOneRepositoryPerUser()
74 assertThat(repository.forUser(USER_ID + 1)).isNotSameInstanceAs(userRepo) in createsOneRepositoryPerUser()
80 val userRepo = repository.forUser(USER_ID) in startsRepoImmediatelyWithAllSettingKeys()
89 eq(USER_ID) in startsRepoImmediatelyWithAllSettingKeys()
98 val userRepo = repository.forUser(USER_ID) in <lambda>()
114 eq(USER_ID) in <lambda>()
127 whenever(getIntForUser(eq(key), anyInt(), eq(USER_ID))).thenReturn(value) in SecureSettings()
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/hidl/
DHidlToAidlSensorAdapterTest.java74 private static final int USER_ID = 2; field in HidlToAidlSensorAdapterTest
143 mHidlToAidlSensorAdapter.handleUserChanged(USER_ID); in setUp()
153 USER_ID, TAG, SENSOR_ID, mLogger, mBiometricContext, HAT, in lockoutTimedResetViaClient()
162 .getLockoutModeForUser(USER_ID)).isEqualTo(LockoutTracker.LOCKOUT_NONE); in lockoutTimedResetViaClient()
163 verify(mAuthSessionCoordinator).resetLockoutFor(eq(USER_ID), anyInt(), anyLong()); in lockoutTimedResetViaClient()
176 .getLockoutModeForUser(USER_ID)).isEqualTo(LockoutTracker.LOCKOUT_NONE); in lockoutTimedResetViaCallback()
177 verify(mAuthSessionCoordinator).resetLockoutFor(eq(USER_ID), anyInt(), anyLong()); in lockoutTimedResetViaCallback()
190 .getLockoutModeForUser(USER_ID)).isEqualTo(LockoutTracker.LOCKOUT_NONE); in lockoutPermanentResetViaCallback()
191 verify(mAuthSessionCoordinator).resetLockoutFor(eq(USER_ID), anyInt(), anyLong()); in lockoutPermanentResetViaCallback()
201 USER_ID, TAG, SENSOR_ID, mLogger, mBiometricContext, HAT, in lockoutPermanentResetViaClient()
[all …]
/frameworks/base/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/scaffold/
DRestrictedMenuItemTest.kt53 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) in <lambda>()
62 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) in <lambda>()
71 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) in <lambda>()
81 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
91 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
102 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
112 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
123 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
133 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
145 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/aidl/
DSensorTest.java65 private static final int USER_ID = 2; field in SensorTest
113 () -> USER_ID, in setUp()
115 mHalCallback = new AidlResponseHandler(mContext, mScheduler, SENSOR_ID, USER_ID, in setUp()
126 mLockoutCache.setLockoutModeForUser(USER_ID, LockoutTracker.LOCKOUT_TIMED); in halSessionCallback_respondsToResetLockout()
129 () -> new AidlSession(1, mSession, USER_ID, mHalCallback), in halSessionCallback_respondsToResetLockout()
130 USER_ID, TAG, SENSOR_ID, mBiometricLogger, mBiometricContext, in halSessionCallback_respondsToResetLockout()
139 mLockoutCache.setLockoutModeForUser(USER_ID, LockoutTracker.LOCKOUT_TIMED); in halSessionCallback_respondsToUnprovokedResetLockout()
158 assertNull(sensor.getSessionForUser(USER_ID)); in onBinderDied_noErrorOnNullClient()
165 when(mCurrentSession.getUserId()).thenReturn(USER_ID); in onBinderDied_cancelNonInterruptableClient()
166 when(mClientMonitor.getTargetUserId()).thenReturn(USER_ID); in onBinderDied_cancelNonInterruptableClient()
[all …]
/frameworks/base/services/tests/displayservicetests/src/com/android/server/display/brightness/clamper/
DBrightnessLowLuxModifierTest.kt33 private const val USER_ID = UserHandle.USER_CURRENT constant
97 Settings.Secure.EVEN_DIMMER_ACTIVATED, 0, USER_ID) in testSettingOffDisablesModifier()
115 Settings.Secure.EVEN_DIMMER_ACTIVATED, 1, USER_ID) in testLuxRestrictsBrightnessRange()
117 Settings.Secure.EVEN_DIMMER_MIN_NITS, 0.1f, USER_ID) in testLuxRestrictsBrightnessRange()
133 Settings.Secure.EVEN_DIMMER_ACTIVATED, 1, USER_ID) in testUserRestrictsBrightnessRange()
135 Settings.Secure.EVEN_DIMMER_MIN_NITS, 10.0f, USER_ID) in testUserRestrictsBrightnessRange()
151 Settings.Secure.EVEN_DIMMER_ACTIVATED, 1, USER_ID) // on in testOnToOff()
153 Settings.Secure.EVEN_DIMMER_MIN_NITS, 1.0f, USER_ID) in testOnToOff()
164 Settings.Secure.EVEN_DIMMER_ACTIVATED, 0, USER_ID) // off in testOnToOff()
179 Settings.Secure.EVEN_DIMMER_ACTIVATED, 0, USER_ID) // off in testOffToOn()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/contentcapture/
DContentCaptureManagerServiceTest.java73 private static final int USER_ID = 1234; field in ContentCaptureManagerServiceTest
275 USER_ID, PACKAGE_NAME); in getOptions_contentCaptureDisabled_contentProtectionDisabled()
284 when(mMockContentProtectionConsentManager.isConsentGranted(USER_ID)).thenReturn(true); in getOptions_contentCaptureDisabled_contentProtectionEnabled()
291 USER_ID, PACKAGE_NAME); in getOptions_contentCaptureDisabled_contentProtectionEnabled()
303 USER_ID, ImmutableList.of(PACKAGE_NAME), /* components= */ null); in getOptions_contentCaptureEnabled_contentProtectionDisabled()
307 USER_ID, PACKAGE_NAME); in getOptions_contentCaptureEnabled_contentProtectionDisabled()
320 when(mMockContentProtectionConsentManager.isConsentGranted(USER_ID)).thenReturn(true); in getOptions_contentCaptureEnabled_contentProtectionEnabled()
325 USER_ID, ImmutableList.of(PACKAGE_NAME), /* components= */ null); in getOptions_contentCaptureEnabled_contentProtectionEnabled()
329 USER_ID, PACKAGE_NAME); in getOptions_contentCaptureEnabled_contentProtectionEnabled()
342 USER_ID, PACKAGE_NAME); in isWhitelisted_packageName_contentCaptureDisabled_contentProtectionDisabled()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/screenshot/
DRequestProcessorTest.kt37 private const val USER_ID = 1 constant
50 policy.setManagedProfile(USER_ID, false) in <lambda>()
53 DisplayContentInfo(component, bounds, UserHandle.of(USER_ID), TASK_ID) in <lambda>()
75 policy.setManagedProfile(USER_ID, true) in <lambda>()
78 DisplayContentInfo(component, bounds, UserHandle.of(USER_ID), TASK_ID) in <lambda>()
102 policy.setManagedProfile(USER_ID, true) in testFullScreenshot_managedProfile_nullBitmap()
105 DisplayContentInfo(component, bounds, UserHandle.of(USER_ID), TASK_ID) in testFullScreenshot_managedProfile_nullBitmap()
122 policy.setManagedProfile(USER_ID, false) in <lambda>()
130 .setUserId(USER_ID) in <lambda>()
148 policy.setManagedProfile(USER_ID, true) in <lambda>()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/sensors/fingerprint/aidl/
DSensorTest.java67 private static final int USER_ID = 2; field in SensorTest
120 () -> USER_ID, in setUp()
122 mHalCallback = new AidlResponseHandler(mContext, mScheduler, SENSOR_ID, USER_ID, in setUp()
133 mLockoutCache.setLockoutModeForUser(USER_ID, LockoutTracker.LOCKOUT_TIMED); in halSessionCallback_respondsToResetLockout()
136 () -> new AidlSession(1, mSession, USER_ID, mHalCallback), in halSessionCallback_respondsToResetLockout()
137 USER_ID, TAG, SENSOR_ID, mLogger, mBiometricContext, HAT, mLockoutCache, in halSessionCallback_respondsToResetLockout()
146 mLockoutCache.setLockoutModeForUser(USER_ID, LockoutTracker.LOCKOUT_TIMED); in halSessionCallback_respondsToUnprovokedResetLockout()
158 when(mCurrentSession.getUserId()).thenReturn(USER_ID); in onBinderDied_cancelNonInterruptableClient()
159 when(mClientMonitor.getTargetUserId()).thenReturn(USER_ID); in onBinderDied_cancelNonInterruptableClient()
165 USER_ID, mHalCallback); in onBinderDied_cancelNonInterruptableClient()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/biometrics/sensors/face/hidl/
DHidlToAidlSensorAdapterTest.java67 private static final int USER_ID = 2; field in HidlToAidlSensorAdapterTest
132 mHidlToAidlSensorAdapter.handleUserChanged(USER_ID); in setUp()
141 USER_ID, TAG, SENSOR_ID, mLogger, mBiometricContext, HAT, in lockoutTimedResetViaClient()
147 .getLockoutModeForUser(USER_ID)).isEqualTo(LockoutTracker.LOCKOUT_NONE); in lockoutTimedResetViaClient()
150 verify(mAuthSessionCoordinator, never()).resetLockoutFor(eq(USER_ID), anyInt(), anyLong()); in lockoutTimedResetViaClient()
163 .getLockoutModeForUser(USER_ID)) in lockoutTimedResetViaCallback()
165 verify(mAuthSessionCoordinator, never()).resetLockoutFor(eq(USER_ID), anyInt(), anyLong()); in lockoutTimedResetViaCallback()
178 .getLockoutModeForUser(USER_ID)).isEqualTo(LockoutTracker.LOCKOUT_NONE); in lockoutPermanentResetViaCallback()
179 verify(mAuthSessionCoordinator, never()).resetLockoutFor(eq(USER_ID), anyInt(), anyLong()); in lockoutPermanentResetViaCallback()
189 USER_ID, TAG, SENSOR_ID, mLogger, mBiometricContext, HAT, in lockoutPermanentResetViaClient()
[all …]
/frameworks/base/packages/SettingsLib/SpaPrivileged/tests/src/com/android/settingslib/spaprivileged/template/preference/
DRestrictedTwoTargetSwitchPreferenceTest.kt62 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) in <lambda>()
72 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) in <lambda>()
82 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
93 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
104 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
115 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
126 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
138 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
149 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
160 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
[all …]
DRestrictedSwitchPreferenceTest.kt61 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) in <lambda>()
71 val restrictions = Restrictions(userId = USER_ID, keys = emptyList()) in <lambda>()
81 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
92 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
103 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
114 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
125 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
137 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
148 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
160 val restrictions = Restrictions(userId = USER_ID, keys = listOf(RESTRICTION_KEY)) in <lambda>()
[all …]

123456