Home
last modified time | relevance | path

Searched refs:CONTEXT (Results 1 – 25 of 69) sorted by relevance

123

/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/kanon/
DKAnonSignJoinBackgroundJobServiceTest.java71 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in KAnonSignJoinBackgroundJobServiceTest
72 private static final JobScheduler JOB_SCHEDULER = CONTEXT.getSystemService(JobScheduler.class);
135 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(CONTEXT, testFlags); in onStartJob_jobStartsAndJobFinishedLogged()
152 mockAdServicesJobServiceLogger(CONTEXT, mock(Flags.class)); in onStartJob_withDisabledExtServicesJobOnTPlus_skipsAndCancelsBackgroundJob()
157 new ComponentName(CONTEXT, KAnonSignJoinBackgroundJobService.class)) in onStartJob_withDisabledExtServicesJobOnTPlus_skipsAndCancelsBackgroundJob()
180 mockAdServicesJobServiceLogger(CONTEXT, testWithBackgroundDisabled); in onStartJob_withBackgroundProcessFlagDisabled_skipsAndCancelsBackgroundJob()
185 new ComponentName(CONTEXT, KAnonSignJoinBackgroundJobService.class)) in onStartJob_withBackgroundProcessFlagDisabled_skipsAndCancelsBackgroundJob()
205 .when(() -> KAnonSignJoinBackgroundJobWorker.getInstance(CONTEXT)); in scheduleIfNeeded_schedulesTheJob()
207 KAnonSignJoinBackgroundJobService.scheduleIfNeeded(CONTEXT, false); in scheduleIfNeeded_schedulesTheJob()
218 new ComponentName(CONTEXT, KAnonSignJoinBackgroundJobService.class)) in testScheduleIfNeeded_skipsIfAlreadyScheduled()
[all …]
DKAnonCallerImplFullIntegrationTests.java137 private final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in KAnonCallerImplFullIntegrationTests
145 Room.inMemoryDatabaseBuilder(CONTEXT, CacheDatabase.class) in setup()
155 Room.inMemoryDatabaseBuilder(CONTEXT, KAnonDatabase.class).build(); in setup()
164 Room.inMemoryDatabaseBuilder(CONTEXT, AdSelectionServerDatabase.class) in setup()
183 InputStream inputStream = CONTEXT.getAssets().open(GOLDEN_TRANSCRIPT_PATH); in setup()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/signals/
DEncoderPersistenceDaoTest.java44 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in EncoderPersistenceDaoTest
59 mEncoderPersistenceDao = EncoderPersistenceDao.getInstance(CONTEXT); in setup()
72 EncoderPersistenceDao.getInstance(CONTEXT.getApplicationContext())); in testPersistenceIsSingleton()
84 File encoderDir = new File(CONTEXT.getFilesDir(), ENCODERS_DIR); in testCreateEncoderDirectory()
167 encoderDir = new File(CONTEXT.getFilesDir(), ENCODERS_DIR); in testWipeAllEncoders()
173 File encoderDir = new File(CONTEXT.getFilesDir(), ENCODERS_DIR); in testDeleteEmptyDirectory()
183 File tempFile = new File(CONTEXT.getFilesDir(), ADSERVICES_PREFIX + "temp_file"); in testWriteAndReadForFile()
186 mEncoderPersistenceDao.readDataFromFile(CONTEXT.getFilesDir(), tempFile.getName()); in testWriteAndReadForFile()
DEncoderEndpointsDaoTest.java39 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in EncoderEndpointsDaoTest
49 Room.inMemoryDatabaseBuilder(CONTEXT, ProtectedSignalsDatabase.class) in setup()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/adselection/
DSharedStorageDatabaseTest.java32 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in SharedStorageDatabaseTest
39 SharedStorageDatabase instance1 = SharedStorageDatabase.getInstance(CONTEXT); in testGetInstance()
40 SharedStorageDatabase instance2 = SharedStorageDatabase.getInstance(CONTEXT); in testGetInstance()
46 SharedStorageDatabase instance = SharedStorageDatabase.getInstance(CONTEXT); in testAppInstallDao()
/packages/modules/AdServices/adservices/tests/endtoends/src/com/android/adservices/customaudience/
DCustomAudienceManagerTest.java64 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in CustomAudienceManagerTest
83 .setPpapiAppAllowList(CONTEXT.getPackageName())
97 AdservicesTestHelper.killAdservicesProcess(CONTEXT); in setUp()
107 .setContext(CONTEXT) in measureJoinCustomAudience()
126 .setContext(CONTEXT) in measureLeaveCustomAudience()
201 CustomAudienceManager manager = CustomAudienceManager.get(CONTEXT); in testGetchAndJoinCustomAudience_lowRamDevice()
219 CustomAudienceManager manager = CustomAudienceManager.get(CONTEXT); in testLeaveCustomAudienceRequest_lowRamDevice()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/common/
DCleanupUtilsTest.java47 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in CleanupUtilsTest
73 CONTEXT.getPackageManager(), in testEmpty()
96 CONTEXT.getPackageManager(), in testCleanupNotUninstalled()
116 packageList, CONTEXT.getPackageManager(), Arrays.asList(ALLOW_ALL)); in testCleanupNotAllowed()
138 CONTEXT.getPackageManager(), in testCleanupMultipleAllowLists()
162 CONTEXT.getPackageManager(), in testCleanupMultipleAllowListsWildCard()
185 CONTEXT.getPackageManager(), in testCleanupMultipleAllowListsRedundant()
DUserProfileIdDaoSharedPreferencesImplTest.java39 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in UserProfileIdDaoSharedPreferencesImplTest
51 mSharedPreferences = CONTEXT.getSharedPreferences(STORAGE_NAME, Context.MODE_PRIVATE); in setup()
58 CONTEXT.deleteSharedPreferences(STORAGE_NAME); in teardown()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DAdFilteringFeatureFactoryTest.java45 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in AdFilteringFeatureFactoryTest
47 Room.inMemoryDatabaseBuilder(CONTEXT, SharedStorageDatabase.class)
51 Room.inMemoryDatabaseBuilder(CONTEXT, SharedStorageDatabase.class)
55 Room.inMemoryDatabaseBuilder(CONTEXT, AdSelectionDatabase.class)
DDebugReportSenderStrategyBatchImplTest.java49 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in DebugReportSenderStrategyBatchImplTest
73 CONTEXT, mAdSelectionDebugReportDao, DEV_CONTEXT); in setUp()
92 () -> new DebugReportSenderStrategyBatchImpl(CONTEXT, null, DEV_CONTEXT)); in testConstructorWithInvalidParamsThrowsException()
97 CONTEXT, mAdSelectionDebugReportDao, null)); in testConstructorWithInvalidParamsThrowsException()
DAdSelectionServiceImplTest.java210 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in AdSelectionServiceImplTest
352 Room.inMemoryDatabaseBuilder(CONTEXT, CustomAudienceDatabase.class) in setUp()
357 Room.inMemoryDatabaseBuilder(CONTEXT, ProtectedSignalsDatabase.class) in setUp()
527 CONTEXT, in testReportImpressionSuccessWithRegisterAdBeaconDisabled()
655 CONTEXT, in testReportImpressionSuccessCallbackThrowsErrorAuctionServerEnabled()
783 CONTEXT, in testReportImpressionFailureCallbackThrowsErrorAuctionServerEnabled()
904 CONTEXT, in testReportImpressionSuccessCallbackThrowsErrorAuctionServerDisabled()
1032 CONTEXT, in testReportImpressionFailureCallbackThrowsErrorAuctionServerDisabled()
1152 CONTEXT, in testReportImpressionSuccessfullyReportsAdCost()
1288 CONTEXT, in testReportImpressionSuccessfullyReportsDataVersionHeader()
[all …]
DReportAndRegisterEventE2ETest.java212 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in ReportAndRegisterEventE2ETest
247 CONTEXT, mEnrollmentDaoMock, mFlags, mDatastoreManagerSpy, mDebugReportApiMock);
252 CONTEXT,
292 Room.inMemoryDatabaseBuilder(CONTEXT, CustomAudienceDatabase.class) in setup()
298 Room.inMemoryDatabaseBuilder(CONTEXT, ProtectedSignalsDatabase.class) in setup()
324 CONTEXT, in setup()
330 doReturn(mMeasurementImplSpy).when(() -> MeasurementImpl.getInstance(CONTEXT)); in setup()
341 Room.inMemoryDatabaseBuilder(CONTEXT, AdSelectionDatabase.class) in setup()
364 CONTEXT, in setup()
1046 CONTEXT, in getAdSelectionServiceImpl()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/
DCustomAudienceServiceEndToEndTest.java163 protected static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in CustomAudienceServiceEndToEndTest
268 Room.inMemoryDatabaseBuilder(CONTEXT, CustomAudienceDatabase.class) in setup()
274 Room.inMemoryDatabaseBuilder(CONTEXT, SharedStorageDatabase.class).build(); in setup()
278 Room.inMemoryDatabaseBuilder(CONTEXT, AdSelectionServerDatabase.class).build(); in setup()
296 CONTEXT.getPackageManager(), in setup()
302 CONTEXT, in setup()
318 CONTEXT, in setup()
323 CONTEXT.getPackageManager(), in setup()
375 CONTEXT, in testJoinCustomAudience_notInBinderThread_fail()
383 CONTEXT.getPackageManager(), in testJoinCustomAudience_notInBinderThread_fail()
[all …]
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/measurement/load/scenarios/
DAbstractTestAction.java37 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in AbstractTestAction
49 ? CONTEXT.getSystemService(MeasurementManager.class)
50 : MeasurementManager.get(CONTEXT);
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/
DImmediateAggregateReportingJobServiceTest.java80 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in ImmediateAggregateReportingJobServiceTest
111 mSpyLogger = getSpiedAdServicesJobServiceLogger(CONTEXT, mMockFlags); in setUp()
267 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule()
306 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules()
402 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted()
510 doReturn(CONTEXT.getPackageName()).when(context).getPackageName(); in runWithMocks()
511 doReturn(CONTEXT.getPackageManager()).when(context).getPackageManager(); in runWithMocks()
DAggregateReportingJobServiceTest.java84 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in AggregateReportingJobServiceTest
116 mSpyLogger = getSpiedAdServicesJobServiceLogger(CONTEXT, mMockFlags); in setUp()
273 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule()
311 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules()
406 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted()
508 doReturn(CONTEXT.getPackageName()).when(context).getPackageName(); in runWithMocks()
509 doReturn(CONTEXT.getPackageManager()).when(context).getPackageManager(); in runWithMocks()
DAggregateFallbackReportingJobServiceTest.java87 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in AggregateFallbackReportingJobServiceTest
120 mSpyLogger = getSpiedAdServicesJobServiceLogger(CONTEXT, mMockFlags); in setUp()
277 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule()
317 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules()
412 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoCheckParameters()
528 doReturn(CONTEXT.getPackageName()).when(context).getPackageName(); in runWithMocks()
529 doReturn(CONTEXT.getPackageManager()).when(context).getPackageManager(); in runWithMocks()
DEventReportingJobServiceTest.java80 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in EventReportingJobServiceTest
111 mSpyLogger = getSpiedAdServicesJobServiceLogger(CONTEXT, mMockFlags); in setUp()
270 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule()
308 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules()
402 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted()
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/fledge/
DAbstractSelectAdsLatencyTest.java78 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in AbstractSelectAdsLatencyTest
82 .setContext(CONTEXT)
87 .setContext(CONTEXT)
107 AdservicesTestHelper.getAdServicesPackageName(CONTEXT),
112 AdservicesTestHelper.getAdServicesPackageName(CONTEXT)))
DServerAuctionOneBuyerLargeCaLatency.java67 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in ServerAuctionOneBuyerLargeCaLatency
88 .setContext(CONTEXT)
103 AdservicesTestHelper.getAdServicesPackageName(CONTEXT)))
110 AdservicesTestHelper.getAdServicesPackageName(CONTEXT),
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/cobalt/
DCobaltDataServiceFactoryTest.java37 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in CobaltDataServiceFactoryTest
57 CobaltDataServiceFactory.createDataService(CONTEXT, null); in nullExecutorService_throwsNullPointerException()
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/fledge/utils/
DProtectedAppSignalsTestFixture.java36 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in ProtectedAppSignalsTestFixture
41 .setContext(CONTEXT)
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/utils/
DFledgeScenarioTest.java84 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in FledgeScenarioTest
111 CtsWebViewSupportUtil.createJSSandboxAvailableRule(CONTEXT);
116 CONTEXT, "adservices_untrusted_test_server.p12", "adservices_test");
149 .setContext(CONTEXT) in setUp()
153 new AdSelectionClient.Builder().setContext(CONTEXT).setExecutor(executor).build(); in setUp()
/packages/modules/AdServices/adservices/tests/perf/src/android/adservices/test/scenario/adservices/measurement/
DAbstractMeasurementLatencyTest.java54 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in AbstractMeasurementLatencyTest
61 ? CONTEXT.getSystemService(MeasurementManager.class)
62 : MeasurementManager.get(CONTEXT);
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/kanon/
DServerParametersDaoTest.java40 private static final Context CONTEXT = ApplicationProvider.getApplicationContext(); field in ServerParametersDaoTest
52 Room.inMemoryDatabaseBuilder(CONTEXT, KAnonDatabase.class) in setup()

123