/packages/modules/RemoteKeyProvisioning/app/tests/unit/src/com/android/rkpdapp/unittest/ |
D | SettingsTest.java | 47 private static Context sContext; field in SettingsTest 51 sContext = ApplicationProvider.getApplicationContext(); in init() 56 Settings.clearPreferences(sContext); in setUp() 61 Settings.clearPreferences(sContext); in tearDown() 81 Settings.getExtraSignedKeysAvailable(sContext)); in testCheckDefaults() 83 Settings.getExpiringBy(sContext).toMillis()); in testCheckDefaults() 85 Settings.getUrl(sContext)); in testCheckDefaults() 86 assertEquals(0, Settings.getFailureCounter(sContext)); in testCheckDefaults() 91 int defaultRandom = Settings.getId(sContext); in testCheckIdSettings() 94 Settings.generateAndSetId(sContext); in testCheckIdSettings() [all …]
|
D | ServerInterfaceTest.java | 53 private static Context sContext; field in ServerInterfaceTest 58 sContext = Mockito.spy(ApplicationProvider.getApplicationContext()); in init() 63 Settings.clearPreferences(sContext); in setUp() 64 mServerInterface = new ServerInterface(sContext, false); in setUp() 65 Utils.mockConnectivityState(sContext, Utils.ConnectivityState.CONNECTED); in setUp() 70 Settings.clearPreferences(sContext); in tearDown() 71 Mockito.reset(sContext); in tearDown() 78 Settings.setDeviceConfig(sContext, 1 /* extraKeys */, in testRetryOnServerFailure() 80 Settings.setMaxRequestTime(sContext, 100); in testRetryOnServerFailure() 82 ProvisioningAttempt.createScheduledAttemptMetrics(sContext)); in testRetryOnServerFailure() [all …]
|
D | PeriodicProvisionerTests.java | 75 private static Context sContext; field in PeriodicProvisionerTests 80 sContext = Mockito.spy(ApplicationProvider.getApplicationContext()); in init() 87 RkpdDatabase.getDatabase(sContext).provisionedKeyDao().deleteAllKeys(); in setUp() 89 sContext, in setUp() 96 WorkManagerTestInitHelper.initializeTestWorkManager(sContext, config); in setUp() 97 Settings.clearPreferences(sContext); in setUp() 98 Utils.mockConnectivityState(sContext, Utils.ConnectivityState.CONNECTED); in setUp() 103 RkpdDatabase.getDatabase(sContext).provisionedKeyDao().deleteAllKeys(); in tearDown() 105 Settings.clearPreferences(sContext); in tearDown() 109 WorkManager workManager = WorkManager.getInstance(sContext); in getProvisionerWorkInfo() [all …]
|
/packages/modules/AdServices/adservices/tests/cts/ui/gaux/debugchannel/src/com/android/adservices/tests/ui/gaux/debugchannel/ |
D | GaUxDebugChannelTest.java | 54 private static final Context sContext = field in GaUxDebugChannelTest 63 AdservicesTestHelper.killAdservicesProcess(sContext); in setUp() 64 UiUtils.resetAdServicesConsentData(sContext); in setUp() 70 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 100 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 130 sContext, in testApiDisabled() 147 AdservicesTestHelper.killAdservicesProcess(sContext); in testEntryPointDisabled() 159 sContext, in testEntryPointDisabled() 174 AdservicesTestHelper.killAdservicesProcess(sContext); in testFromEntryPointRequest() 187 sContext, in testFromEntryPointRequest() [all …]
|
/packages/modules/OnDevicePersonalization/tests/servicetests/src/com/android/ondevicepersonalization/services/maintenance/ |
D | OnDevicePersonalizationMaintenanceJobTest.java | 103 private static final Context sContext = ApplicationProvider.getApplicationContext(); field in OnDevicePersonalizationMaintenanceJobTest 134 sContext, TEST_OWNER, TEST_CERT_DIGEST); in setup() 135 mService = new ComponentName(sContext.getPackageName(), TEST_SERVICE_NAME); in setup() 138 sContext, in setup() 140 PackageUtils.getCertDigest(sContext, sContext.getPackageName())); in setup() 141 mEventsDao = EventsDao.getInstanceForTest(sContext); in setup() 147 OnDevicePersonalizationDbHelper.getInstanceForTest(sContext); in teardown() 158 mSpyOnDevicePersonalizationMaintenanceJob.getExecutionFuture(sContext, mMockParams); in testGetExecutionFuture() 163 verify(mSpyOnDevicePersonalizationMaintenanceJob).cleanupVendorData(sContext); in testGetExecutionFuture() 188 OnDevicePersonalizationMaintenanceJob.schedule(sContext); in testSchedule_spe() [all …]
|
/packages/modules/AdServices/adservices/tests/cts/ui/gaux/rpostotachannel/src/com/android/adservices/tests/ui/gaux/rpostotachannel/ |
D | GaUxRvcPostOTAChannelTest.java | 55 private static final Context sContext = field in GaUxRvcPostOTAChannelTest 62 UiUtils.resetAdServicesConsentData(sContext); in setUp() 73 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 96 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 109 AdservicesTestHelper.killAdservicesProcess(sContext); in testU18ToGAForRPostOTA_optInMsmt() 123 sContext, mDevice, /* isDisplayed */ true, /* isEuTest */ false, UX.RVC_UX); in testU18ToGAForRPostOTA_optInMsmt() 131 AdservicesTestHelper.killAdservicesProcess(sContext); in testU18ToGAForRPostOTA_optInMsmt() 137 sContext, mDevice, /* isDisplayed */ true, /* isEuTest */ false, UX.GA_UX); in testU18ToGAForRPostOTA_optInMsmt() 143 sContext, mDevice, /* isDisplayed */ false, /* isEuTest */ false, UX.GA_UX); in testU18ToGAForRPostOTA_optInMsmt() 149 sContext, in testU18ToGAForRPostOTA_optInMsmt() [all …]
|
/packages/modules/AdServices/adservices/tests/cts/ui/gaux/legacy/src/com.android.adservices.tests.ui.gaux/ |
D | GaUxNotificationRetriggerTest.java | 53 private static final Context sContext = field in GaUxNotificationRetriggerTest 70 UiUtils.resetAdServicesConsentData(sContext); in setUp() 72 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 92 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 106 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaRowAdIdEnabled() 111 sContext, in testGaRowAdIdEnabled() 120 sContext, in testGaRowAdIdEnabled() 137 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaRowAdIdDisabled() 142 sContext, in testGaRowAdIdDisabled() 151 sContext, in testGaRowAdIdDisabled() [all …]
|
D | GaUxNotificationTriggerTest.java | 53 private static final Context sContext = field in GaUxNotificationTriggerTest 69 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 88 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 102 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaRowAdIdEnabled() 107 sContext, in testGaRowAdIdEnabled() 124 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaRowAdIdDisabled() 129 sContext, in testGaRowAdIdDisabled() 146 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaEuAdIdEnabled() 151 sContext, in testGaEuAdIdEnabled() 166 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaEuAdIdDisabled() [all …]
|
D | ReconsentNotificationTriggerTest.java | 62 private static final Context sContext = field in ReconsentNotificationTriggerTest 72 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 95 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 139 sContext, in testRowAdIdEnabledGaUxEnabledReConsentSecondNotDisplayed() 168 AdservicesTestHelper.killAdservicesProcess(sContext); in testEuAdIdEnabledGaUxEnabledReconsent() 171 sContext, in testEuAdIdEnabledGaUxEnabledReconsent() 181 AdservicesTestHelper.killAdservicesProcess(sContext); in testEuAdIdEnabledGaUxEnabledReconsent() 187 sContext, in testEuAdIdEnabledGaUxEnabledReconsent() 199 AdservicesTestHelper.killAdservicesProcess(sContext); in testDeleteStatus() 237 AdservicesTestHelper.killAdservicesProcess(sContext); [all …]
|
/packages/modules/AdServices/adservices/tests/cts/ui/u18ux/debugchannel/src/com/android/adservices/tests/ui/u18ux/debugchannel/ |
D | U18UxDebugChannelTest.java | 58 private static final Context sContext = field in U18UxDebugChannelTest 68 AdservicesTestHelper.killAdservicesProcess(sContext); in setUp() 70 UiUtils.resetAdServicesConsentData(sContext); in setUp() 78 sCommonManager = AdServicesCommonManager.get(sContext); in setUp() 105 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 115 AdservicesTestHelper.killAdservicesProcess(sContext); in testEntrypointDisabled() 129 sContext, in testEntrypointDisabled() 143 AdservicesTestHelper.killAdservicesProcess(sContext); in testU18AdultBothTrueAdIdEnabled() 157 sContext, in testU18AdultBothTrueAdIdEnabled() 171 AdservicesTestHelper.killAdservicesProcess(sContext); in testU18TrueAdultFalseAdIdEnabled() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/ |
D | EnrollmentTest.java | 68 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_success() 82 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_enrollmentDataNull() 96 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_blockedByEnrollmentBlockList() 110 REGISTRATION_URI, PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_packageManifestCheckFailure() 125 Uri.parse(localhost), PACKAGE_NAME, mEnrollmentDao, sContext, mFlags)); in testMaybeGetEnrollmentId_localhost_success() local 129 Uri.parse(localhostWithPort), PACKAGE_NAME, mEnrollmentDao, sContext, in testMaybeGetEnrollmentId_localhost_success() local 134 Uri.parse(localhostWithPortAndPath), PACKAGE_NAME, mEnrollmentDao, sContext, in testMaybeGetEnrollmentId_localhost_success() local 140 sContext, mFlags)); in testMaybeGetEnrollmentId_localhost_success() local 144 Uri.parse(localhostWithPath), PACKAGE_NAME, mEnrollmentDao, sContext, in testMaybeGetEnrollmentId_localhost_success() local 150 sContext, mFlags)); in testMaybeGetEnrollmentId_localhost_success() local [all …]
|
/packages/modules/AdServices/adservices/tests/cts/ui/rvcux/alreadyenrolledchannel/src/com/android/adservices/tests/ui/rvcux/alreadyenrolledchannel/ |
D | RvcUxAlreadyEnrolledChannelTest.java | 59 private static final Context sContext = field in RvcUxAlreadyEnrolledChannelTest 68 AdservicesTestHelper.killAdservicesProcess(sContext); in setUp() 69 UiUtils.resetAdServicesConsentData(sContext); in setUp() 79 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 104 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 114 AdservicesTestHelper.killAdservicesProcess(sContext); in testU18NotificationDisplayedForRvcUX_row() 129 sContext, mDevice, /* isDisplayed */ true, /* isEuTest */ false, UX.RVC_UX); in testU18NotificationDisplayedForRvcUX_row() 136 sContext, mDevice, /* isDisplayed */ false, /* isEuTest */ false, UX.RVC_UX); in testU18NotificationDisplayedForRvcUX_row() 141 sContext, in testU18NotificationDisplayedForRvcUX_row() 155 AdservicesTestHelper.killAdservicesProcess(sContext); in testU18NotificationDisplayedForRvcUX_eu() [all …]
|
/packages/modules/AdServices/adservices/tests/cts/ui/gaux/alreadyenrolledchannel/src/com/android/adservices/tests/ui/gaux/alreadyenrolledchannel/ |
D | GaUxAlreadyEnrolledChannelTest.java | 59 private static final Context sContext = field in GaUxAlreadyEnrolledChannelTest 67 AdservicesTestHelper.killAdservicesProcess(sContext); in setUp() 68 UiUtils.resetAdServicesConsentData(sContext); in setUp() 77 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 127 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 140 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaRowAdIdEnabled() 153 sContext, mDevice, /* isDisplayed */ true, /* isEuTest */ false, UX.GA_UX); in testGaRowAdIdEnabled() 160 sContext, mDevice, /* isDisplayed */ false, /* isEuTest */ false, UX.GA_UX); in testGaRowAdIdEnabled() 172 AdservicesTestHelper.killAdservicesProcess(sContext); in testGaRowAdIdDisabled() 185 sContext, mDevice, /* isDisplayed */ true, /* isEuTest */ true, UX.GA_UX); in testGaRowAdIdDisabled() [all …]
|
/packages/modules/AdServices/adservices/tests/cts/ui/gaux/graduationchannel/src/com/android/adservices/tests/ui/gaux/graduationchannel/ |
D | GaUxGraduationChannelTest.java | 56 private static final Context sContext = field in GaUxGraduationChannelTest 64 AdservicesTestHelper.killAdservicesProcess(sContext); in setUp() 65 UiUtils.resetAdServicesConsentData(sContext); in setUp() 74 mCommonManager = AdServicesCommonManager.get(sContext); in setUp() 124 AdservicesTestHelper.killAdservicesProcess(sContext); in tearDown() 138 AdservicesTestHelper.killAdservicesProcess(sContext); in testRowU18ToGaAdIdEnabled() 151 sContext, mDevice, /* isDisplayed */ true, /* isEuTest */ false, UX.U18_UX); in testRowU18ToGaAdIdEnabled() 154 AdservicesTestHelper.killAdservicesProcess(sContext); in testRowU18ToGaAdIdEnabled() 167 sContext, mDevice, /* isDisplayed */ false, /* isEuTest */ false, UX.GA_UX); in testRowU18ToGaAdIdEnabled() 181 AdservicesTestHelper.killAdservicesProcess(sContext); in testRowU18ToBetaAdIdEnabled() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/ |
D | CustomAudienceServiceImplTest.java | 148 sContext, in setup() 159 sContext, in setup() 212 sContext, in testJoinCustomAudience_runNormally() 233 sContext, in testJoinCustomAudience_runNormally() 275 sContext, in testJoinCustomAudienceWithRevokedUserConsentSuccess() 300 sContext, in testJoinCustomAudience_notInBinderThread() 311 sContext, in testJoinCustomAudience_notInBinderThread() 333 sContext, in testJoinCustomAudience_notInBinderThread() 359 sContext, in testJoinCustomAudience_ownerAssertFailed() 433 sContext, in testJoinCustomAudience_errorCreateCustomAudience() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | FledgeAuthorizationFilterTest.java | 196 sContext, in testAssertAppHasCaPermission_appHasPermission() 202 sContext, in testAssertAppHasCaPermission_appHasPermission() 221 sContext, in testAssertAppHasPasPermission_appHasPermission() 222 sContext.getPackageName(), in testAssertAppHasPasPermission_appHasPermission() 227 sContext, in testAssertAppHasPasPermission_appHasPermission() 245 sContext, sPackageName, ACCESS_ADSERVICES_PROTECTED_SIGNALS)) in testAssertAppHasAnyPermission_appHasAllPermissions() 248 sContext, sPackageName, ACCESS_ADSERVICES_CUSTOM_AUDIENCE)) in testAssertAppHasAnyPermission_appHasAllPermissions() 251 sContext, in testAssertAppHasAnyPermission_appHasAllPermissions() 257 sContext, in testAssertAppHasAnyPermission_appHasAllPermissions() 279 sContext, sPackageName, ACCESS_ADSERVICES_PROTECTED_SIGNALS)) in testAssertAppHasAnyPermission_appHasOnePermission() [all …]
|
/packages/modules/AdServices/adservices/tests/cts/endtoends/permissions/noperm/src/com/android/adservices/tests/permissions/ |
D | PermissionsNoPermTest.java | 75 AdservicesTestHelper.killAdservicesProcess(sContext); in setup() 76 mHasAccessToDevOverrides = DevContextUtils.isDevOptionsEnabled(sContext, TAG); in setup() 84 .setContext(sContext) in testNoPerm_topics() 99 .setContext(sContext) in testPermissionNotRequested_fledgeJoinCustomAudience() 122 .setContext(sContext) in testPermissionNotRequested_fledgeFetchAndJoinCustomAudience() 143 .setContext(sContext) in testPermissionNotRequested_fledgeLeaveCustomAudience() 165 .setContext(sContext) in testPermissionNotRequested_fledgeOverrideCustomAudienceRemoteInfo() 193 .setContext(sContext) in testPermissionNotRequested_fledgeRemoveCustomAudienceRemoteInfoOverride() 219 .setContext(sContext) in testPermissionNotRequested_fledgeResetAllCustomAudienceOverrides() 236 .setContext(sContext) in testPermissionNotRequested_selectAds_adSelectionConfig() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/signals/ |
D | PeriodicEncodingJobServiceTest.java | 91 private static final JobScheduler JOB_SCHEDULER = sContext.getSystemService(JobScheduler.class); 124 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(sContext, mMockFlags); in testOnStartJobFlagDisabled_withoutLogging() 136 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(sContext, mMockFlags); in testOnStartJobFlagDisabled_withLogging() 154 new ComponentName(sContext, PeriodicEncodingJobService.class)) in testOnStartJobConsentRevokedGaUxDisabled() 169 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(sContext, mMockFlags); in testOnStartJobConsentRevokedGaUxEnabled_withoutLogging() 181 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(sContext, mMockFlags); in testOnStartJobConsentRevokedGaUxEnabled_withLogging() 199 new ComponentName(sContext, PeriodicEncodingJobService.class)) in testOnStartJobProtectedSignalsKillSwitchOn() 235 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(sContext, mMockFlags); in testOnStartJobUpdateSuccess_withLogging() 248 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(sContext, mMockFlags); in testOnStartJobUpdateTimeoutHandled_withoutLogging() 259 AdServicesJobServiceLogger logger = mockAdServicesJobServiceLogger(sContext, mMockFlags); in testOnStartJobUpdateTimeoutHandled_withLogging() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/shared/ |
D | SharedDbHelperTest.java | 73 protected static final Context sContext = ApplicationProvider.getApplicationContext(); field in SharedDbHelperTest 81 .map(sContext::getDatabasePath) in setup() 104 sContext, in testNewInstall() 111 sContext, MIGRATION_DB_REFERENCE_NAME, SharedDbHelper.DATABASE_VERSION_V3); in testNewInstall() 119 sContext, in testNewInstall_sharedDbV4() 126 sContext, MIGRATION_DB_REFERENCE_NAME, SharedDbHelper.DATABASE_VERSION_V4); in testNewInstall_sharedDbV4() 132 DbHelperV1 dbHelperV1 = new DbHelperV1(sContext, OLD_TEST_DB_NAME, 1); in testEnrollmentTableMigrationFromOldDatabase() 138 new DbHelper(sContext, OLD_TEST_DB_NAME, ENROLLMENT_OLD_DB_FINAL_VERSION); in testEnrollmentTableMigrationFromOldDatabase() 145 sContext, SHARED_DB_NAME, SharedDbHelper.DATABASE_VERSION_V3, dbHelper); in testEnrollmentTableMigrationFromOldDatabase() 150 sContext, MIGRATION_DB_REFERENCE_NAME, SharedDbHelper.DATABASE_VERSION_V3); in testEnrollmentTableMigrationFromOldDatabase() [all …]
|
/packages/modules/AdServices/adservices/tests/cts/endtoends/permissions/appoptout/src/com/android/adservices/tests/permissions/ |
D | PermissionsAppOptOutTest.java | 65 AdservicesTestHelper.killAdservicesProcess(sContext); in setup() 72 .setContext(sContext) in testAppOptOut_topics() 87 .setContext(sContext) in testNoEnrollment_fledgeJoinCustomAudience() 110 .setContext(sContext) in testNoEnrollment_fledgeFetchAndJoinCustomAudience() 132 .setContext(sContext) in testWithEnrollment_fledgeJoinCustomAudience() 153 .setContext(sContext) in testNoEnrollment_fledgeLeaveCustomAudience() 174 .setContext(sContext) in testWithEnrollment_fledgeLeaveCustomAudience() 195 .setContext(sContext) in testNoEnrollment_selectAds_adSelectionConfig() 216 .setContext(sContext) in testWithEnrollment_selectAds_adSelectionConfig() 238 .setContext(sContext) in testNoEnrollment_selectAds_adSelectionFromOutcomesConfig() [all …]
|
/packages/modules/Permission/tests/cts/permission/src/android/permission/cts/ |
D | LocationAccessCheckTest.java | 129 private static final Context sContext = InstrumentationRegistry.getTargetContext(); field in LocationAccessCheckTest 131 sContext.getSystemService(ActivityManager.class); 132 private static final PackageManager sPackageManager = sContext.getPackageManager(); 134 sContext.getSystemService(AppOpsManager.class); 136 sContext.getSystemService(LocationManager.class); 140 private static final String PERMISSION_CONTROLLER_PKG = sContext.getPackageManager() 158 sContext.getPackageManager(), MainlineModule.PERMISSION_CONTROLLER)); in assumeNotPlayManaged() 167 new DeviceConfigStateChangerRule(sContext, 175 new DeviceConfigStateChangerRule(sContext, 183 new DeviceConfigStateChangerRule(sContext, [all …]
|
D | BaseNotificationListenerCheckTest.java | 100 private static final Context sContext = InstrumentationRegistry.getTargetContext(); field in BaseNotificationListenerCheckTest 101 private static final PackageManager sPackageManager = sContext.getPackageManager(); 105 private static final String PERMISSION_CONTROLLER_PKG = sContext.getPackageManager() 113 new DeviceConfigStateChangerRule(sContext, 121 new DeviceConfigStateChangerRule(sContext, 129 new DeviceConfigStateChangerRule(sContext, 136 new CtsNotificationListenerHelperRule(sContext); 187 sContext.getSystemService(NotificationManager.class); in disallowPreexistingNotificationListeners() 244 assumeTrue(SafetyCenterUtils.deviceSupportsSafetyCenter(sContext)); in assumeDeviceSupportsSafetyCenter() 251 assumeFalse(SafetyCenterUtils.deviceSupportsSafetyCenter(sContext)); in assumeDeviceDoesNotSupportSafetyCenter()
|
/packages/modules/AdServices/shared/libraries/device-side/java/com/android/adservices/shared/common/ |
D | ApplicationContextSingleton.java | 40 private static final AtomicReference<Context> sContext = new AtomicReference<>(); field in ApplicationContextSingleton 48 Context context = sContext.get(); in get() 69 if (sContext.compareAndSet(null, appContext)) { in set() 75 Context currentAppContext = sContext.get(); in set() 96 Context context = sContext.get(); in getForTests() 110 LogUtil.i("setForTests(): from %s to %s.", sContext.get(), context); in setForTests() 111 sContext.set(context); in setForTests()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/topics/classifier/ |
D | ModelManagerTest.java | 127 sContext, in testRetrieveModel_bundled_emptyDownloadedFiles() 156 sContext, in testRetrieveModel_bundled_forceUsingBundledFiles() 178 sContext, in testRetrieveModel_bundled_incorrectFilePath() 214 sContext, in testRetrieveModel_downloaded() 239 sContext, in testRetrieveLabels_bundled_successfulRead() 263 .thenReturn(sContext.getAssets().open(PRODUCTION_LABELS_FILE_PATH)); in testRetrieveLabels_downloaded_successfulRead() 270 sContext, in testRetrieveLabels_downloaded_successfulRead() 291 sContext, in testRetrieveLabels_bundled_emptyListReturnedOnException() 318 sContext, in testRetrieveLabels_downloaded_emptyListReturnedOnException() 342 sContext, in testLoadedAppTopics_bundled() [all …]
|
/packages/modules/RemoteKeyProvisioning/app/tests/e2e/src/com/android/rkpdapp/e2etest/ |
D | RkpdHostTestHelperTests.java | 65 private static Context sContext; field in RkpdHostTestHelperTests 87 sContext = ApplicationProvider.getApplicationContext(); in init() 99 .that(ServerInterface.isNetworkConnected(sContext)) in setUp() 103 Settings.clearPreferences(sContext); in setUp() 104 mKeyDao = RkpdDatabase.getDatabase(sContext).provisionedKeyDao(); in setUp() 108 sContext, in setUp() 119 Settings.clearPreferences(sContext); in tearDown() 179 Settings.getExtraSignedKeysAvailable(sContext), in testPeriodicProvisionerNoop() 180 Settings.getExpirationTime(sContext)); in testPeriodicProvisionerNoop() 186 Settings.getExtraSignedKeysAvailable(sContext), in testPeriodicProvisionerNoop() [all …]
|