Home
last modified time | relevance | path

Searched refs:TEST_USER_ID (Results 1 – 25 of 35) sorted by relevance

12

/frameworks/base/services/tests/servicestests/src/com/android/server/contentprotection/
DContentProtectionConsentManagerTest.java84 private static final int TEST_USER_ID = 1234; field in ContentProtectionConsentManagerTest
112 boolean actual = manager.isConsentGranted(TEST_USER_ID); in isConsentGranted_policyFlagDisabled_packageVerifierNotGranted()
125 boolean actual = manager.isConsentGranted(TEST_USER_ID); in isConsentGranted_policyFlagEnabled_packageVerifierNotGranted()
138 boolean actual = manager.isConsentGranted(TEST_USER_ID); in isConsentGranted_policyFlagDisabled_contentProtectionNotGranted()
151 boolean actual = manager.isConsentGranted(TEST_USER_ID); in isConsentGranted_policyFlagDisabled_packageVerifierGranted_userNotManaged()
154 verify(mMockDevicePolicyManagerInternal).isUserOrganizationManaged(TEST_USER_ID); in isConsentGranted_policyFlagDisabled_packageVerifierGranted_userNotManaged()
161 when(mMockDevicePolicyManagerInternal.isUserOrganizationManaged(TEST_USER_ID)) in isConsentGranted_policyFlagDisabled_packageVerifierGranted_userManaged()
166 boolean actual = manager.isConsentGranted(TEST_USER_ID); in isConsentGranted_policyFlagDisabled_packageVerifierGranted_userManaged()
178 boolean actual = manager.isConsentGranted(TEST_USER_ID); in isConsentGranted_policyFlagEnabled_packageVerifierGranted_userNotManaged_contentProtectionNotGranted()
181 verify(mMockDevicePolicyManagerInternal).isUserOrganizationManaged(TEST_USER_ID); in isConsentGranted_policyFlagEnabled_packageVerifierGranted_userNotManaged_contentProtectionNotGranted()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/pm/
DSuspendPackageHelperTest.kt46 val doUserPackage = UserPackage.of(TEST_USER_ID, DEVICE_OWNER_PACKAGE) in <lambda>()
47 val platformUserPackage = UserPackage.of(TEST_USER_ID, PLATFORM_PACKAGE_NAME) in <lambda>()
48 val testUserPackage1 = UserPackage.of(TEST_USER_ID, TEST_PACKAGE_1) in <lambda>()
57 TEST_USER_ID, deviceOwnerUid, false /* quarantined */) in <lambda>()
60 verify(pms).scheduleWritePackageRestrictions(eq(TEST_USER_ID)) in <lambda>()
74 TEST_USER_ID, deviceOwnerUid, false /* quarantined */) in <lambda>()
81 TEST_USER_ID, deviceOwnerUid, false /* quarantined */) in <lambda>()
91 testUserPackage1, TEST_USER_ID, in <lambda>()
103 TEST_USER_ID, deviceOwnerUid, false /* quarantined */) in <lambda>()
114 TEST_USER_ID, deviceOwnerUid, false /* quarantined */) in <lambda>()
[all …]
DDistractingPackageHelperTest.kt55 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, deviceOwnerUid) in setDistractingPackageRestrictionsAsUser()
58 verify(pms).scheduleWritePackageRestrictions(eq(TEST_USER_ID)) in setDistractingPackageRestrictionsAsUser()
73 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, deviceOwnerUid) in setDistractingPackageRestrictionsAsUser_setSameDistractionRestrictionTwice()
80 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, deviceOwnerUid) in setDistractingPackageRestrictionsAsUser_setSameDistractionRestrictionTwice()
82 verify(pms, never()).scheduleWritePackageRestrictions(eq(TEST_USER_ID)) in setDistractingPackageRestrictionsAsUser_setSameDistractionRestrictionTwice()
92 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, deviceOwnerUid) in setDistractingPackageRestrictionsAsUser_emptyPackageName()
97 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, deviceOwnerUid) in setDistractingPackageRestrictionsAsUser_emptyPackageName()
105 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, Binder.getCallingUid()) in setDistractingPackageRestrictionsAsUser_callerIsNotAllowed()
115 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, Binder.getCallingUid()) in setDistractingPackageRestrictionsAsUser_setCallerItself()
125 PackageManager.RESTRICTION_HIDE_NOTIFICATIONS, TEST_USER_ID, deviceOwnerUid) in setDistractingPackageRestrictionsAsUser_nonexistentPackage()
[all …]
DPackageHelperTestBase.kt52 const val TEST_USER_ID = 0 constant
98 deviceOwnerUid = UserHandle.getUid(TEST_USER_ID, ownerSetting.appId) in setup()
102 whenever(protectedPackages.getDeviceOwnerOrProfileOwnerPackage(eq(TEST_USER_ID))) in setup()
105 eq(UserManager.DISALLOW_APPS_CONTROL), eq(TEST_USER_ID))).thenReturn(true) in setup()
107 eq(UserManager.DISALLOW_UNINSTALL_APPS), eq(TEST_USER_ID))).thenReturn(true) in setup()
115 .getDefaultHome(eq(TEST_USER_ID)) in mockKnownPackages()
117 .getDefaultDialer(eq(TEST_USER_ID)) in mockKnownPackages()
119 any(), eq(KnownPackages.PACKAGE_INSTALLER), eq(TEST_USER_ID)) in mockKnownPackages()
121 any(), eq(KnownPackages.PACKAGE_UNINSTALLER), eq(TEST_USER_ID)) in mockKnownPackages()
123 any(), eq(KnownPackages.PACKAGE_VERIFIER), eq(TEST_USER_ID)) in mockKnownPackages()
[all …]
DPackageFreezerTest.kt41 const val TEST_USER_ID = 0 constant
78 pms.checkPackageStartable(pms.snapshotComputer(), TEST_PACKAGE, TEST_USER_ID) in checkPackageStartable()
91 val freezer = PackageFreezer(TEST_PACKAGE, TEST_USER_ID, TEST_REASON, pms, in freezePackage()
94 .killApplication(eq(TEST_PACKAGE), any(), eq(TEST_USER_ID), eq(TEST_REASON), in freezePackage()
107 val freezer1 = PackageFreezer(TEST_PACKAGE, TEST_USER_ID, TEST_REASON, pms, in freezePackage_twice()
109 val freezer2 = PackageFreezer(TEST_PACKAGE, TEST_USER_ID, TEST_REASON, pms, in freezePackage_twice()
112 .killApplication(eq(TEST_PACKAGE), any(), eq(TEST_USER_ID), eq(TEST_REASON), in freezePackage_twice()
130 var freezer: PackageFreezer? = PackageFreezer(TEST_PACKAGE, TEST_USER_ID, TEST_REASON, pms, in freezePackage_withoutClosing()
133 .killApplication(eq(TEST_PACKAGE), any(), eq(TEST_USER_ID), eq(TEST_REASON), in freezePackage_withoutClosing()
DPackageManagerServiceHibernationTests.kt50 val TEST_USER_ID = 0 constant
107 whenever(appHibernationManager.isHibernatingForUser(TEST_PACKAGE_NAME, TEST_USER_ID)) in testExitForceStopExitsHibernation()
110 pm.setPackageStoppedState(pm.snapshotComputer(), TEST_PACKAGE_NAME, false, TEST_USER_ID) in testExitForceStopExitsHibernation()
114 verify(appHibernationManager).setHibernatingForUser(TEST_PACKAGE_NAME, TEST_USER_ID, false) in testExitForceStopExitsHibernation()
132 whenever(appHibernationManager.isHibernatingForUser(TEST_PACKAGE_NAME, TEST_USER_ID)) in testExitForceStop_nonExistingAppHibernationManager_doesNotThrowException()
137 TEST_USER_ID) in testExitForceStop_nonExistingAppHibernationManager_doesNotThrowException()
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/
DKeySyncTaskTest.java91 private static final int TEST_USER_ID = 1000; field in KeySyncTaskTest
128 mRecoverableKeyStoreDb.setRecoverySecretTypes(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, in setUp()
130 mRecoverableKeyStoreDb.setRecoverySecretTypes(TEST_USER_ID, TEST_RECOVERY_AGENT_UID2, in setUp()
133 mRecoverableKeyStoreDb.setActiveRootOfTrust(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, in setUp()
135 mRecoverableKeyStoreDb.setActiveRootOfTrust(TEST_USER_ID, TEST_RECOVERY_AGENT_UID2, in setUp()
143 TEST_USER_ID, in setUp()
153 when(mPlatformKeyManager.getDecryptKey(TEST_USER_ID)).thenReturn( in setUp()
245 mRecoverableKeyStoreDb.setPlatformKeyGenerationId(TEST_USER_ID, TEST_GENERATION_ID); in run_doesNotSendAnythingIfNoRecoveryAgentSet()
247 TEST_USER_ID, in run_doesNotSendAnythingIfNoRecoveryAgentSet()
261 mRecoverableKeyStoreDb.setPlatformKeyGenerationId(TEST_USER_ID, TEST_GENERATION_ID); in run_doesNotSendAnythingIfNoDeviceIdIsSet()
[all …]
DRecoverableKeyGeneratorTest.java61 private static final int TEST_USER_ID = 1000; field in RecoverableKeyGeneratorTest
99 mPlatformKey, TEST_USER_ID, KEYSTORE_UID_SELF, TEST_ALIAS, NULL_METADATA); in generateAndStoreKey_storesWrappedKey_nullMetadata()
109 mPlatformKey, TEST_USER_ID, KEYSTORE_UID_SELF, TEST_ALIAS, NON_NULL_METADATA); in generateAndStoreKey_storesWrappedKey_nonNullMetadata()
119 mPlatformKey, TEST_USER_ID, KEYSTORE_UID_SELF, TEST_ALIAS, NON_NULL_METADATA); in generateAndStoreKey_returnsRawMaterialOfCorrectLength()
127 mPlatformKey, TEST_USER_ID, KEYSTORE_UID_SELF, TEST_ALIAS, NULL_METADATA); in generateAndStoreKey_storesTheWrappedVersionOfTheRawMaterial()
140 mPlatformKey, TEST_USER_ID, KEYSTORE_UID_SELF, TEST_ALIAS, in importKey_storesNullMetadata()
149 mPlatformKey, TEST_USER_ID, KEYSTORE_UID_SELF, TEST_ALIAS, in importKey_storesNonNullMetadata()
160 mPlatformKey, TEST_USER_ID, KEYSTORE_UID_SELF, TEST_ALIAS, rawMaterial, in importKey_storesTheWrappedVersionOfTheRawMaterial()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/
DCountQuotaTrackerTest.java82 private static final int TEST_USER_ID = 0; field in CountQuotaTrackerTest
201 logEvents(TEST_USER_ID, TEST_PACKAGE, TEST_TAG, count); in logEvents()
211 logEventAt(TEST_USER_ID, TEST_PACKAGE, TEST_TAG, timeElapsed); in logEventAt()
248 LongArrayQueue remainingEvents = mQuotaTracker.getEvents(TEST_USER_ID, TEST_PACKAGE, in testDeleteObsoleteEventsLocked()
256 logEventAt(TEST_USER_ID, "com.android.test.remove", "tag1", now - (6 * HOUR_IN_MILLIS)); in testAppRemoval()
257 logEventAt(TEST_USER_ID, "com.android.test.remove", "tag2", in testAppRemoval()
259 logEventAt(TEST_USER_ID, "com.android.test.remove", "tag3", now - (HOUR_IN_MILLIS)); in testAppRemoval()
265 logEventAt(TEST_USER_ID, "com.android.test.stay", "tag1", now - 10 * MINUTE_IN_MILLIS); in testAppRemoval()
266 logEventAt(TEST_USER_ID, "com.android.test.stay", "tag2", now - 70 * MINUTE_IN_MILLIS); in testAppRemoval()
273 mQuotaTracker.getEvents(TEST_USER_ID, "com.android.test.remove", "tag1")); in testAppRemoval()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/
DRecoverySessionStorageTest.java39 private static final int TEST_USER_ID = 696; field in RecoverySessionStorageTest
52 storage.add(TEST_USER_ID, new RecoverySessionStorage.Entry( in size_incrementsAfterAdd()
61 storage.add(TEST_USER_ID, new RecoverySessionStorage.Entry( in size_decrementsAfterRemove()
63 storage.remove(TEST_USER_ID); in size_decrementsAfterRemove()
73 storage.add(TEST_USER_ID, entry); in remove_overwritesLskfHashMemory()
75 storage.remove(TEST_USER_ID); in remove_overwritesLskfHashMemory()
85 storage.add(TEST_USER_ID, entry); in remove_overwritesKeyClaimantMemory()
87 storage.remove(TEST_USER_ID); in remove_overwritesKeyClaimantMemory()
95 storage.add(TEST_USER_ID, new RecoverySessionStorage.Entry( in remove_deletesSpecificSession()
100 storage.add(TEST_USER_ID, new RecoverySessionStorage.Entry( in remove_deletesSpecificSession()
[all …]
DRecoverableKeyStoreDbHelperTest.java45 private static final long TEST_USER_ID = 10L; field in RecoverableKeyStoreDbHelperTest
176 values.put(RootOfTrustEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in isRootOfTrustTableAvailable()
188 values.put(KeysEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_v4()
201 values.put(UserMetadataEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_v4()
210 values.put(RecoveryServiceMetadataEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_v4()
237 values.put(KeysEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_latest()
254 values.put(UserMetadataEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_latest()
262 values.put(UserMetadataEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_latest()
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/
DPolicyWarningUIControllerTest.java71 private static final int TEST_USER_ID = UserHandle.USER_SYSTEM; field in PolicyWarningUIControllerTest
109 "", TEST_USER_ID); in setUp() local
111 mPolicyWarningUIController.onSwitchUser(TEST_USER_ID, new HashSet<>()); in setUp()
120 PolicyWarningUIController.createIntent(mContext, TEST_USER_ID, in receiveActionSendNotification_isNonA11yCategoryService_sendNotification()
134 PolicyWarningUIController.createIntent(mContext, TEST_USER_ID, in receiveActionSendNotification_sendNotificationDisabled_doNothing()
146 TEST_COMPONENT_NAME.flattenToShortString(), TEST_USER_ID); in receiveActionSendNotificationWithNotifiedService_doNothing() local
148 mPolicyWarningUIController.onSwitchUser(TEST_USER_ID, new HashSet<>()); in receiveActionSendNotificationWithNotifiedService_doNothing()
153 PolicyWarningUIController.createIntent(mContext, TEST_USER_ID, in receiveActionSendNotificationWithNotifiedService_doNothing()
164 PolicyWarningUIController.createIntent(mContext, TEST_USER_ID, in receiveActionA11ySettings_launchA11ySettingsAndDismissNotification()
171 assertNotifiedSettingsEqual(TEST_USER_ID, TEST_COMPONENT_NAME.flattenToShortString()); in receiveActionA11ySettings_launchA11ySettingsAndDismissNotification()
[all …]
DAccessibilitySecurityPolicyTest.java86 private static final int TEST_USER_ID = UserHandle.USER_SYSTEM; field in AccessibilitySecurityPolicyTest
168 mA11ySecurityPolicy.onSwitchUserLocked(TEST_USER_ID, new HashSet<>()); in setUp()
179 TEST_USER_ID, in canDispatchAccessibilityEvent_alwaysDispatchEvents_returnTrue()
192 TEST_USER_ID, in canDispatchAccessibilityEvent_otherEvents_invalidWindowId_returnFalse()
199 when(mMockA11yWindowManager.getActiveWindowId(TEST_USER_ID)) in canDispatchAccessibilityEvent_otherEvents_windowIdIsActive_returnTrue()
206 TEST_USER_ID, in canDispatchAccessibilityEvent_otherEvents_windowIdIsActive_returnTrue()
213 when(mMockA11yWindowManager.getActiveWindowId(TEST_USER_ID)) in canDispatchAccessibilityEvent_otherEvents_windowIdExist_returnTrue()
222 TEST_USER_ID, in canDispatchAccessibilityEvent_otherEvents_windowIdExist_returnTrue()
230 null, Process.SYSTEM_UID, TEST_USER_ID, SYSTEM_PID)); in resolveValidReportedPackage_nullPkgName_returnNull()
236 PACKAGE_NAME, Process.SYSTEM_UID, TEST_USER_ID, SYSTEM_PID), in resolveValidReportedPackage_uidIsSystem_returnPkgName()
[all …]
/frameworks/base/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/
DUserDataPreparerTest.java60 private static final int TEST_USER_ID = 10; field in UserDataPreparerTest
78 TEST_USER.id = TEST_USER_ID; in setup()
96 File userDeDir = mUserDataPreparer.getDataUserDeDirectory(null, TEST_USER_ID); in testPrepareUserData_De()
98 File systemDeDir = mUserDataPreparer.getDataSystemDeDirectory(TEST_USER_ID); in testPrepareUserData_De()
101 verify(mStorageManagerMock).prepareUserStorage(isNull(String.class), eq(TEST_USER_ID), in testPrepareUserData_De()
103 verify(mInstaller).createUserData(isNull(String.class), eq(TEST_USER_ID), in testPrepareUserData_De()
113 File userCeDir = mUserDataPreparer.getDataUserCeDirectory(null, TEST_USER_ID); in testPrepareUserData_Ce()
115 File systemCeDir = mUserDataPreparer.getDataSystemCeDirectory(TEST_USER_ID); in testPrepareUserData_Ce()
118 verify(mStorageManagerMock).prepareUserStorage(isNull(String.class), eq(TEST_USER_ID), in testPrepareUserData_Ce()
120 verify(mInstaller).createUserData(isNull(String.class), eq(TEST_USER_ID), in testPrepareUserData_Ce()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DActivityStartInterceptorTest.java86 private static final int TEST_USER_ID = 1; field in ActivityStartInterceptorTest
142 mInterceptor.setStates(TEST_USER_ID, TEST_REAL_CALLING_PID, TEST_REAL_CALLING_UID, in setUp()
153 when(mDevicePolicyManager.createShowAdminSupportIntent(TEST_USER_ID, true)) in setUp()
159 when(mUserManager.getProfileParent(TEST_USER_ID)).thenReturn(PARENT_USER_INFO); in setUp()
164 nullable(CharSequence.class), nullable(CharSequence.class), eq(TEST_USER_ID), in setUp()
169 when(mPackageManager.getHarmfulAppWarning(TEST_PACKAGE_NAME, TEST_USER_ID)) in setUp()
176 TEST_USER_ID, TEST_PACKAGE_NAME, LOCK_TASK_LAUNCH_MODE_DEFAULT)) in setUp()
198 when(mPackageManagerInternal.getSuspendingPackage(TEST_PACKAGE_NAME, TEST_USER_ID)) in testSuspendedByAdminPackage()
199 .thenReturn(UserPackage.of(TEST_USER_ID, PLATFORM_PACKAGE_NAME)); in testSuspendedByAdminPackage()
222 assertEquals(TEST_USER_ID, mInterceptor.mIntent.getIntExtra(Intent.EXTRA_USER_ID, -1000)); in testSuspendedPackage()
[all …]
DCompatScaleProviderTest.java45 static final int TEST_USER_ID = 1; field in CompatScaleProviderTest
107 mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID); in registerCompatScaleProviderSuccessfully()
108 verify(compatScaleProvider, times(1)).getCompatScale(TEST_PACKAGE, TEST_USER_ID); in registerCompatScaleProviderSuccessfully()
145 mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID); in unregisterCompatScaleProviderSuccessfully()
146 verify(compatScaleProvider, never()).getCompatScale(TEST_PACKAGE, TEST_USER_ID); in unregisterCompatScaleProviderSuccessfully()
161 mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID); in registerCompatScaleProviderRespectsOrderId()
163 inOrder.verify(gameModeCompatScaleProvider).getCompatScale(TEST_PACKAGE, TEST_USER_ID); in registerCompatScaleProviderRespectsOrderId()
164 inOrder.verify(productCompatScaleProvider).getCompatScale(TEST_PACKAGE, TEST_USER_ID); in registerCompatScaleProviderRespectsOrderId()
DLockTaskControllerTest.java110 private static final int TEST_USER_ID = 123; field in LockTaskControllerTest
284 mLockTaskController.updateLockTaskFeatures(TEST_USER_ID, LOCK_TASK_FEATURE_KEYGUARD); in testLockTaskViolation_emergencyCall()
292 mLockTaskController.updateLockTaskFeatures(TEST_USER_ID, LOCK_TASK_FEATURE_NONE); in testLockTaskViolation_emergencyCall()
474 when(mLockPatternUtils.isSecure(TEST_USER_ID)) in testClearLockedTasks_noLockSetting_password_deviceIsLocked()
530 mLockTaskController.isPackageAllowlisted(TEST_USER_ID, pkg)); in testUpdateLockTaskPackages()
536 mLockTaskController.updateLockTaskPackages(TEST_USER_ID, allowlist1); in testUpdateLockTaskPackages()
541 mLockTaskController.isPackageAllowlisted(TEST_USER_ID, pkg)); in testUpdateLockTaskPackages()
547 mLockTaskController.updateLockTaskPackages(TEST_USER_ID, allowlist2); in testUpdateLockTaskPackages()
551 mLockTaskController.isPackageAllowlisted(TEST_USER_ID, TEST_PACKAGE_NAME)); in testUpdateLockTaskPackages()
553 mLockTaskController.isPackageAllowlisted(TEST_USER_ID, TEST_PACKAGE_NAME_2)); in testUpdateLockTaskPackages()
[all …]
DLaunchParamsPersisterTests.java70 private static final int TEST_USER_ID = 3; field in LaunchParamsPersisterTests
112 mUserFolderGetter.apply(TEST_USER_ID).mkdir(); in setUp()
124 mTestTask.mUserId = TEST_USER_ID; in setUp()
130 mTaskWithDifferentComponent.mUserId = TEST_USER_ID; in setUp()
190 .setUid(TEST_USER_ID * UserHandle.PER_USER_RANGE).build(); in testFetchesSameResultWithActivity()
295 target.onUnlockUser(TEST_USER_ID); in testSavesAndRestoresLaunchParamsAcrossInstances()
313 target.onUnlockUser(TEST_USER_ID); in testUsesRecordWithSameWindowLayoutAffinityAcrossInstances_NoPreviousRecord()
341 target.onUnlockUser(TEST_USER_ID); in testUsesRecordWithSameWindowLayoutAffinityAcrossInstances_HasOldPreviousRecord()
358 .setUserId(TEST_USER_ID) in testClearsRecordsOfTheUserOnUserCleanUp()
378 mTarget.onCleanupUser(TEST_USER_ID); in testClearsRecordsOfTheUserOnUserCleanUp()
[all …]
DCompatModePackagesTests.java55 static final int TEST_USER_ID = 1; field in CompatModePackagesTests
84 assertEquals(1 / scale, mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID), in testGetCompatScale_gameManagerReturnsPositive()
93 assertEquals(mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID), 1f, in testGetCompatScale_gameManagerReturnsZero()
102 assertEquals(mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID), 1f, in testGetCompatScale_gameManagerReturnsNegative()
108 assertEquals(mAtm.mCompatModePackages.getCompatScale(TEST_PACKAGE, TEST_USER_ID), 1f, in testGetCompatScale_noGameManager()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/privacy/
DPrivacyDialogTest.kt47 private const val TEST_USER_ID = 0 constant
73 TEST_USER_ID, in testStarterCalledWithCorrectParams()
89 verify(starter).invoke(TEST_PACKAGE_NAME, TEST_USER_ID, null, null) in testStarterCalledWithCorrectParams()
121 TEST_USER_ID, in testCorrectNumElements()
136 TEST_USER_ID, in testCorrectNumElements()
159 TEST_USER_ID, in testUsingText()
189 TEST_USER_ID, in testRecentText()
219 TEST_USER_ID, in testEnterprise()
245 TEST_USER_ID, in testPhoneCall()
271 TEST_USER_ID, in testPhoneCallNotClickable()
[all …]
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/trust/
DTrustManagerServiceTest.java134 private static final int TEST_USER_ID = 50; field in TrustManagerServiceTest
136 new UserInfo(TEST_USER_ID, "user", UserInfo.FLAG_FULL);
170 when(mActivityManager.isUserRunning(TEST_USER_ID)).thenReturn(true); in setUp()
177 when(mLockPatternUtils.isSecure(TEST_USER_ID)).thenReturn(true); in setUp()
178 when(mLockPatternUtils.getKnownTrustAgents(TEST_USER_ID)).thenReturn(mKnownTrustAgents); in setUp()
179 when(mLockPatternUtils.getEnabledTrustAgents(TEST_USER_ID)).thenReturn(mEnabledTrustAgents); in setUp()
184 }).when(mLockPatternUtils).setKnownTrustAgents(any(), eq(TEST_USER_ID)); in setUp()
189 }).when(mLockPatternUtils).setEnabledTrustAgents(any(), eq(TEST_USER_ID)); in setUp()
206 when(mUserManager.getEnabledProfileIds(TEST_USER_ID)).thenReturn(new int[0]); in setUp()
207 when(mUserManager.getUserInfo(TEST_USER_ID)).thenReturn(TEST_USER); in setUp()
[all …]
/frameworks/base/services/tests/servicestests/src/com/android/server/am/
DUserControllerTest.java147 private static final int TEST_USER_ID = 100; field in UserControllerTest
223 setUpUser(TEST_USER_ID, NO_USERINFO_FLAGS); in setUp()
237 mUserController.startUser(TEST_USER_ID, USER_START_MODE_FOREGROUND); in testStartUser_foreground()
243 verifyUserAssignedToDisplay(TEST_USER_ID, Display.DEFAULT_DISPLAY); in testStartUser_foreground()
248 boolean started = mUserController.startUser(TEST_USER_ID, USER_START_MODE_BACKGROUND); in testStartUser_background()
249 assertWithMessage("startUser(%s, foreground=false)", TEST_USER_ID).that(started).isTrue(); in testStartUser_background()
255 verifyUserAssignedToDisplay(TEST_USER_ID, Display.DEFAULT_DISPLAY); in testStartUser_background()
262 mInjector.mRelevantUser = TEST_USER_ID; in testStartUser_background_duringBootHsum()
263 boolean started = mUserController.startUser(TEST_USER_ID, USER_START_MODE_BACKGROUND); in testStartUser_background_duringBootHsum()
264 assertWithMessage("startUser(%s, foreground=false)", TEST_USER_ID).that(started).isTrue(); in testStartUser_background_duringBootHsum()
[all …]
/frameworks/base/services/tests/PackageManagerServiceTests/unit/src/com/android/server/pm/test/verify/domain/
DDomainVerificationSettingsMutationTest.kt57 private const val TEST_USER_ID = 10 in <lambda>() constant
118 clearUser(TEST_USER_ID) in <lambda>()
124 clearUserStates(listOf(TEST_PKG), TEST_USER_ID) in <lambda>()
149 setDomainVerificationLinkHandlingAllowed(TEST_PKG, true, TEST_USER_ID) in <lambda>()
152 setDomainVerificationLinkHandlingAllowedInternal(TEST_PKG, true, TEST_USER_ID) in <lambda>()
159 TEST_USER_ID in <lambda>()
164 TEST_USER_ID, in <lambda>()
173 TEST_USER_ID, in <lambda>()
247 whenever(callingUserId) { TEST_USER_ID } in <lambda>()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/
DStorageManagerServiceTest.java52 private static final int TEST_USER_ID = 1001; field in StorageManagerServiceTest
103 new TestStorageEventListener(TEST_USER_ID); in testRegisterLockEventListener()
120 spy(new TestStorageEventListener(TEST_USER_ID)); in testDispatchCeStorageLockEvent()
126 mStorageManagerService.dispatchCeStorageLockedEvent(TEST_USER_ID); in testDispatchCeStorageLockEvent()
127 verify(testStorageEventListener).onStorageLocked(eq(TEST_USER_ID)); in testDispatchCeStorageLockEvent()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/am/
DPendingIntentControllerTest.java67 private static final int TEST_USER_ID = 0; field in PendingIntentControllerTest
106 TEST_PACKAGE_NAME, TEST_FEATURE_ID, TEST_CALLING_UID, TEST_USER_ID, null, null, 0, in createPendingIntentRecord()
168 TEST_USER_ID, UserHandle.getAppId(TEST_CALLING_UID), true, in testCancellationReason()
176 TEST_USER_ID, INVALID_UID, true, in testCancellationReason()

12