/packages/apps/Launcher3/tests/src/com/android/launcher3/model/ |
D | LoaderTaskTest.kt | 205 val spyContext = spy(context) in When launcher_broadcast_installed_apps and is restore then send installed item broadcast() constant 206 `when`(app.context).thenReturn(spyContext) in When launcher_broadcast_installed_apps and is restore then send installed item broadcast() 219 spyContext, in When launcher_broadcast_installed_apps and is restore then send installed item broadcast() 225 Settings.Secure.putInt(spyContext.contentResolver, "launcher_broadcast_installed_apps", 1) in When launcher_broadcast_installed_apps and is restore then send installed item broadcast() 226 RestoreDbTask.setPending(spyContext) in When launcher_broadcast_installed_apps and is restore then send installed item broadcast() 234 verify(spyContext).sendBroadcast(argumentCaptor.capture()) in When launcher_broadcast_installed_apps and is restore then send installed item broadcast() 273 val spyContext = spy(context) in When not a restore then installed item broadcast not sent() constant 274 `when`(app.context).thenReturn(spyContext) in When not a restore then installed item broadcast not sent() 287 spyContext, in When not a restore then installed item broadcast not sent() 293 Settings.Secure.putInt(spyContext.contentResolver, "launcher_broadcast_installed_apps", 1) in When not a restore then installed item broadcast not sent() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/ |
D | ImmediateAggregateReportingJobServiceTest.java | 267 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() local 269 .when(spyContext) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 275 spyContext, in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 287 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 306 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() local 308 .when(spyContext) in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 314 spyContext, in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 327 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 402 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted() local 404 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoIsPersisted() [all …]
|
D | AggregateReportingJobServiceTest.java | 273 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() local 275 .when(spyContext) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 281 spyContext, AggregateReportingJobService.class)) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 293 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 311 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() local 313 .when(spyContext) in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 319 spyContext, AggregateReportingJobService.class)) in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 333 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 406 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted() local 408 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoIsPersisted() [all …]
|
D | EventReportingJobServiceTest.java | 270 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() local 272 .when(spyContext) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 278 spyContext, EventReportingJobService.class)) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 290 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 308 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() local 310 .when(spyContext) in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 316 spyContext, EventReportingJobService.class)) in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 330 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 402 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted() local 404 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoIsPersisted() [all …]
|
D | AggregateFallbackReportingJobServiceTest.java | 277 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() local 279 .when(spyContext) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 285 spyContext, in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 298 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 317 final Context spyContext = spy(CONTEXT); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() local 319 .when(spyContext) in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 325 spyContext, in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 337 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOffPreviouslyScheduledWithDiffParams_reschedules() 412 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoCheckParameters() local 414 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoCheckParameters() [all …]
|
D | DebugReportingJobServiceTest.java | 266 final Context spyContext = spy(ApplicationProvider.getApplicationContext()); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() local 268 .when(spyContext) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 274 spyContext, DebugReportingJobService.class)) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 283 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 299 final Context spyContext = spy(ApplicationProvider.getApplicationContext()); in scheduleIfNeeded_withDifferentJobInfo_doesSchedule() local 301 .when(spyContext) in scheduleIfNeeded_withDifferentJobInfo_doesSchedule() 307 spyContext, DebugReportingJobService.class)) in scheduleIfNeeded_withDifferentJobInfo_doesSchedule() 317 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_withDifferentJobInfo_doesSchedule()
|
D | DebugReportingFallbackJobServiceTest.java | 269 final Context spyContext = spy(ApplicationProvider.getApplicationContext()); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() local 271 .when(spyContext) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 277 spyContext, in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 289 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 306 final Context spyContext = spy(ApplicationProvider.getApplicationContext()); in scheduleIfNeeded_diffJobInfo_doesSchedule() local 308 .when(spyContext) in scheduleIfNeeded_diffJobInfo_doesSchedule() 314 spyContext, in scheduleIfNeeded_diffJobInfo_doesSchedule() 327 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_diffJobInfo_doesSchedule()
|
D | EventFallbackReportingJobServiceTest.java | 415 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoCheckParameters() local 418 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoCheckParameters() 426 EventFallbackReportingJobService.scheduleIfNeeded(spyContext, true); in testSchedule_jobInfoCheckParameters()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/applications/ |
D | ApplicationFeatureProviderImplTest.java | 311 Context spyContext = spy(RuntimeEnvironment.application); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory() local 313 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory() 315 ReflectionHelpers.setField(mProvider, "mContext", spyContext); in getKeepEnabledPackages_shouldContainDefaultPhoneAndSmsAndLocationHistory() 342 Context spyContext = spy(RuntimeEnvironment.application); in getKeepEnabledPackages_hasEuiccComponent_shouldContainEuiccPackage() local 344 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_hasEuiccComponent_shouldContainEuiccPackage() 346 ReflectionHelpers.setField(mProvider, "mContext", spyContext); in getKeepEnabledPackages_hasEuiccComponent_shouldContainEuiccPackage() 364 Context spyContext = spy(RuntimeEnvironment.application); in getKeepEnabledPackages_shouldContainSettingsIntelligence() local 366 when(spyContext.getSystemService(Context.LOCATION_SERVICE)).thenReturn(mLocationManager); in getKeepEnabledPackages_shouldContainSettingsIntelligence() 368 ReflectionHelpers.setField(mProvider, "mContext", spyContext); in getKeepEnabledPackages_shouldContainSettingsIntelligence() 406 Context spyContext = spy(RuntimeEnvironment.application); in getKeepEnabledPackages_shouldContainPackageInstaller() local [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/network/ |
D | SatelliteRepositoryTest.kt | 53 var spyContext: Context = ApplicationProvider.getApplicationContext() in <lambda>() variable in com.android.settings.network.SatelliteRepositoryTest 66 `when`(this.spyContext.getSystemService(SatelliteManager::class.java)) in <lambda>() 69 repository = SatelliteRepository(spyContext) in <lambda>() 134 `when`(spyContext.getSystemService(SatelliteManager::class.java)).thenReturn(null) in <lambda>() 182 `when`(spyContext.getSystemService(SatelliteManager::class.java)).thenReturn(null) in <lambda>() 227 `when`(spyContext.getSystemService(SatelliteManager::class.java)).thenReturn(null) in <lambda>()
|
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/ |
D | DataUsageListTest.kt | 46 private val spyContext: Context = spy(ApplicationProvider.getApplicationContext()) { in <lambda>() constant 50 private val spyResources = spy(spyContext.resources) 59 spyContext.stub { in setUp() 186 override fun getContext() = spyContext
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/registration/ |
D | AsyncRegistrationQueueJobServiceTest.java | 415 final Context spyContext = spy(ApplicationProvider.getApplicationContext()); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() local 417 .when(spyContext) in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 423 spyContext, in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 442 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_killSwitchOff_previouslyExecuted_dontForceSchedule_dontSchedule() 457 final Context spyContext = spy(ApplicationProvider.getApplicationContext()); in scheduleIfNeeded_diffJobInfo_doesSchedule() local 459 .when(spyContext) in scheduleIfNeeded_diffJobInfo_doesSchedule() 465 spyContext, in scheduleIfNeeded_diffJobInfo_doesSchedule() 485 spyContext, /* forceSchedule= */ false); in scheduleIfNeeded_diffJobInfo_doesSchedule()
|
/packages/modules/AdServices/sdksandbox/tests/testutils/src/com/android/server/sdksandbox/ |
D | FakeInjector.java | 45 public FakeInjector(Context spyContext) { in FakeInjector() argument 46 super(spyContext); in FakeInjector()
|
/packages/modules/AppSearch/testing/contactsindexertests/src/com/android/server/appsearch/contactsindexer/ |
D | ContactsIndexerImplTest.java | 475 Context spyContext = new ContextWrapper(ApplicationProvider.getApplicationContext()) { in testContactsIndexerImpl_batchUpdateContactsNullCursor_shouldContinueOnError() local 481 ContactsIndexerImpl contactsIndexerImpl = new ContactsIndexerImpl(spyContext, in testContactsIndexerImpl_batchUpdateContactsNullCursor_shouldContinueOnError() 522 Context spyContext = new ContextWrapper(ApplicationProvider.getApplicationContext()) { in testContactsIndexerImpl_batchUpdateContactsNullCursor_shouldNotContinueOnError() local 528 ContactsIndexerImpl contactsIndexerImpl = new ContactsIndexerImpl(spyContext, in testContactsIndexerImpl_batchUpdateContactsNullCursor_shouldNotContinueOnError() 564 Context spyContext = new ContextWrapper(ApplicationProvider.getApplicationContext()) { in testContactsIndexerImpl_batchUpdateContactsThrows_shouldContinueOnError() local 570 ContactsIndexerImpl contactsIndexerImpl = new ContactsIndexerImpl(spyContext, in testContactsIndexerImpl_batchUpdateContactsThrows_shouldContinueOnError() 611 Context spyContext = new ContextWrapper(ApplicationProvider.getApplicationContext()) { in testContactsIndexerImpl_batchUpdateContactsThrows_shouldNotContinueOnError() local 617 ContactsIndexerImpl contactsIndexerImpl = new ContactsIndexerImpl(spyContext, in testContactsIndexerImpl_batchUpdateContactsThrows_shouldNotContinueOnError()
|
/packages/services/Car/experimental/tests/experimentalcarservice_unit_test/src/com/android/experimentalcar/ |
D | DriverDistractionExperimentalFeatureServiceTest.java | 218 Context spyContext = spy(InstrumentationRegistry.getInstrumentation().getTargetContext()); in testInit_bindsToServicesInXmlConfig() local 221 Resources spyResources = spy(spyContext.getResources()); in testInit_bindsToServicesInXmlConfig() 222 doReturn(spyResources).when(spyContext).getResources(); in testInit_bindsToServicesInXmlConfig() 227 doReturn(mInputManager).when(spyContext).getSystemService(Context.INPUT_SERVICE); in testInit_bindsToServicesInXmlConfig() 236 ServiceLauncherContext serviceLauncherContext = new ServiceLauncherContext(spyContext); in testInit_bindsToServicesInXmlConfig() 239 spyContext.getMainLooper(), mHandler); in testInit_bindsToServicesInXmlConfig()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/ |
D | DeleteUninstalledJobServiceTest.java | 339 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted() local 341 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoIsPersisted() 350 DeleteUninstalledJobService.scheduleIfNeeded(spyContext, true); in testSchedule_jobInfoIsPersisted()
|
D | DeleteExpiredJobServiceTest.java | 357 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted() local 359 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoIsPersisted() 368 DeleteExpiredJobService.scheduleIfNeeded(spyContext, true); in testSchedule_jobInfoIsPersisted()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | PackageChangedReceiverTest.java | 986 Context spyContext = Mockito.spy(ApplicationProvider.getApplicationContext()); in testReceive_onT_onExtServices() local 988 .when(spyContext) in testReceive_onT_onExtServices() 990 receiver.onReceive(spyContext, intent); in testReceive_onT_onExtServices() 1003 Context spyContext = Mockito.spy(ApplicationProvider.getApplicationContext()); in testReceive_onS_onExtServices() local 1005 .when(spyContext) in testReceive_onS_onExtServices() 1007 receiver.onReceive(spyContext, intent); in testReceive_onS_onExtServices()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/attribution/ |
D | AttributionFallbackJobServiceTest.java | 415 Context spyContext = spy(CONTEXT); in testSchedule_jobInfoIsPersisted() local 417 doReturn(jobScheduler).when(spyContext).getSystemService(JobScheduler.class); in testSchedule_jobInfoIsPersisted() 430 AttributionFallbackJobService.scheduleIfNeeded(spyContext, true); in testSchedule_jobInfoIsPersisted()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsearch/src/com/android/adservices/service/appsearch/ |
D | AppSearchConsentStorageManagerTest.java | 530 Context spyContext = Mockito.spy(appContext.get()); in testMigrateConsentData_FromExtServices() local 533 .when(spyContext) in testMigrateConsentData_FromExtServices() 535 appContext.set(spyContext); in testMigrateConsentData_FromExtServices()
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/accessibility/ |
D | ToggleScreenMagnificationPreferenceFragmentTest.java | 147 Context spyContext = spy(mContext); in setUpTestFragment() local 148 when(spyContext.getResources()).thenReturn(mSpyResources); in setUpTestFragment() 157 fragment.setContext(spyContext); in setUpTestFragment()
|