Home
last modified time | relevance | path

Searched refs:epochId (Results 1 – 12 of 12) sorted by relevance

/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/
DAppUpdateManager.java338 for (long epochId = currentEpochId - 1; in assignTopicsToSdkForAppInstallation()
339 epochId >= currentEpochId - numberOfLookBackEpochs && epochId >= 0; in assignTopicsToSdkForAppInstallation()
340 epochId--) { in assignTopicsToSdkForAppInstallation()
345 if (pastReturnedTopics.get(epochId) != null in assignTopicsToSdkForAppInstallation()
346 && pastReturnedTopics.get(epochId).containsKey(appOnlyCaller)) { in assignTopicsToSdkForAppInstallation()
348 Topic appReturnedTopic = pastReturnedTopics.get(epochId).get(appOnlyCaller); in assignTopicsToSdkForAppInstallation()
355 mTopicsDao.retrieveCallerCanLearnTopicsMap(epochId, numberOfLookBackEpochs); in assignTopicsToSdkForAppInstallation()
356 List<Topic> pastTopTopic = mTopicsDao.retrieveTopTopics(epochId); in assignTopicsToSdkForAppInstallation()
365 epochId, Map.of(appSdkCaller, appReturnedTopic)); in assignTopicsToSdkForAppInstallation()
459 for (long epochId = currentEpochId - 1;
[all …]
DCacheManager.java239 long epochId = currentEpochId - 1; in getTopics() local
248 if (mCachedTopics.containsKey(epochId - numEpoch)) { in getTopics()
249 Topic topic = mCachedTopics.get(epochId - numEpoch).get(Pair.create(app, sdk)); in getTopics()
264 if (mCachedEncryptedTopics.containsKey(epochId - numEpoch)) { in getTopics()
267 .get(epochId - numEpoch) in getTopics()
364 for (long epochId = epochLowerBound; epochId <= epochUpperBound; epochId++) { in getTopicsInEpochRange()
365 if (mCachedTopics.containsKey(epochId)) { in getTopicsInEpochRange()
366 Topic topic = mCachedTopics.get(epochId).get(Pair.create(app, sdk)); in getTopicsInEpochRange()
391 long epochId = currentEpochId - 1; in getKnownTopicsWithConsent() local
398 if (mCachedTopics.containsKey(epochId - numEpoch)) { in getKnownTopicsWithConsent()
[all …]
DEpochManager.java331 long epochId = getCurrentEpochId(); in recordUsageHistory() local
335 epochId, app, sdk); in recordUsageHistory()
336 mTopicsDao.recordUsageHistory(epochId, app, sdk); in recordUsageHistory()
337 mTopicsDao.recordAppUsageHistory(epochId, app); in recordUsageHistory()
628 long epochId = getCurrentEpochId(); in dump() local
629 writer.println(String.format("Current epochId is %d", epochId)); in dump()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/topics/
DAppUpdateManagerTest.java371 final long epochId = 1L; in testGetUnhandledUninstalledApps() local
375 mTopicsDao.recordAppUsageHistory(epochId, "app1"); in testGetUnhandledUninstalledApps()
376 mTopicsDao.recordAppUsageHistory(epochId, "app3"); in testGetUnhandledUninstalledApps()
380 epochId, in testGetUnhandledUninstalledApps()
401 final long epochId = 10L; in testGetUnhandledInstalledApps() local
405 mTopicsDao.recordAppUsageHistory(epochId, "app1"); in testGetUnhandledInstalledApps()
406 mTopicsDao.recordAppUsageHistory(epochId, "app5"); in testGetUnhandledInstalledApps()
410 epochId, in testGetUnhandledInstalledApps()
547 final long epochId = 1L; in testDeleteAppDataFromTableByApps_encryptedTopicsTable() local
563 mTopicsDao.persistReturnedAppTopicsMap(epochId, returnedAppSdkTopics); in testDeleteAppDataFromTableByApps_encryptedTopicsTable()
[all …]
DEpochManagerTest.java550 final long epochId = 1L; in testGarbageCollectOutdatedEpochData_encryptedTopicsTable() local
565 mTopicsDao.persistReturnedAppTopicsMap(epochId, returnedAppSdkTopics); in testGarbageCollectOutdatedEpochData_encryptedTopicsTable()
570 mTopicsDao.persistReturnedAppEncryptedTopicsMap(epochId, encryptedTopics); in testGarbageCollectOutdatedEpochData_encryptedTopicsTable()
576 assertThat(mTopicsDao.retrieveReturnedTopics(epochId, numberOfLookBackEpochs)).isEmpty(); in testGarbageCollectOutdatedEpochData_encryptedTopicsTable()
580 .retrieveReturnedEncryptedTopics(epochId, numberOfLookBackEpochs) in testGarbageCollectOutdatedEpochData_encryptedTopicsTable()
581 .get(epochId)) in testGarbageCollectOutdatedEpochData_encryptedTopicsTable()
588 assertThat(mTopicsDao.retrieveReturnedTopics(epochId, numberOfLookBackEpochs)).isEmpty(); in testGarbageCollectOutdatedEpochData_encryptedTopicsTable()
590 assertThat(mTopicsDao.retrieveReturnedEncryptedTopics(epochId, numberOfLookBackEpochs)) in testGarbageCollectOutdatedEpochData_encryptedTopicsTable()
626 final long epochId = 1L; in testProcessEpoch() local
627 doReturn(epochId).when(epochManager).getCurrentEpochId(); in testProcessEpoch()
[all …]
DTopicsWorkerTest.java153 final long epochId = 4L; in testGetTopics() local
168 when(mMockEpochManager.getCurrentEpochId()).thenReturn(epochId); in testGetTopics()
201 final long epochId = 4L; in testGetTopics_enableEncryption_disablePlaintextTopics() local
238 when(mMockEpochManager.getCurrentEpochId()).thenReturn(epochId); in testGetTopics_enableEncryption_disablePlaintextTopics()
299 final long epochId = 4L; in testGetTopics_enableEncryption_featureOn() local
336 when(mMockEpochManager.getCurrentEpochId()).thenReturn(epochId); in testGetTopics_enableEncryption_featureOn()
396 final long epochId = 4L; in testGetTopics_enableEncryption_featureOff() local
433 when(mMockEpochManager.getCurrentEpochId()).thenReturn(epochId); in testGetTopics_enableEncryption_featureOff()
484 final long epochId = 4L; in testGetTopics_emptyCache() local
486 when(mMockEpochManager.getCurrentEpochId()).thenReturn(epochId); in testGetTopics_emptyCache()
[all …]
DCacheManagerTest.java1806 for (long epochId : new long[] {epochId1, epochId2}) { in testClearAllTopicsData()
1809 mTopicsDao.recordUsageHistory(epochId, app, sdk); in testClearAllTopicsData()
1810 mTopicsDao.recordAppUsageHistory(epochId, app); in testClearAllTopicsData()
1813 epochId, Map.of(Pair.create(app, sdk), topic1)); in testClearAllTopicsData()
1815 epochId, Map.of(Pair.create(app, sdk), topic2)); in testClearAllTopicsData()
1819 epochId, in testClearAllTopicsData()
1826 mTopicsDao.persistCallerCanLearnTopics(epochId, Map.of(topic1, Set.of(app1, sdk1))); in testClearAllTopicsData()
1827 mTopicsDao.persistCallerCanLearnTopics(epochId, Map.of(topic2, Set.of(app2, sdk2))); in testClearAllTopicsData()
1830 epochId, List.of(topic1, topic2, topic3, topic4, topic5, topic6)); in testClearAllTopicsData()
1838 for (long epochId : new long[] {epochId1, epochId2}) { in testClearAllTopicsData()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/topics/
DTopicsDaoTest.java209 long epochId = 1L; in testGetTopTopicsAndPersistTopics_multiPersistWithSameEpoch() local
218 mTopicsDao.persistTopTopics(epochId, topTopics); in testGetTopTopicsAndPersistTopics_multiPersistWithSameEpoch()
220 mTopicsDao.persistTopTopics(epochId, topTopics); in testGetTopTopicsAndPersistTopics_multiPersistWithSameEpoch()
227 assertThat(mTopicsDao.retrieveTopTopics(epochId)).isEqualTo(expectedTopTopics); in testGetTopTopicsAndPersistTopics_multiPersistWithSameEpoch()
229 assertThat(mTopicsDao.retrieveTopTopics(epochId + 1)).isEmpty(); in testGetTopTopicsAndPersistTopics_multiPersistWithSameEpoch()
798 .map(epochId -> Topic.create(epochId, TAXONOMY_VERSION, MODEL_VERSION)) in testEraseDataOfOldEpochs()
802 .map(epochId -> Topic.create(epochId, TAXONOMY_VERSION, MODEL_VERSION)) in testEraseDataOfOldEpochs()
806 .map(epochId -> Topic.create(epochId, TAXONOMY_VERSION, MODEL_VERSION)) in testEraseDataOfOldEpochs()
810 .map(epochId -> Topic.create(epochId, TAXONOMY_VERSION, MODEL_VERSION)) in testEraseDataOfOldEpochs()
886 for (long epochId : new long[] {epochId1, epochId2}) { in testDeleteAllTopicsTables()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/topics/
DTopicsDao.java116 long epochId, Map<String, List<Topic>> appClassificationTopicsMap) { in persistAppClassificationTopics() argument
130 values.put(TopicsTables.AppClassificationTopicsContract.EPOCH_ID, epochId); in persistAppClassificationTopics()
162 public Map<String, List<Topic>> retrieveAppClassificationTopics(long epochId) { in retrieveAppClassificationTopics() argument
177 String[] selectionArgs = {String.valueOf(epochId)}; in retrieveAppClassificationTopics()
225 public void persistTopTopics(long epochId, List<Topic> topTopics) { in persistTopTopics() argument
237 values.put(TopicsTables.TopTopicsContract.EPOCH_ID, epochId); in persistTopTopics()
270 public List<Topic> retrieveTopTopics(long epochId) { in retrieveTopTopics() argument
288 String[] selectionArgs = {String.valueOf(epochId)}; in retrieveTopTopics()
353 public void recordUsageHistory(long epochId, String app, String sdk) { in recordUsageHistory() argument
366 values.put(TopicsTables.UsageHistoryContract.EPOCH_ID, epochId); in recordUsageHistory()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/topics/migration/
DTopicsDbMigratorV9Test.java112 final long epochId = 1; in testDbMigrationFromV8ToV9() local
120 topicsDao.persistReturnedAppEncryptedTopicsMap(epochId, appSdkEncryptedTopics); in testDbMigrationFromV8ToV9()
124 epochId, /* numberOfLookBackEpochs */ 1) in testDbMigrationFromV8ToV9()
125 .get(epochId)) in testDbMigrationFromV8ToV9()
136 epochId, /* numberOfLookBackEpochs */ 1)) in testDbMigrationFromV8ToV9()
DTopicsDbMigratorV7Test.java110 final long epochId = 1; in testDbMigrationFromV6ToV7() local
112 topicsDao.persistTopicContributors(epochId, topicContributorsMap); in testDbMigrationFromV6ToV7()
113 assertThat(topicsDao.retrieveTopicToContributorsMap(epochId)) in testDbMigrationFromV6ToV7()
122 assertThat(topicsDao.retrieveTopicToContributorsMap(epochId)).isEmpty(); in testDbMigrationFromV6ToV7()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DPackageChangedReceiverTest.java518 long epochId = 1; in runPackageFullyRemovedForTopicsKillSwitchOff() local
528 doReturn(epochId).when(mMockEpochManager).getCurrentEpochId(); in runPackageFullyRemovedForTopicsKillSwitchOff()
542 .handleAppUninstallationInRealTime(Uri.parse(SAMPLE_PACKAGE), epochId); in runPackageFullyRemovedForTopicsKillSwitchOff() local