/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/shared/common/ |
D | ApplicationContextSingletonTest.java | 41 ApplicationContextSingleton.setForTests(/* context= */ null); in resetState() 46 assertThrows(IllegalStateException.class, () -> ApplicationContextSingleton.get()); in testGet_notSet() 47 assertWithMessage("getForTests()").that(ApplicationContextSingleton.getForTests()).isNull(); in testGet_notSet() 52 assertThrows(NullPointerException.class, () -> ApplicationContextSingleton.set(null)); in testSet_nullContext() 61 () -> ApplicationContextSingleton.set(mMockContext)); in testSet_nullAppContext() 68 ApplicationContextSingleton.set(mMockContext); in testSet_once() 71 .that(ApplicationContextSingleton.get()) in testSet_once() 80 ApplicationContextSingleton.set(mMockContext); in testSet_twiceSameAppContext() 81 ApplicationContextSingleton.set(mMockOtherContext); in testSet_twiceSameAppContext() 84 .that(ApplicationContextSingleton.get()) in testSet_twiceSameAppContext() [all …]
|
D | ApplicationContextProviderTest.java | 70 ApplicationContextSingleton.setForTests(/* context= */ null); in testOnCreate_setsSingleton() 77 .that(ApplicationContextSingleton.get()) in testOnCreate_setsSingleton()
|
/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/shared/testing/common/ |
D | ApplicationContextSingletonRuleTest.java | 27 import com.android.adservices.shared.common.ApplicationContextSingleton; 47 mPreviousContext = ApplicationContextSingleton.getForTests(); in savePreviousContext() 58 ApplicationContextSingleton.setForTests(mPreviousContext); in restorePreviousContext() 77 .that(ApplicationContextSingleton.get()) in testDefaultConstructorSetsNonNullContext() 85 ApplicationContextSingleton.setForTests(contextBefore); in testApplicationContextSetDuringTestAndResetAtTheEnd() 93 .that(ApplicationContextSingleton.get()) in testApplicationContextSetDuringTestAndResetAtTheEnd() 101 .that(ApplicationContextSingleton.get()) in testApplicationContextSetDuringTestAndResetAtTheEnd() 110 ApplicationContextSingleton.setForTests(contextBefore); in testApplicationContextSetDuringTestAndResetAtTheEndEvenWhenTestFails() 125 .that(ApplicationContextSingleton.get()) in testApplicationContextSetDuringTestAndResetAtTheEndEvenWhenTestFails() 135 .that(ApplicationContextSingleton.get()) in testApplicationContextSetDuringTestAndResetAtTheEndEvenWhenTestFails() [all …]
|
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/testing/common/ |
D | ApplicationContextSingletonRule.java | 25 import com.android.adservices.shared.common.ApplicationContextSingleton; 73 Context context = ApplicationContextSingleton.getForTests(); in get() 85 ApplicationContextSingleton.setForTests(context); in set() 93 Context previousContext = ApplicationContextSingleton.getForTests(); in apply() 103 ApplicationContextSingleton.setForTests(mContext); in apply() 113 ApplicationContextSingleton.setForTests(previousContext); in apply()
|
/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/mockito/ |
D | SharedMockitoMockerTest.java | 23 import com.android.adservices.shared.common.ApplicationContextSingleton; 34 Context contextBefore = ApplicationContextSingleton.getForTests(); in testSetApplicationContextSingleton() 44 .that(ApplicationContextSingleton.get()) in testSetApplicationContextSingleton() 47 ApplicationContextSingleton.setForTests(contextBefore); in testSetApplicationContextSingleton()
|
/packages/modules/AdServices/adservices/tests/test-util/java/com/android/adservices/common/ |
D | AdServicesTestingProvider.java | 19 import com.android.adservices.shared.common.ApplicationContextSingleton; 35 ApplicationContextSingleton.getForTests()); in dump() 37 "ApplicationContextSingleton.get(): %s\n", ApplicationContextSingleton.get()); in dump()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/shell/ |
D | AdservicesShellCommandFactorySupplier.java | 25 import com.android.adservices.shared.common.ApplicationContextSingleton; 36 ApplicationContextSingleton.get()), 40 ApplicationContextSingleton.get()),
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | AdServicesInternalProviderTest.java | 28 import com.android.adservices.shared.common.ApplicationContextSingleton; 39 ApplicationContextSingleton.setForTests(/* context=*/ null); in testDump_appContextSingletonNotSet() 45 .contains(ApplicationContextSingleton.ERROR_MESSAGE_SET_NOT_CALLED); in testDump_appContextSingletonNotSet()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/download/ |
D | MobileDataDownloadFactory.java | 37 import com.android.adservices.shared.common.ApplicationContextSingleton; 103 Context context = ApplicationContextSingleton.get(); in getMdd() 171 Context context = ApplicationContextSingleton.get(); in getFileStorage() 229 Context context = ApplicationContextSingleton.get(); in getDownloadMetadataStore() 242 Context context = ApplicationContextSingleton.get(); in getTopicsManifestPopulator() 325 Context context = ApplicationContextSingleton.get(); 391 Context context = ApplicationContextSingleton.get();
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/ |
D | AdServicesInternalProvider.java | 21 import com.android.adservices.shared.common.ApplicationContextSingleton; 35 Context appContext = ApplicationContextSingleton.get(); in dump()
|
D | AdServicesBackCompatInit.java | 40 import com.android.adservices.shared.common.ApplicationContextSingleton; 61 return new AdServicesBackCompatInit(ApplicationContextSingleton.get()); in getInstance()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/spe/ |
D | AdServicesJobScheduler.java | 24 import com.android.adservices.shared.common.ApplicationContextSingleton; 38 private static final Context sContext = ApplicationContextSingleton.get();
|
D | AdServicesJobServiceLogger.java | 24 import com.android.adservices.shared.common.ApplicationContextSingleton; 62 ApplicationContextSingleton.get(), in getInstance()
|
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/mockito/ |
D | SharedMockitoMocker.java | 27 import com.android.adservices.shared.common.ApplicationContextSingleton; 40 ApplicationContextSingleton.setForTests(context); in setApplicationContextSingleton()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/signals/ |
D | ProtectedSignalsDatabase.java | 26 import com.android.adservices.shared.common.ApplicationContextSingleton; 67 ApplicationContextSingleton.get(), in getInstance()
|
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/common/ |
D | ApplicationContextSingleton.java | 36 public final class ApplicationContextSingleton { class 114 private ApplicationContextSingleton() { in ApplicationContextSingleton() method in ApplicationContextSingleton
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/cobalt/ |
D | AppNameApiErrorLogger.java | 31 import com.android.adservices.shared.common.ApplicationContextSingleton; 70 logger = CobaltFactory.getCobaltLogger(ApplicationContextSingleton.get(), flags); in getDefaultCobaltLogger()
|
D | MeasurementCobaltLogger.java | 29 import com.android.adservices.shared.common.ApplicationContextSingleton; 87 logger = CobaltFactory.getCobaltLogger(ApplicationContextSingleton.get(), flags); in getDefaultCobaltLogger()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/enrollment/ |
D | EnrollmentUtil.java | 25 import com.android.adservices.shared.common.ApplicationContextSingleton; 46 sSingleton = new EnrollmentUtil(ApplicationContextSingleton.get()); in getInstance()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/shell/customaudience/ |
D | CustomAudienceShellCommandFactory.java | 39 import com.android.adservices.shared.common.ApplicationContextSingleton; 88 ApplicationContextSingleton.get().getPackageManager(), in getInstance()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/extdata/ |
D | AdServicesExtDataStorageServiceWorker.java | 33 import com.android.adservices.shared.common.ApplicationContextSingleton; 54 ApplicationContextSingleton.get(), in AdServicesExtDataStorageServiceWorker()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsetid/ |
D | AppSetIdWorker.java | 38 import com.android.adservices.shared.common.ApplicationContextSingleton; 59 new AppSetIdWorker(ApplicationContextSingleton.get());
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsearch/ |
D | AppSearchConsentStorageManager.java | 45 import com.android.adservices.shared.common.ApplicationContextSingleton; 314 String packageName = ApplicationContextSingleton.get().getPackageName(); in migrateConsentDataIfNeeded() 716 ApplicationContextSingleton.get().getUser().getIdentifier()); in shouldInitConsentDataFromAppSearch() 752 ApplicationContextSingleton.get().getPackageManager(), 0) in getInstalledPackages()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/ui/data/ |
D | UxStatesManager.java | 40 import com.android.adservices.shared.common.ApplicationContextSingleton; 80 ApplicationContextSingleton.get(),
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/registration/ |
D | AsyncRegistrationFallbackJobService.java | 42 import com.android.adservices.shared.common.ApplicationContextSingleton; 164 Context context = ApplicationContextSingleton.get(); in scheduleIfNeeded()
|