Home
last modified time | relevance | path

Searched refs:topic (Results 1 – 25 of 74) sorted by relevance

123

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/topics/
DEncryptionManagerTest.java143 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_success() local
146 mEncryptionManager.encryptTopic(topic, SDK_NAME); in testEncryption_success()
169 assertThat(returnedTopic).isEqualTo(topic); in testEncryption_success()
178 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_verifyLatestKeys() local
181 mEncryptionManager.encryptTopic(topic, SDK_NAME); in testEncryption_verifyLatestKeys()
195 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_useTestingKeys() local
198 mEncryptionManager.encryptTopic(topic, SDK_NAME); in testEncryption_useTestingKeys()
215 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_missingKeys() local
218 mEncryptionManager.encryptTopic(topic, SDK_NAME); in testEncryption_missingKeys()
234 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_incompatibleKeys() local
[all …]
DHpkeEncrypterTest.java60 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_success() local
61 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_success()
80 assertThat(returnedTopic).isEqualTo(topic); in testEncryption_success()
86 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_invalidKeyLength_returnsEmpty() local
87 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_invalidKeyLength_returnsEmpty()
114 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_nullPublicKey_throwsException() local
115 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_nullPublicKey_throwsException()
124 Topic topic = Topic.create(/* topic */ 5, /* taxonomyVersion */ 6L, /* modelVersion */ 7L); in testEncryption_nullContextInfo_throwsException() local
125 byte[] plainText = generateTopicsPlainText(topic); in testEncryption_nullContextInfo_throwsException()
134 private byte[] generateTopicsPlainText(Topic topic) { in generateTopicsPlainText() argument
[all …]
DAppUpdateManagerTest.java678 for (Topic topic : topTopics) { in testReconcileInstalledApps()
680 epochId, Map.of(topic.getTopic(), Set.of(app1, app2))); in testReconcileInstalledApps()
841 for (Topic topic : topTopics) { in testAssignTopicsToNewlyInstalledApps()
843 epochId, Map.of(topic.getTopic(), Set.of(appName))); in testAssignTopicsToNewlyInstalledApps()
889 Topic topic = topics[(int) (currentEpochId - 1 - epochId)]; in testAssignTopicsToSdkForAppInstallation() local
892 mTopicsDao.persistReturnedAppTopicsMap(epochId, Map.of(appOnlyCaller, topic)); in testAssignTopicsToSdkForAppInstallation()
899 earliestEpochIdToLearnFrom, Map.of(topic, Set.of(sdk))); in testAssignTopicsToSdkForAppInstallation()
917 Topic topic = topics[(int) (currentEpochId - 1 - epochId)]; in testAssignTopicsToSdkForAppInstallation() local
919 expectedReturnedTopics.put(epochId, Map.of(appSdkCaller, topic, appOnlyCaller, topic)); in testAssignTopicsToSdkForAppInstallation()
947 Topic topic = topics[(int) (currentEpochId - 1 - epochId)]; in testAssignTopicsToSdkForAppInstallation_NonSdk() local
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/topics/
DTopic.java77 int topic, in create() argument
80 return builder().setTopic(topic) in create()
98 int topic, in create() argument
102 return builder().setTopic(topic) in create()
114 public abstract Builder setTopic(int topic); in setTopic() argument
161 Topic topic = (Topic) object; in equals() local
164 return getTopic() == topic.getTopic() in equals()
165 && getModelVersion() == topic.getModelVersion() in equals()
166 && getTaxonomyVersion() == topic.getTaxonomyVersion(); in equals()
DTopicsDao.java128 for (Topic topic : entry.getValue()) { in persistAppClassificationTopics()
134 topic.getTaxonomyVersion()); in persistAppClassificationTopics()
137 topic.getModelVersion()); in persistAppClassificationTopics()
138 values.put(TopicsTables.AppClassificationTopicsContract.TOPIC, topic.getTopic()); in persistAppClassificationTopics()
208 Topic topic = Topic.create(topicId, taxonomyVersion, modelVersion); in retrieveAppClassificationTopics() local
211 list.add(topic); in retrieveAppClassificationTopics()
565 Topic topic = entry.getKey(); in persistCallerCanLearnTopics() local
571 values.put(TopicsTables.CallerCanLearnTopicsContract.TOPIC, topic.getTopic()); in persistCallerCanLearnTopics()
575 topic.getTaxonomyVersion()); in persistCallerCanLearnTopics()
578 topic.getModelVersion()); in persistCallerCanLearnTopics()
[all …]
DCombinedTopic.java49 public static CombinedTopic create(Topic topic, EncryptedTopic encryptedTopic) { in create() argument
50 Objects.requireNonNull(topic); in create()
53 return builder().setTopic(topic).setEncryptedTopic(encryptedTopic).build(); in create()
68 public abstract CombinedTopic.Builder setTopic(Topic topic); in setTopic() argument
/packages/modules/AdServices/adservices/tests/cts/endtoends/topics/src/com/android/adservices/tests/cts/topics/
DTopicsManagerTest.java204 Topic topic = sdk5Result.getTopics().get(0); in testTopicsManager_testOnDeviceKillSwitch_shouldUsePrecomputedList() local
209 .that(topic.getModelVersion()) in testTopicsManager_testOnDeviceKillSwitch_shouldUsePrecomputedList()
212 .that(topic.getTaxonomyVersion()) in testTopicsManager_testOnDeviceKillSwitch_shouldUsePrecomputedList()
218 assertThat(topic.getTopicId()).isIn(expectedTopTopicIds); in testTopicsManager_testOnDeviceKillSwitch_shouldUsePrecomputedList()
271 Topic topic = sdk1Result.getTopics().get(0); in testTopicsManager_runDefaultClassifier() local
276 .that(topic.getModelVersion()) in testTopicsManager_runDefaultClassifier()
279 .that(topic.getTaxonomyVersion()) in testTopicsManager_runDefaultClassifier()
283 assertThat(topic.getTopicId()).isIn(Arrays.asList(10175, 10147, 10254, 10333, 10253)); in testTopicsManager_runDefaultClassifier()
352 Topic topic = sdk3Result.getTopics().get(0); in testTopicsManager_runOnDeviceClassifier() local
357 .that(topic.getModelVersion()) in testTopicsManager_runOnDeviceClassifier()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/cobalt/
DTopicsCobaltLogger.java62 for (Topic topic : topics) { in logTopicOccurrences()
63 logTopicOccurrences(topic, /* count= */ 1); in logTopicOccurrences()
72 public void logTopicOccurrence(Topic topic) { in logTopicOccurrence() argument
73 logTopicOccurrences(topic, /* count= */ 1); in logTopicOccurrence()
81 public void logTopicOccurrences(Topic topic, int count) { in logTopicOccurrences() argument
86 LOGGABLE_TOPICS_RANGE.contains(topic.getTopic()) in logTopicOccurrences()
87 ? topic.getTopic() - TOPICS_OFFSET in logTopicOccurrences()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/
DCacheManager.java249 Topic topic = mCachedTopics.get(epochId - numEpoch).get(Pair.create(app, sdk)); in getTopics() local
251 if (topic != null) { in getTopics()
252 if (topics.contains(topic)) { in getTopics()
256 if (isTopicIdBlocked(topic.getTopic())) { in getTopics()
274 topics.add(topic); in getTopics()
276 CombinedTopic combinedTopic = CombinedTopic.create(topic, encryptedTopic); in getTopics()
282 if (topic != null) { in getTopics()
284 if (topicIdsForLogging.contains(topic.getLoggedTopic())) { in getTopics()
287 if (isTopicIdBlocked(topic.getLoggedTopic())) { in getTopics()
290 topicIdsForLogging.add(topic.getLoggedTopic()); in getTopics()
[all …]
DBlockedTopicsManager.java151 public void blockTopic(@NonNull Topic topic) { in blockTopic() argument
158 mTopicsDao.recordBlockedTopic(topic); in blockTopic()
162 List.of(topic.convertTopicToTopicParcel())); in blockTopic()
165 mTopicsDao.recordBlockedTopic(topic); in blockTopic()
167 List.of(topic.convertTopicToTopicParcel())); in blockTopic()
171 mAppSearchConsentManager.blockTopic(topic); in blockTopic()
204 public void unblockTopic(@NonNull Topic topic) { in unblockTopic() argument
211 mTopicsDao.removeBlockedTopic(topic); in unblockTopic()
214 mAdServicesManager.removeBlockedTopic(topic.convertTopicToTopicParcel()); in unblockTopic()
217 mTopicsDao.removeBlockedTopic(topic); in unblockTopic()
[all …]
DTopicsJsonMapper.java61 public static Optional<JSONObject> toJson(Topic topic) { in toJson() argument
65 .put(KEY_TOPIC_ID, topic.getTopic()) in toJson()
66 .put(KEY_MODEL_VERSION, topic.getModelVersion()) in toJson()
67 .put(KEY_TAXONOMY_VERSION, topic.getTaxonomyVersion())); in toJson()
73 sLogger.e("JSON serialization failed for %s", topic); in toJson()
DTopicsMapper.java37 public static int getResourceIdByTopic(Topic topic, Context context) { in getResourceIdByTopic() argument
40 String.format(Locale.ENGLISH, "topic%d", topic.getTopic()), in getResourceIdByTopic()
53 .map(topic -> getResourceIdByTopic(topic, context)) in getResourcesIdMapByTopicsList()
DEpochManager.java353 @NonNull Topic topic, in isTopicLearnableByCaller()
359 int index = topTopics.lastIndexOf(topic); in isTopicLearnableByCaller()
365 return callersCanLearnMap.containsKey(topic) in isTopicLearnableByCaller()
366 && callersCanLearnMap.get(topic).contains(caller); in isTopicLearnableByCaller()
422 for (Topic topic : appTopics) { in computeCallersCanLearnMap()
423 if (!callersCanLearnMap.containsKey(topic)) { in computeCallersCanLearnMap()
424 callersCanLearnMap.put(topic, new HashSet<>()); in computeCallersCanLearnMap()
433 callersCanLearnMap.get(topic).add(app); in computeCallersCanLearnMap()
436 callersCanLearnMap.get(topic).add(sdk); in computeCallersCanLearnMap()
605 for (Topic topic : appTopics.getValue()) { in computeTopTopicsToContributorsMap()
[all …]
DEncryptionManager.java104 public Optional<EncryptedTopic> encryptTopic(Topic topic, String sdkName) { in encryptTopic() argument
106 encryptTopicWithKey(topic, fetchPublicKeyFor(sdkName)); in encryptTopic()
107 sLogger.v("Encrypted topic for %s is %s", topic, encryptedTopicOptional); in encryptTopic()
150 private Optional<EncryptedTopic> encryptTopicWithKey(Topic topic, Optional<String> publicKey) { in encryptTopicWithKey() argument
151 Objects.requireNonNull(topic); in encryptTopicWithKey()
153 Optional<JSONObject> optionalTopicJSON = TopicsJsonMapper.toJson(topic); in encryptTopicWithKey()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsearch/
DAppSearchTopicsConsentDao.java236 public void addBlockedTopic(@NonNull Topic topic) { in addBlockedTopic() argument
237 Objects.requireNonNull(topic); in addBlockedTopic()
241 if (mBlockedTopics.get(i).equals(topic.getTopic()) in addBlockedTopic()
242 && mBlockedTopicsTaxonomyVersions.get(i).equals(topic.getTaxonomyVersion()) in addBlockedTopic()
243 && mBlockedTopicsModelVersions.get(i).equals(topic.getModelVersion())) { in addBlockedTopic()
247 mBlockedTopics.add(topic.getTopic()); in addBlockedTopic()
248 mBlockedTopicsTaxonomyVersions.add(topic.getTaxonomyVersion()); in addBlockedTopic()
249 mBlockedTopicsModelVersions.add(topic.getModelVersion()); in addBlockedTopic()
253 public void removeBlockedTopic(@NonNull Topic topic) { in removeBlockedTopic() argument
254 Objects.requireNonNull(topic); in removeBlockedTopic()
[all …]
/packages/modules/AdServices/adservices/tests/cts/sandbox/topics/providers/sdk1/src/com/android/tests/providers/sdk1/
DSdk1.java66 Topic topic = response.getTopics().get(0); in onLoadSdk() local
68 TOPIC_ID_SET.contains(topic.getTopicId()) in onLoadSdk()
69 && topic.getTaxonomyVersion() == TAXONOMY_VERSION in onLoadSdk()
70 && topic.getModelVersion() == MODEL_VERSION; in onLoadSdk()
75 Log.i(TAG, "Got correct returned topic: " + topic.getTopicId()); in onLoadSdk()
84 topic.getTopicId(), in onLoadSdk()
85 topic.getTaxonomyVersion(), in onLoadSdk()
86 topic.getModelVersion()); in onLoadSdk()
/packages/modules/AdServices/adservices/service/java/com/android/server/adservices/data/topics/
DTopicsDao.java83 for (Topic topic : topics) { in recordBlockedTopic()
86 values.put(TopicsTables.BlockedTopicsContract.TOPIC, topic.getTopicId()); in recordBlockedTopic()
89 topic.getTaxonomyVersion()); in recordBlockedTopic()
109 public void removeBlockedTopic(@NonNull Topic topic, int userIdentifier) { in removeBlockedTopic() argument
110 Objects.requireNonNull(topic); in removeBlockedTopic()
128 String.valueOf(topic.getTopicId()), in removeBlockedTopic()
129 String.valueOf(topic.getTaxonomyVersion()) in removeBlockedTopic()
177 Topic topic = new Topic(taxonomyVersion, DUMMY_MODEL_VERSION, topicInt); in retrieveAllBlockedTopics() local
179 blockedTopics.add(topic); in retrieveAllBlockedTopics()
/packages/modules/AdServices/adservices/apk/java/com/android/adservices/ui/settings/activitydelegates/
DBlockedTopicsActivityActionDelegate.java84 topic -> in configureSharedElements()
87 topic); in configureSharedElements()
105 Topic topic = eventTopicPair.second; in listenToBlockedTopicsViewModelUiEvents()
112 mBlockedTopicsViewModel.restoreTopicConsent(topic); in listenToBlockedTopicsViewModelUiEvents()
115 DialogFragmentManager.showUnblockTopicDialog(mActivity, topic); in listenToBlockedTopicsViewModelUiEvents()
117 DialogManager.showUnblockTopicDialog(mActivity, topic); in listenToBlockedTopicsViewModelUiEvents()
DTopicsActivityActionDelegate.java122 topic -> view -> mTopicsViewModel.revokeTopicConsentButtonClickHandler(topic); in configureSharedElements()
165 Topic topic = eventTopicPair.second; in listenToTopicsViewModelUiEvents()
192 mActivity, mTopicsViewModel, topic); in listenToTopicsViewModelUiEvents()
195 mActivity, mTopicsViewModel, topic); in listenToTopicsViewModelUiEvents()
198 mTopicsViewModel.revokeTopicConsent(topic); in listenToTopicsViewModelUiEvents()
/packages/modules/AdServices/adservices/framework/java/android/adservices/topics/
DTopic.java58 Topic topic = (Topic) object; in equals()
59 return getTaxonomyVersion() == topic.getTaxonomyVersion() in equals()
60 && getModelVersion() == topic.getModelVersion() in equals()
61 && getTopicId() == topic.getTopicId(); in equals()
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsearch/src/com/android/adservices/service/appsearch/
DAppSearchTopicsConsentDaoTest.java152 Topic topic = Topic.create(5, 6L, 7L); in testAddTopic_null() local
153 dao.addBlockedTopic(topic); in testAddTopic_null()
169 Topic topic = Topic.create(5, 6L, 7L); in testAddTopic() local
174 dao.addBlockedTopic(topic); in testAddTopic()
190 Topic topic = Topic.create(5, 6L, 7L); in testRemoveTopic_notExists() local
191 dao.removeBlockedTopic(topic); in testRemoveTopic_notExists()
211 Topic topic = Topic.create(0, 1L, 11L); in testRemoveTopic() local
212 dao.removeBlockedTopic(topic); in testRemoveTopic()
/packages/modules/AdServices/adservices/service/java/com/android/server/adservices/
DBlockedTopicsManager.java77 for (Topic topic : mTopicsDao.retrieveAllBlockedTopics(mUserIdentifier)) { in retrieveAllBlockedTopics()
80 .setModelVersion(topic.getModelVersion()) in retrieveAllBlockedTopics()
81 .setTaxonomyVersion(topic.getTaxonomyVersion()) in retrieveAllBlockedTopics()
82 .setTopicId(topic.getTopicId()) in retrieveAllBlockedTopics()
/packages/modules/AdServices/adservices/apk/java/com/android/adservices/ui/settings/viewmodels/
DBlockedTopicsViewModel.java84 public void restoreTopicConsent(Topic topic) { in restoreTopicConsent() argument
85 mConsentManager.restoreConsentForTopic(topic); in restoreTopicConsent()
117 public void restoreTopicConsentButtonClickHandler(Topic topic) { in restoreTopicConsentButtonClickHandler() argument
118 mEventTrigger.postValue(new Pair<>(BlockedTopicsViewModelUiEvent.RESTORE_TOPIC, topic)); in restoreTopicConsentButtonClickHandler()
/packages/modules/AdServices/adservices/apk/java/com/android/adservices/ui/settings/delegates/
DBlockedTopicsActionDelegate.java59 Topic topic = eventTopicPair.second; in listenToBlockedTopicsViewModelUiEvents()
66 mBlockedTopicsViewModel.restoreTopicConsent(topic); in listenToBlockedTopicsViewModelUiEvents()
70 mBlockedTopicsActivity, topic); in listenToBlockedTopicsViewModelUiEvents()
73 mBlockedTopicsActivity, topic); in listenToBlockedTopicsViewModelUiEvents()
/packages/modules/AdServices/adservices/apk/java/com/android/adservices/ui/settings/viewadatpors/
DTopicsListViewAdapter.java106 Topic topic, in initTopicItem() argument
108 int resourceId = TopicsMapper.getResourceIdByTopic(topic, context); in initTopicItem()
111 String.format("Android resource id for topic %s doesn't exist.", topic)); in initTopicItem()
119 mOptionButtonView.setOnClickListener(getOnclickListener.apply(topic)); in initTopicItem()

123