/frameworks/base/services/tests/mockingservicestests/src/com/android/server/utils/quota/ |
D | CountQuotaTrackerTest.java | 82 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/ |
D | KeySyncTaskTest.java | 89 private static final int TEST_USER_ID = 1000; field in KeySyncTaskTest 125 mRecoverableKeyStoreDb.setRecoverySecretTypes(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, in setUp() 127 mRecoverableKeyStoreDb.setRecoverySecretTypes(TEST_USER_ID, TEST_RECOVERY_AGENT_UID2, in setUp() 130 mRecoverableKeyStoreDb.setActiveRootOfTrust(TEST_USER_ID, TEST_RECOVERY_AGENT_UID, in setUp() 132 mRecoverableKeyStoreDb.setActiveRootOfTrust(TEST_USER_ID, TEST_RECOVERY_AGENT_UID2, in setUp() 140 TEST_USER_ID, in setUp() 150 when(mPlatformKeyManager.getDecryptKey(TEST_USER_ID)).thenReturn( in setUp() 242 mRecoverableKeyStoreDb.setPlatformKeyGenerationId(TEST_USER_ID, TEST_GENERATION_ID); in run_doesNotSendAnythingIfNoRecoveryAgentSet() 244 TEST_USER_ID, in run_doesNotSendAnythingIfNoRecoveryAgentSet() 258 mRecoverableKeyStoreDb.setPlatformKeyGenerationId(TEST_USER_ID, TEST_GENERATION_ID); in run_doesNotSendAnythingIfNoDeviceIdIsSet() [all …]
|
D | RecoverableKeyGeneratorTest.java | 61 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()
|
D | RecoverableKeyStoreManagerTest.java | 130 private static final int TEST_USER_ID = 10009; field in RecoverableKeyStoreManagerTest 184 when(mKeyguardManager.isDeviceSecure(TEST_USER_ID)).thenReturn(true); in setUp()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/locksettings/recoverablekeystore/storage/ |
D | RecoverySessionStorageTest.java | 39 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 …]
|
D | RecoverableKeyStoreDbHelperTest.java | 45 private static final long TEST_USER_ID = 10L; field in RecoverableKeyStoreDbHelperTest 163 values.put(RootOfTrustEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in isRootOfTrustTableAvailable() 175 values.put(KeysEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_v4() 188 values.put(UserMetadataEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_v4() 197 values.put(RecoveryServiceMetadataEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_v4() 224 values.put(KeysEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_latest() 241 values.put(UserMetadataEntry.COLUMN_NAME_USER_ID, TEST_USER_ID); in checkAllColumns_latest()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/ |
D | UserDataPreparerTest.java | 64 private static final int TEST_USER_ID = 10; field in UserDataPreparerTest 97 File userDeDir = mUserDataPreparer.getDataUserDeDirectory(null, TEST_USER_ID); in testPrepareUserData_De() 99 File systemDeDir = mUserDataPreparer.getDataSystemDeDirectory(TEST_USER_ID); in testPrepareUserData_De() 102 .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_DE); in testPrepareUserData_De() 103 verify(mStorageManagerMock).prepareUserStorage(isNull(String.class), eq(TEST_USER_ID), in testPrepareUserData_De() 105 verify(mInstaller).createUserData(isNull(String.class), eq(TEST_USER_ID), in testPrepareUserData_De() 115 File userCeDir = mUserDataPreparer.getDataUserCeDirectory(null, TEST_USER_ID); in testPrepareUserData_Ce() 117 File systemCeDir = mUserDataPreparer.getDataSystemCeDirectory(TEST_USER_ID); in testPrepareUserData_Ce() 120 .prepareUserData(TEST_USER_ID, TEST_USER_SERIAL, StorageManager.FLAG_STORAGE_CE); in testPrepareUserData_Ce() 121 verify(mStorageManagerMock).prepareUserStorage(isNull(String.class), eq(TEST_USER_ID), in testPrepareUserData_Ce() [all …]
|
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/ |
D | ActivityStartInterceptorTest.java | 72 private static final int TEST_USER_ID = 1; field in ActivityStartInterceptorTest 123 mInterceptor.setStates(TEST_USER_ID, TEST_REAL_CALLING_PID, TEST_REAL_CALLING_UID, in setUp() 134 when(mDevicePolicyManager.createShowAdminSupportIntent(TEST_USER_ID, true)) in setUp() 140 when(mUserManager.getProfileParent(TEST_USER_ID)).thenReturn(PARENT_USER_INFO); in setUp() 145 nullable(CharSequence.class), nullable(CharSequence.class), eq(TEST_USER_ID), in setUp() 150 when(mPackageManager.getHarmfulAppWarning(TEST_PACKAGE_NAME, TEST_USER_ID)) in setUp() 157 TEST_USER_ID, TEST_PACKAGE_NAME, LOCK_TASK_LAUNCH_MODE_DEFAULT)) in setUp() 176 when(mPackageManagerInternal.getSuspendingPackage(TEST_PACKAGE_NAME, TEST_USER_ID)) in testSuspendedByAdminPackage() 200 assertEquals(TEST_USER_ID, mInterceptor.mIntent.getIntExtra(Intent.EXTRA_USER_ID, -1000)); in testSuspendedPackage() 209 when(mPackageManagerInternal.getSuspendingPackage(TEST_PACKAGE_NAME, TEST_USER_ID)) in suspendPackage() [all …]
|
D | LockTaskControllerTest.java | 104 private static final int TEST_USER_ID = 123; field in LockTaskControllerTest 279 mLockTaskController.updateLockTaskFeatures(TEST_USER_ID, LOCK_TASK_FEATURE_KEYGUARD); in testLockTaskViolation_emergencyCall() 287 mLockTaskController.updateLockTaskFeatures(TEST_USER_ID, LOCK_TASK_FEATURE_NONE); in testLockTaskViolation_emergencyCall() 509 mLockTaskController.isPackageWhitelisted(TEST_USER_ID, pkg)); in testUpdateLockTaskPackages() 515 mLockTaskController.updateLockTaskPackages(TEST_USER_ID, whitelist1); in testUpdateLockTaskPackages() 520 mLockTaskController.isPackageWhitelisted(TEST_USER_ID, pkg)); in testUpdateLockTaskPackages() 526 mLockTaskController.updateLockTaskPackages(TEST_USER_ID, whitelist2); in testUpdateLockTaskPackages() 530 mLockTaskController.isPackageWhitelisted(TEST_USER_ID, TEST_PACKAGE_NAME)); in testUpdateLockTaskPackages() 532 mLockTaskController.isPackageWhitelisted(TEST_USER_ID, TEST_PACKAGE_NAME_2)); in testUpdateLockTaskPackages() 541 mLockTaskController.updateLockTaskPackages(TEST_USER_ID, whitelist); in testUpdateLockTaskPackages_taskRemoved() [all …]
|
D | LaunchParamsPersisterTests.java | 69 private static final int TEST_USER_ID = 3; field in LaunchParamsPersisterTests 121 mTestTask.mUserId = TEST_USER_ID; in setUp() 127 mTaskWithDifferentComponent.mUserId = TEST_USER_ID; in setUp() 176 .setUid(TEST_USER_ID * UserHandle.PER_USER_RANGE).build(); in testFetchesSameResultWithActivity() 281 target.onUnlockUser(TEST_USER_ID); in testSavesAndRestoresLaunchParamsAcrossInstances() 299 target.onUnlockUser(TEST_USER_ID); in testUsesRecordWithSameWindowLayoutAffinityAcrossInstances_NoPreviousRecord() 327 target.onUnlockUser(TEST_USER_ID); in testUsesRecordWithSameWindowLayoutAffinityAcrossInstances_HasOldPreviousRecord() 344 .setUserId(TEST_USER_ID) in testClearsRecordsOfTheUserOnUserCleanUp() 364 mTarget.onCleanupUser(TEST_USER_ID); in testClearsRecordsOfTheUserOnUserCleanUp() 396 target.onUnlockUser(TEST_USER_ID); in testClearsWriteQueueItem() [all …]
|
D | RecentsAnimationTest.java | 70 private static final int TEST_USER_ID = 100; field in RecentsAnimationTest 336 otherUserHomeActivity.getTask().mUserId = TEST_USER_ID; in testMultipleUserHomeActivity_findUserHomeTask() 346 doReturn(TEST_USER_ID).when(mService).getCurrentUserId(); in testMultipleUserHomeActivity_findUserHomeTask()
|
/frameworks/base/services/tests/servicestests/src/com/android/server/am/ |
D | UserControllerTest.java | 109 private static final int TEST_USER_ID = 100; field in UserControllerTest 163 setUpUser(TEST_USER_ID, NO_USERINFO_FLAGS); in setUp() 176 mUserController.startUser(TEST_USER_ID, true /* foreground */); in testStartUser_foreground() 187 mUserController.startUser(TEST_USER_ID, false /* foreground */); in testStartUser_background() 199 mUserController.startUser(TEST_USER_ID, true /* foreground */); in testStartUserUIDisabled() 248 assertEquals(TEST_USER_ID, userState.mHandle.getIdentifier()); in startForegroundUserAssertions() 251 assertEquals("Unexpected new user id", TEST_USER_ID, reportMsg.arg2); in startForegroundUserAssertions() 276 mUserController.startUser(TEST_USER_ID, true); in testDispatchUserSwitch() 285 verify(observer, times(1)).onUserSwitching(eq(TEST_USER_ID), any()); in testDispatchUserSwitch() 293 assertEquals(TEST_USER_ID, userState.mHandle.getIdentifier()); in testDispatchUserSwitch() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | OverlayPackagesProviderTest.java | 58 private static final int TEST_USER_ID = 123; field in OverlayPackagesProviderTest 264 mHelper.getNonRequiredApps(TEST_MDM_COMPONENT_NAME, TEST_USER_ID, action)); in verifyAppsAreNonRequired() 334 when(mInjector.getInputMethodListAsUser(eq(TEST_USER_ID))).thenReturn(inputMethods); in setSystemInputMethods() 363 assertEquals(userId, TEST_USER_ID); in queryIntentActivitiesAsUser()
|
/frameworks/base/core/tests/coretests/src/android/view/inputmethod/ |
D | EditorInfoTest.java | 43 private static final int TEST_USER_ID = 42; field in EditorInfoTest 64 editorInfo.targetInputMethodUser = UserHandle.of(TEST_USER_ID); in testNonNullTargetInputMethodUserParcelable() 65 assertEquals(UserHandle.of(TEST_USER_ID), cloneViaParcel(editorInfo).targetInputMethodUser); in testNonNullTargetInputMethodUserParcelable()
|