/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/topics/ |
D | TopicsDaoTest.java | 75 private final TopicsDao mTopicsDao = new TopicsDao(mDBHelper); field in TopicsDaoTest 116 mTopicsDao.persistAppClassificationTopics(epochId1, appClassificationTopicsMap1); in testPersistAndGetAppClassificationTopics() 117 mTopicsDao.persistAppClassificationTopics(epochId2, appClassificationTopicsMap2); in testPersistAndGetAppClassificationTopics() 128 mTopicsDao.retrieveAppClassificationTopics(epochId1); in testPersistAndGetAppClassificationTopics() 130 mTopicsDao.retrieveAppClassificationTopics(epochId2); in testPersistAndGetAppClassificationTopics() 136 assertThat(mTopicsDao.retrieveAppClassificationTopics(epochId3)).isEmpty(); in testPersistAndGetAppClassificationTopics() 144 mTopicsDao.persistAppClassificationTopics( in testPersistAppClassificationTopics_nullTopicsMap() 157 mTopicsDao.persistTopTopics(/* epochId = */ 1L, topTopics); in testGetTopTopicsAndPersistTopics() 159 List<Topic> topicsFromDb = mTopicsDao.retrieveTopTopics(/* epochId = */ 1L); in testGetTopTopicsAndPersistTopics() 178 mTopicsDao.persistTopTopics(/* epochId = */ 1L, topTopics); in testGetTopTopicsAndPersistTopics_notFoundEpochId() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/topics/ |
D | AppUpdateManagerTest.java | 81 private TopicsDao mTopicsDao; field in AppUpdateManagerTest 96 mTopicsDao = new TopicsDao(mDbHelper); in setup() 107 mAppUpdateManager = new AppUpdateManager(mDbHelper, mTopicsDao, new Random(), mMockFlags); in setup() 136 mTopicsDao.persistAppClassificationTopics(epochId1, appClassificationTopicsMap1); in testReconcileUninstalledApps() 138 assertThat(mTopicsDao.retrieveAppClassificationTopics(epochId1).keySet()) in testReconcileUninstalledApps() 144 mTopicsDao.recordUsageHistory(epochId1, app1, EMPTY_SDK); in testReconcileUninstalledApps() 145 mTopicsDao.recordUsageHistory(epochId1, app1, sdk1); in testReconcileUninstalledApps() 146 mTopicsDao.recordUsageHistory(epochId1, app2, EMPTY_SDK); in testReconcileUninstalledApps() 147 mTopicsDao.recordUsageHistory(epochId1, app2, sdk1); in testReconcileUninstalledApps() 150 assertThat(mTopicsDao.retrieveAppSdksUsageMap(epochId1).keySet()) in testReconcileUninstalledApps() [all …]
|
D | BlockedTopicsManagerTest.java | 84 private final TopicsDao mTopicsDao = new TopicsDao(mDBHelper); field in BlockedTopicsManagerTest 169 assertThat(mTopicsDao.retrieveAllBlockedTopics()).hasSize(1); in testBlockUnblockRetrieveBlockedTopics_PpapiAndSystemServer() 170 assertThat(mTopicsDao.retrieveAllBlockedTopics().get(0)).isEqualTo(TOPIC); in testBlockUnblockRetrieveBlockedTopics_PpapiAndSystemServer() 176 assertThat(mTopicsDao.retrieveAllBlockedTopics()).isEmpty(); in testBlockUnblockRetrieveBlockedTopics_PpapiAndSystemServer() 444 mTopicsDao.recordBlockedTopic(TOPIC); in testMayMigratePpApiBlockedTopicsToSystemService() 446 mayMigratePpApiBlockedTopicsToSystemService(mSpyContext, mTopicsDao, mAdServicesManager); in testMayMigratePpApiBlockedTopicsToSystemService() 451 mayMigratePpApiBlockedTopicsToSystemService(mSpyContext, mTopicsDao, mAdServicesManager); in testMayMigratePpApiBlockedTopicsToSystemService() 461 mTopicsDao.recordBlockedTopic(TOPIC); in testMayClearPpApiBlockedTopics() 463 mayClearPpApiBlockedTopics(mSpyContext, mTopicsDao); in testMayClearPpApiBlockedTopics() 464 assertThat(mTopicsDao.retrieveAllBlockedTopics()).isEmpty(); in testMayClearPpApiBlockedTopics() [all …]
|
D | TopicsWorkerTest.java | 90 private TopicsDao mTopicsDao; field in TopicsWorkerTest 121 mTopicsDao = new TopicsDao(mDbHelper); in setup() 124 mTopicsDao, in setup() 131 mTopicsDao, in setup() 140 new AppUpdateManager(mDbHelper, mTopicsDao, new Random(), mMockFlags); in setup() 165 mTopicsDao.persistReturnedAppTopicsMap(numEpoch, returnedAppSdkTopicsMap); in testGetTopics() 229 mTopicsDao.persistReturnedAppTopicsMap(numEpoch, returnedAppSdkTopicsMap); in testGetTopics_enableEncryption_disablePlaintextTopics() 235 mTopicsDao.persistReturnedAppEncryptedTopicsMap(numEpoch, returnedEncryptedTopicsMap); in testGetTopics_enableEncryption_disablePlaintextTopics() 327 mTopicsDao.persistReturnedAppTopicsMap(numEpoch, returnedAppSdkTopicsMap); in testGetTopics_enableEncryption_featureOn() 333 mTopicsDao.persistReturnedAppEncryptedTopicsMap(numEpoch, returnedEncryptedTopicsMap); in testGetTopics_enableEncryption_featureOn() [all …]
|
D | CacheManagerTest.java | 93 private TopicsDao mTopicsDao; field in CacheManagerTest 126 mTopicsDao = new TopicsDao(dbHelper); in setup() 131 mTopicsDao, in setup() 138 mTopicsDao, in setup() 205 mTopicsDao.persistReturnedAppTopicsMap(/* epochId */ 1L, returnedAppSdkTopicsMap1); in testGetTopics() 223 mTopicsDao.persistReturnedAppTopicsMap(/* epochId */ 2L, returnedAppSdkTopicsMap2); in testGetTopics() 465 mTopicsDao.persistReturnedAppTopicsMap(/* epochId */ 1L, returnedAppSdkTopicsMap1); in testGetTopics_someTopicsBlocked() 483 mTopicsDao.persistReturnedAppTopicsMap(/* epochId */ 2L, returnedAppSdkTopicsMap2); in testGetTopics_someTopicsBlocked() 496 mTopicsDao.recordBlockedTopic(topic2); in testGetTopics_someTopicsBlocked() 497 mTopicsDao.recordBlockedTopic(topic4); in testGetTopics_someTopicsBlocked() [all …]
|
D | EpochManagerTest.java | 109 private TopicsDao mTopicsDao; field in EpochManagerTest 132 mTopicsDao = new TopicsDao(mDbHelper); in setup() 135 mTopicsDao, in setup() 241 mTopicsDao, in testSelectRandomTopic() 284 mTopicsDao, in testSelectRandomTopic_invalidSize_throw() 312 mTopicsDao, in testComputeReturnedAppTopics() 432 mTopicsDao.retrieveAppSdksUsageMap(mEpochManager.getCurrentEpochId()); in testRecordUsage() 450 mTopicsDao, in testGarbageCollectOutdatedEpochData() 480 mTopicsDao.persistTopTopics(epoch, topTopics); in testGarbageCollectOutdatedEpochData() 481 mTopicsDao.recordAppUsageHistory(epoch, appName); in testGarbageCollectOutdatedEpochData() [all …]
|
D | TopicsServiceImplTest.java | 160 private TopicsDao mTopicsDao; field in TopicsServiceImplTest 191 mTopicsDao = new TopicsDao(dbHelper); in setup() 194 mTopicsDao, in setup() 201 mTopicsDao, in setup() 211 new AppUpdateManager(dbHelper, mTopicsDao, new Random(), mMockFlags); in setup() 1139 mTopicsDao.persistReturnedAppTopicsMap(numEpoch, returnedAppSdkTopicsMap); in prepareAndPersistTopics()
|
/packages/modules/AdServices/adservices/tests/unittest/system-service/src/com/android/server/adservices/data/topics/ |
D | TopicsDaoTest.java | 42 private final TopicsDao mTopicsDao = new TopicsDao(mTopicsDBHelper); field in TopicsDaoTest 62 mTopicsDao.recordBlockedTopic(List.of(topicToBlock), user0); in testRecordBlockedTopicAndRetrieveBlockedTopics() 64 Set<Topic> blockedTopics = mTopicsDao.retrieveAllBlockedTopics(user0); in testRecordBlockedTopicAndRetrieveBlockedTopics() 71 assertThat(mTopicsDao.retrieveAllBlockedTopics(user1)).isEmpty(); in testRecordBlockedTopicAndRetrieveBlockedTopics() 74 assertThat(mTopicsDao.retrieveAllBlockedTopics(user2)).isEmpty(); in testRecordBlockedTopicAndRetrieveBlockedTopics() 83 mTopicsDao.recordBlockedTopic(List.of(topicToBlock, topicToBlock), user); in testRecordBlockedTopicAndRetrieveBlockedTopics_duplicateTopics() 84 mTopicsDao.recordBlockedTopic(List.of(topicToBlock), user); in testRecordBlockedTopicAndRetrieveBlockedTopics_duplicateTopics() 86 Set<Topic> blockedTopics = mTopicsDao.retrieveAllBlockedTopics(user); in testRecordBlockedTopicAndRetrieveBlockedTopics_duplicateTopics() 99 mTopicsDao.recordBlockedTopic(List.of(topicToBlock), user0); in testRecordBlockedTopicAndRemoveBlockedTopic() 100 mTopicsDao.recordBlockedTopic(List.of(topicToBlock), user1); in testRecordBlockedTopicAndRemoveBlockedTopic() [all …]
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/ |
D | AppUpdateManager.java | 92 private final TopicsDao mTopicsDao; field in AppUpdateManager 102 mTopicsDao = topicsDao; in AppUpdateManager() 326 mTopicsDao.retrieveReturnedTopics(currentEpochId - 1, numberOfLookBackEpochs); in assignTopicsToSdkForAppInstallation() 355 mTopicsDao.retrieveCallerCanLearnTopicsMap(epochId, numberOfLookBackEpochs); in assignTopicsToSdkForAppInstallation() 356 List<Topic> pastTopTopic = mTopicsDao.retrieveTopTopics(epochId); in assignTopicsToSdkForAppInstallation() 364 mTopicsDao.persistReturnedAppTopicsMap( in assignTopicsToSdkForAppInstallation() 432 mTopicsDao.deleteFromTableByColumn( 462 List<Topic> topTopics = mTopicsDao.retrieveTopTopics(epochId); 489 mTopicsDao.persistReturnedAppTopicsMap(epochId, Map.of(appOnlyCaller, assignedTopic)); 521 mTopicsDao.retrieveAppClassificationTopics(epochId); in handleTopTopicsWithoutContributors() [all …]
|
D | EpochManager.java | 115 private final TopicsDao mTopicsDao; field in EpochManager 138 mTopicsDao = topicsDao; in EpochManager() 193 mTopicsDao.retrieveAppSdksUsageMap(currentEpochId); in processEpoch() 204 mTopicsDao.persistAppClassificationTopics(currentEpochId, appClassificationTopicsMap); in processEpoch() 214 mTopicsDao.persistCallerCanLearnTopics(currentEpochId, callersCanLearnThisEpochMap); in processEpoch() 221 mTopicsDao.retrieveCallerCanLearnTopicsMap( in processEpoch() 245 mTopicsDao.persistTopTopics(currentEpochId, topTopics); in processEpoch() 254 mTopicsDao.persistTopicContributors(currentEpochId, topTopicsToContributorsMap); in processEpoch() 265 mTopicsDao.persistReturnedAppTopicsMap(currentEpochId, returnedAppSdkTopics); in processEpoch() 285 mTopicsDao.persistReturnedAppEncryptedTopicsMap( in processEpoch() [all …]
|
D | BlockedTopicsManager.java | 82 private final TopicsDao mTopicsDao; field in BlockedTopicsManager 102 mTopicsDao = topicsDao; in BlockedTopicsManager() 158 mTopicsDao.recordBlockedTopic(topic); in blockTopic() 165 mTopicsDao.recordBlockedTopic(topic); in blockTopic() 211 mTopicsDao.removeBlockedTopic(topic); in unblockTopic() 217 mTopicsDao.removeBlockedTopic(topic); in unblockTopic() 260 return mTopicsDao.retrieveAllBlockedTopics(); in retrieveAllBlockedTopics()
|
D | CacheManager.java | 88 private final TopicsDao mTopicsDao; field in CacheManager 122 mTopicsDao = topicsDao; in CacheManager() 167 mTopicsDao.retrieveReturnedTopics(currentEpochId, lookbackEpochs + 1); in loadCache() 175 mTopicsDao.retrieveReturnedEncryptedTopics(currentEpochId, lookbackEpochs + 1); in loadCache() 280 && mTopicsDao.supportsLoggedTopicInReturnedTopicTable()) { in getTopics() 303 && mTopicsDao.supportsLoggedTopicInReturnedTopicTable()) { in getTopics() 440 mTopicsDao.deleteAllTopicsTables(tablesToExclude); in clearAllTopicsData()
|
/packages/modules/AdServices/adservices/service/java/com/android/server/adservices/ |
D | BlockedTopicsManager.java | 37 private final TopicsDao mTopicsDao; field in BlockedTopicsManager 43 mTopicsDao = topicsDao; in BlockedTopicsManager() 57 mTopicsDao.recordBlockedTopic(blockedTopics, mUserIdentifier); in recordBlockedTopic() 67 mTopicsDao.removeBlockedTopic(blockedTopic, mUserIdentifier); in removeBlockedTopic() 77 for (Topic topic : mTopicsDao.retrieveAllBlockedTopics(mUserIdentifier)) { in retrieveAllBlockedTopics() 91 mTopicsDao.clearAllBlockedTopicsOfUser(mUserIdentifier); in clearAllBlockedTopics()
|
D | UserInstanceManager.java | 65 private final TopicsDao mTopicsDao; field in UserInstanceManager 68 mTopicsDao = topicsDao; in UserInstanceManager() 104 instance = new BlockedTopicsManager(mTopicsDao, userIdentifier); in getOrCreateUserBlockedTopicsManagerInstance() 153 mTopicsDao.clearAllBlockedTopicsOfUser(userIdentifier); in deleteUserInstance() 162 mTopicsDao.dump(writer, prefix, args); in dump()
|
/packages/modules/AdServices/adservices/tests/unittest/system-service/src/com/android/server/adservices/ |
D | UserInstanceManagerTest.java | 56 private TopicsDao mTopicsDao; field in UserInstanceManagerTest 64 mTopicsDao = new TopicsDao(mDBHelper); in setup() 65 mUserInstanceManager = new UserInstanceManager(mTopicsDao, TEST_BASE_PATH); in setup() 217 mTopicsDao.recordBlockedTopic(List.of(topicToBlock1), user0); in testDeleteAllDataWhenDeletingUserInstance() 218 mTopicsDao.recordBlockedTopic(List.of(topicToBlock2), user0); in testDeleteAllDataWhenDeletingUserInstance() 219 mTopicsDao.recordBlockedTopic(List.of(topicToBlock1), user1); in testDeleteAllDataWhenDeletingUserInstance() 221 Set<Topic> blockedTopics0 = mTopicsDao.retrieveAllBlockedTopics(user0); in testDeleteAllDataWhenDeletingUserInstance() 222 Set<Topic> blockedTopics1 = mTopicsDao.retrieveAllBlockedTopics(user1); in testDeleteAllDataWhenDeletingUserInstance() 233 assertThat(mTopicsDao.retrieveAllBlockedTopics(user0)).isEmpty(); in testDeleteAllDataWhenDeletingUserInstance()
|