Home
last modified time | relevance | path

Searched refs:ApplicationContextSingleton (Results 1 – 25 of 50) sorted by relevance

12

/packages/modules/AdServices/shared/tests/device-side/java/com/android/adservices/shared/common/
DApplicationContextSingletonTest.java41 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 …]
DApplicationContextProviderTest.java70 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/
DApplicationContextSingletonRuleTest.java27 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/
DApplicationContextSingletonRule.java25 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/
DSharedMockitoMockerTest.java23 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/
DAdServicesTestingProvider.java19 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/
DAdservicesShellCommandFactorySupplier.java25 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/
DAdServicesInternalProviderTest.java28 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/
DMobileDataDownloadFactory.java37 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/
DAdServicesInternalProvider.java21 import com.android.adservices.shared.common.ApplicationContextSingleton;
35 Context appContext = ApplicationContextSingleton.get(); in dump()
DAdServicesBackCompatInit.java40 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/
DAdServicesJobScheduler.java24 import com.android.adservices.shared.common.ApplicationContextSingleton;
38 private static final Context sContext = ApplicationContextSingleton.get();
DAdServicesJobServiceLogger.java24 import com.android.adservices.shared.common.ApplicationContextSingleton;
62 ApplicationContextSingleton.get(), in getInstance()
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/mockito/
DSharedMockitoMocker.java27 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/
DProtectedSignalsDatabase.java26 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/
DApplicationContextSingleton.java36 public final class ApplicationContextSingleton { class
114 private ApplicationContextSingleton() { in ApplicationContextSingleton() method in ApplicationContextSingleton
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/cobalt/
DAppNameApiErrorLogger.java31 import com.android.adservices.shared.common.ApplicationContextSingleton;
70 logger = CobaltFactory.getCobaltLogger(ApplicationContextSingleton.get(), flags); in getDefaultCobaltLogger()
DMeasurementCobaltLogger.java29 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/
DEnrollmentUtil.java25 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/
DCustomAudienceShellCommandFactory.java39 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/
DAdServicesExtDataStorageServiceWorker.java33 import com.android.adservices.shared.common.ApplicationContextSingleton;
54 ApplicationContextSingleton.get(), in AdServicesExtDataStorageServiceWorker()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsetid/
DAppSetIdWorker.java38 import com.android.adservices.shared.common.ApplicationContextSingleton;
59 new AppSetIdWorker(ApplicationContextSingleton.get());
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsearch/
DAppSearchConsentStorageManager.java45 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/
DUxStatesManager.java40 import com.android.adservices.shared.common.ApplicationContextSingleton;
80 ApplicationContextSingleton.get(),
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/registration/
DAsyncRegistrationFallbackJobService.java42 import com.android.adservices.shared.common.ApplicationContextSingleton;
164 Context context = ApplicationContextSingleton.get(); in scheduleIfNeeded()

12