Home
last modified time | relevance | path

Searched refs:ConsentConstants (Results 1 – 22 of 22) sorted by relevance

/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/consent/
DAppConsentStorageManager.java193 mDatastore.get(ConsentConstants.MANUAL_INTERACTION_WITH_CONSENT_RECORDED); in getUserManualInteractionWithConsent()
218 return Objects.requireNonNullElse(mDatastore.get(ConsentConstants.IS_AD_ID_ENABLED), false); in isAdIdEnabled()
224 mDatastore.put(ConsentConstants.IS_AD_ID_ENABLED, isAdIdEnabled); in setAdIdEnabled()
230 return Objects.requireNonNullElse(mDatastore.get(ConsentConstants.IS_ADULT_ACCOUNT), false); in isAdultAccount()
236 mDatastore.put(ConsentConstants.IS_ADULT_ACCOUNT, isAdultAccount); in setAdultAccount()
265 mDatastore.get(ConsentConstants.IS_ENTRY_POINT_ENABLED), false); in isEntryPointEnabled()
271 mDatastore.put(ConsentConstants.IS_ENTRY_POINT_ENABLED, isEntryPointEnabled); in setEntryPointEnabled()
277 return Objects.requireNonNullElse(mDatastore.get(ConsentConstants.IS_U18_ACCOUNT), false); in isU18Account()
283 mDatastore.put(ConsentConstants.IS_U18_ACCOUNT, isU18Account); in setU18Account()
292 mDatastore.put(ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_ONCE, wasGaUxDisplayed); in recordGaUxNotificationDisplayed()
[all …]
DConsentManager.java346 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in enable()
378 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in disable()
422 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in enable()
449 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in disable()
487 () -> AdServicesApiConsent.getConsent(mDatastore.get(ConsentConstants.CONSENT_KEY)), in getConsent()
494 ConsentConstants.CONSENT_KEY_FOR_ALL)), in getConsent()
924 LogUtil.e(ConsentConstants.ERROR_MESSAGE_INVALID_CONSENT_SOURCE_OF_TRUTH);
997 LogUtil.e(ConsentConstants.ERROR_MESSAGE_INVALID_CONSENT_SOURCE_OF_TRUTH);
1090 ConsentConstants.NOTIFICATION_DISPLAYED_ONCE,
1117 () -> mDatastore.get(ConsentConstants.NOTIFICATION_DISPLAYED_ONCE),
[all …]
DConsentManagerV2.java218 LogUtil.e(ConsentConstants.ERROR_MESSAGE_INVALID_CONSENT_SOURCE_OF_TRUTH); in getStorageListBySourceOfTruth()
363 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in enable()
389 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in disable()
428 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in enable()
451 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_WHILE_SET_CONTENT, e); in disable()
834 ConsentConstants.STORAGE_XML_IDENTIFIER, in createAndInitializeDataStore()
835 ConsentConstants.STORAGE_VERSION); in createAndInitializeDataStore()
842 if (booleanFileDatastore.get(ConsentConstants.NOTIFICATION_DISPLAYED_ONCE) == null) { in createAndInitializeDataStore()
843 booleanFileDatastore.put(ConsentConstants.NOTIFICATION_DISPLAYED_ONCE, false); in createAndInitializeDataStore()
845 if (booleanFileDatastore.get(ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_ONCE) in createAndInitializeDataStore()
[all …]
DAdExtDataConsentMigrationUtilsV2.java76 context, ConsentConstants.SHARED_PREFS_CONSENT, Context.MODE_PRIVATE); in handleConsentMigrationFromAdExtDataIfNeededV2()
240 ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED, in isMigrationDone()
243 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED, /* defValue= */ false) in isMigrationDone()
245 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH, in isMigrationDone()
248 ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER, in isMigrationDone()
261 ? ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER in getSharedPrefMigrationKey()
262 : ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH; in getSharedPrefMigrationKey()
DAdExtDataConsentMigrationUtils.java77 context, ConsentConstants.SHARED_PREFS_CONSENT, Context.MODE_PRIVATE); in handleConsentMigrationFromAdExtDataIfNeeded()
268 ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED, in isMigrationDone()
271 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED, /* defValue= */ false) in isMigrationDone()
273 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH, in isMigrationDone()
276 ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER, in isMigrationDone()
303 ? ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER in getSharedPrefMigrationKey()
304 : ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH; in getSharedPrefMigrationKey()
DConsentConstants.java22 public class ConsentConstants { class
DConsentCompositeStorage.java728 LogUtil.e(ConsentConstants.ERROR_MESSAGE_INVALID_CONSENT_SOURCE_OF_TRUTH); in setConsentForAppIfNew()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsearch/
DAppSearchConsentStorageManager.java39 import com.android.adservices.service.consent.ConsentConstants;
339 datastore.put(ConsentConstants.NOTIFICATION_DISPLAYED_ONCE, true); in migrateConsentDataIfNeeded()
343 datastore.put(ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_ONCE, true); in migrateConsentDataIfNeeded()
347 datastore.put(ConsentConstants.WAS_U18_NOTIFICATION_DISPLAYED, true); in migrateConsentDataIfNeeded()
621 return mAppSearchConsentWorker.getConsent(ConsentConstants.DEFAULT_CONSENT); in getDefaultConsent()
626 return mAppSearchConsentWorker.getConsent(ConsentConstants.TOPICS_DEFAULT_CONSENT); in getTopicsDefaultConsent()
631 return mAppSearchConsentWorker.getConsent(ConsentConstants.FLEDGE_DEFAULT_CONSENT); in getFledgeDefaultConsent()
636 return mAppSearchConsentWorker.getConsent(ConsentConstants.MEASUREMENT_DEFAULT_CONSENT); in getMeasurementDefaultConsent()
641 return mAppSearchConsentWorker.getConsent(ConsentConstants.DEFAULT_AD_ID_STATE); in getDefaultAdIdState()
646 mAppSearchConsentWorker.setConsent(ConsentConstants.DEFAULT_CONSENT, defaultConsent); in recordDefaultConsent()
[all …]
DAppSearchConsentManager.java39 import com.android.adservices.service.consent.ConsentConstants;
372 ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED, in shouldInitConsentDataFromAppSearch()
375 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED, in shouldInitConsentDataFromAppSearch()
378 ConsentConstants in shouldInitConsentDataFromAppSearch()
395 && (datastore.get(ConsentConstants.WAS_U18_NOTIFICATION_DISPLAYED) in shouldInitConsentDataFromAppSearch()
398 datastore.get(ConsentConstants.NOTIFICATION_DISPLAYED_ONCE) in shouldInitConsentDataFromAppSearch()
399 || datastore.get(ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_ONCE) in shouldInitConsentDataFromAppSearch()
469 datastore.put(ConsentConstants.NOTIFICATION_DISPLAYED_ONCE, true); in migrateConsentDataIfNeeded()
473 datastore.put(ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_ONCE, true); in migrateConsentDataIfNeeded()
477 datastore.put(ConsentConstants.WAS_U18_NOTIFICATION_DISPLAYED, true); in migrateConsentDataIfNeeded()
DAppSearchConsentWorker.java42 import com.android.adservices.service.consent.ConsentConstants;
554 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in getAdServicesPackageName()
561 throw new RuntimeException(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in getAdServicesPackageName()
DAppSearchDao.java19 import static com.android.adservices.service.consent.ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILU…
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsearch/src/com/android/adservices/service/appsearch/
DAppSearchConsentWorkerTest.java54 import com.android.adservices.service.consent.ConsentConstants;
151 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testSetConsent_failure()
164 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testSetConsent_failure_timeout()
206 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testGetAdServicesPackageName_null()
516 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in runRecordNotificationDisplayedTestFailure()
549 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in runRecordNotificationDisplayedTestFailureTimeout()
612 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testSetCurrentPrivacySandboxFeature_failure()
628 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testSetCurrentPrivacySandboxFeature_failure_timeout()
671 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testRecordUserManualInteractionWithConsent_failure()
690 assertThat(e.getMessage()).isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testRecordUserManualInteractionWithConsent_failure_timeout()
[all …]
DAppSearchDaoTest.java51 import com.android.adservices.service.consent.ConsentConstants;
327 assertThat(e).hasMessageThat().isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testWriteConsentData_failure()
337 ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE in testWriteConsentData_failure()
393 assertThat(e).hasMessageThat().isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testWriteConsentData_timeout()
431 assertThat(e).hasMessageThat().isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testDeleteConsentData_failure()
441 ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE in testDeleteConsentData_failure()
499 assertThat(e).hasMessageThat().isEqualTo(ConsentConstants.ERROR_MESSAGE_APPSEARCH_FAILURE); in testDeleteConsentData_timeout()
DAppSearchConsentManagerTest.java50 import com.android.adservices.service.consent.ConsentConstants;
467 verify(mDatastore).put(eq(ConsentConstants.WAS_U18_NOTIFICATION_DISPLAYED), eq(true)); in testMigrateConsentData_u18UxNotificationDisplayed_u18MigrationEnabled()
499 verify(mDatastore).put(eq(ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_ONCE), eq(true)); in testMigrateConsentData()
DAppSearchConsentStorageManagerTest.java50 import com.android.adservices.service.consent.ConsentConstants;
460 verify(mDatastore).put(eq(ConsentConstants.WAS_U18_NOTIFICATION_DISPLAYED), eq(true)); in testMigrateConsentData_u18UxNotificationDisplayed_u18MigrationEnabled()
492 verify(mDatastore).put(eq(ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_ONCE), eq(true)); in testMigrateConsentData()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/consent/
DAdExtDataConsentMigrationUtilsV2Test.java132 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH, false)) in testHandleConsentMigrationFromAdExtDataIfNeededV2_onSWithPastMigrationDone_skipsMigration()
352 ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER, in testHandleConsentMigrationFromAdExtDataIfNeededV2_onTWithMigrationFromAdExtDone_skipsMigration()
363 ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED, false)) in testHandleConsentMigrationFromAdExtDataIfNeededV2_onTWithMigrationFromAppSearchDone_skipsMigration()
373 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED, false)) in testHandleConsentMigrationFromAdExtDataIfNeededV2_onTWithMigrationFromPpapiDone_skipsMigration()
632 ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED, false)) in mockNoMigration()
635 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED, false)) in mockNoMigration()
638 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH, false)) in mockNoMigration()
641 ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER, in mockNoMigration()
DAdExtDataConsentMigrationUtilsTest.java133 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH, false)) in testHandleConsentMigrationFromAdExtDataIfNeeded_onSWithPastMigrationDone_skipsMigration()
352 ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER, in testHandleConsentMigrationFromAdExtDataIfNeeded_onTWithMigrationFromAdExtDone_skipsMigration()
363 ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED, false)) in testHandleConsentMigrationFromAdExtDataIfNeeded_onTWithMigrationFromAppSearchDone_skipsMigration()
373 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED, false)) in testHandleConsentMigrationFromAdExtDataIfNeeded_onTWithMigrationFromPpapiDone_skipsMigration()
625 ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED, false)) in mockNoMigration()
628 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED, false)) in mockNoMigration()
631 ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED_TO_APP_SEARCH, false)) in mockNoMigration()
634 ConsentConstants.SHARED_PREFS_KEY_MIGRATED_FROM_ADEXTDATA_TO_SYSTEM_SERVER, in mockNoMigration()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/
DBlockedTopicsManager.java48 import com.android.adservices.service.consent.ConsentConstants;
185 ConsentConstants in blockTopic()
236 ConsentConstants in unblockTopic()
284 ConsentConstants in retrieveAllBlockedTopics()
331 ConsentConstants in clearAllBlockedTopics()
/packages/modules/AdServices/adservices/tests/unittest/ui/src/com/android/adservices/service/consent/
DAppConsentForRStorageManagerTest.java64 ConsentConstants.STORAGE_XML_IDENTIFIER, in setup()
65 ConsentConstants.STORAGE_VERSION); in setup()
DConsentManagerTest.java19 import static com.android.adservices.service.consent.ConsentConstants.CONSENT_KEY;
20 import static com.android.adservices.service.consent.ConsentConstants.CONSENT_KEY_FOR_ALL;
21 import static com.android.adservices.service.consent.ConsentConstants.DEFAULT_CONSENT;
22 import static com.android.adservices.service.consent.ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_…
23 import static com.android.adservices.service.consent.ConsentConstants.MANUAL_INTERACTION_WITH_CONSE…
24 import static com.android.adservices.service.consent.ConsentConstants.NOTIFICATION_DISPLAYED_ONCE;
25 import static com.android.adservices.service.consent.ConsentConstants.PAS_NOTIFICATION_DISPLAYED_ON…
26 import static com.android.adservices.service.consent.ConsentConstants.PAS_NOTIFICATION_OPENED;
27 import static com.android.adservices.service.consent.ConsentConstants.SHARED_PREFS_CONSENT;
28 import static com.android.adservices.service.consent.ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HA…
[all …]
DAppConsentStorageManagerTest.java84 ConsentConstants.STORAGE_XML_IDENTIFIER, in setup()
85 ConsentConstants.STORAGE_VERSION); in setup()
DConsentManagerV2Test.java19 import static com.android.adservices.service.consent.ConsentConstants.CONSENT_KEY;
20 import static com.android.adservices.service.consent.ConsentConstants.GA_UX_NOTIFICATION_DISPLAYED_…
21 import static com.android.adservices.service.consent.ConsentConstants.MANUAL_INTERACTION_WITH_CONSE…
22 import static com.android.adservices.service.consent.ConsentConstants.NOTIFICATION_DISPLAYED_ONCE;
23 import static com.android.adservices.service.consent.ConsentConstants.SHARED_PREFS_CONSENT;
24 import static com.android.adservices.service.consent.ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HA…
25 import static com.android.adservices.service.consent.ConsentConstants.SHARED_PREFS_KEY_HAS_MIGRATED;
26 import static com.android.adservices.service.consent.ConsentConstants.SHARED_PREFS_KEY_PPAPI_HAS_CL…
2903 assertThat(mConsentDatastore.get(ConsentConstants.MANUAL_INTERACTION_WITH_CONSENT_RECORDED)) in testHandleConsentMigrationFromAppSearchIfNeeded()
2909 .putBoolean(eq(ConsentConstants.SHARED_PREFS_KEY_APPSEARCH_HAS_MIGRATED), eq(true)); in testHandleConsentMigrationFromAppSearchIfNeeded()
[all …]