Home
last modified time | relevance | path

Searched refs:getApplicationContext (Results 1 – 25 of 2760) sorted by relevance

12345678910>>...111

/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/ui/handheld/v31/
DDashboardUtilsTest.kt35 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationSecondsOne()
42 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationSecondsOther()
49 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationMinutesOne()
56 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationMinutesOther()
63 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationHoursOne()
70 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationHoursOther()
77 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationDaysOne()
84 assertThat(getTimeDiffStr(ApplicationProvider.getApplicationContext(), duration)) in getTimeDiffStr_durationDaysOther()
91 assertThat(getDurationUsedStr(ApplicationProvider.getApplicationContext(), duration)) in getDurationUsedStr_durationSecondsOne()
98 assertThat(getDurationUsedStr(ApplicationProvider.getApplicationContext(), duration)) in getDurationUsedStr_durationSecondsOther()
[all …]
/packages/apps/CellBroadcastReceiver/tests/testapp/src/com/android/cellbroadcastreceiver/tests/
DSendTestBroadcastActivity.java132 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
147 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
163 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
178 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
193 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
208 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
223 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
238 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
253 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
268 SendTestBroadcastActivity.this.getApplicationContext(), in onCreate()
[all …]
/packages/modules/Connectivity/tests/cts/hostside-network-policy/app2/src/com/android/cts/netpolicy/hostside/app2/
DMyService.java66 final Context context = getApplicationContext();
80 return MyBroadcastReceiver.getCounter(getApplicationContext(), action, receiverName);
85 return Common.checkNetworkStatus(getApplicationContext(), customUrl);
90 return MyBroadcastReceiver.getRestrictBackgroundStatus(getApplicationContext());
95 MyBroadcastReceiver.sendNotification(getApplicationContext(), NOTIFICATION_CHANNEL_ID,
167 final JobScheduler jobScheduler = getApplicationContext()
180 final Context context = getApplicationContext(); in onCreate()
184 mCm = (ConnectivityManager) getApplicationContext() in onCreate()
190 final Context context = getApplicationContext(); in onDestroy()
195 getApplicationContext().unregisterReceiver(mReceiver); in onDestroy()
/packages/apps/DocumentsUI/src/com/android/documentsui/
DDocumentsApplication.java86 return ((DocumentsApplication) context.getApplicationContext()).mProviders; in getProvidersCache()
90 final DocumentsApplication app = (DocumentsApplication) context.getApplicationContext(); in getThumbnailCache()
106 return ((DocumentsApplication) context.getApplicationContext()).mClipper; in getDocumentClipper()
110 return ((DocumentsApplication) context.getApplicationContext()).mClipStore; in getClipStore()
115 ((DocumentsApplication) context.getApplicationContext()).mUserIdManager; in getUserIdManager()
118 ((DocumentsApplication) context.getApplicationContext()).mUserIdManager = userIdManager; in getUserIdManager()
129 ((DocumentsApplication) context.getApplicationContext()).mUserManagerState; in getUserManagerState()
133 ((DocumentsApplication) context.getApplicationContext()).mUserManagerState = in getUserManagerState()
140 return ((DocumentsApplication) context.getApplicationContext()).mDragAndDropManager; in getDragAndDropManager()
144 return ((DocumentsApplication) context.getApplicationContext()).mFileTypeLookup; in getFileTypeLookup()
[all …]
/packages/apps/WallpaperPicker2/tests/robotests/src/com/android/wallpaper/module/
DDefaultWallpaperPreferencesTest.kt32 DefaultWallpaperPreferences(ApplicationProvider.getApplicationContext())
48 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setHomeStaticImageWallpaperMetadata_metadataShouldBeSavedToPreferences()
67 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setHomeStaticImageWallpaperMetadata_metadataShouldBeSavedToPreferences()
90 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setHomeLiveWallpaperMetadata_metadataShouldBeSavedToPreferences()
103 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setHomeLiveWallpaperMetadata_metadataShouldBeSavedToPreferences()
128 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setLockStaticImageWallpaperMetadata_metadataShouldBeSavedToPreferences()
147 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setLockStaticImageWallpaperMetadata_metadataShouldBeSavedToPreferences()
170 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setLockLiveWallpaperMetadata_metadataShouldBeSavedToPreferences()
183 (ApplicationProvider.getApplicationContext() as Context).getSharedPreferences( in setLockLiveWallpaperMetadata_metadataShouldBeSavedToPreferences()
/packages/apps/Messaging/src/com/android/messaging/util/
DUiUtils.java62 getApplicationContext().getResources().getInteger(
66 getApplicationContext().getResources().getInteger(
70 getApplicationContext().getResources().getInteger(
74 getApplicationContext().getResources().getInteger(
88 UiUtils.showToastAtBottom(getApplicationContext().getString(messageId)); in showToastAtBottom()
93 final Toast toast = Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG); in showToastAtBottom()
100 final Toast toast = Toast.makeText(getApplicationContext(), in showToast()
101 getApplicationContext().getString(messageId), Toast.LENGTH_LONG); in showToast()
108 final Toast toast = Toast.makeText(getApplicationContext(), in showToast()
109 getApplicationContext().getResources().getQuantityString(pluralsMessageId, count), in showToast()
[all …]
/packages/apps/CarrierConfig/src/com/android/carrierconfig/
DDefaultCarrierConfigService.java113 String sku = getApplicationContext().getResources().getString(R.string.sku_filter); in loadConfig()
118 parser.setInput(getApplicationContext().getAssets().open( in loadConfig()
124 getApplicationContext().getResources().getXml(R.xml.vendor_no_sim); in loadConfig()
140 TelephonyManager telephonyManager = getApplicationContext() in loadConfig()
144 for (String file : getApplicationContext().getAssets().list("")) { in loadConfig()
146 parser.setInput(getApplicationContext().getAssets().open(file), "utf-8"); in loadConfig()
150 parser.setInput(getApplicationContext().getAssets().open(file), "utf-8"); in loadConfig()
153 parser.setInput(getApplicationContext().getAssets().open(file), "utf-8"); in loadConfig()
169 parser.setInput(getApplicationContext().getAssets().open( in loadConfig()
181 XmlPullParser vendorInput = getApplicationContext().getResources().getXml(R.xml.vendor); in loadConfig()
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/
DBugleActionToasts.java76 if (AccessibilityUtil.isTouchExplorationEnabled(Factory.get().getApplicationContext())) { in onSendMessageOrManualDownloadActionCompleted()
100 final Context context = Factory.get().getApplicationContext(); in onMessageReceived()
124 Toast.makeText(getApplicationContext(), in showToast()
125 getApplicationContext().getString(messageResId), Toast.LENGTH_LONG).show(); in showToast()
134 Toast.makeText(getApplicationContext(), message, Toast.LENGTH_LONG).show(); in showToast()
139 private static Context getApplicationContext() { in getApplicationContext() method in BugleActionToasts
140 return Factory.get().getApplicationContext(); in getApplicationContext()
/packages/apps/Settings/tests/robotests/src/com/android/settings/gestures/
DButtonNavigationSettingsFragmentTest.java42 ApplicationProvider.getApplicationContext())).isNotEmpty(); in getNonIndexableKeys_twoAndThreeButtonNavigationNotAvailable_allKeysNonIndexable()
47 addPackageToPackageManager(ApplicationProvider.getApplicationContext(), in getNonIndexableKeys_twoButtonNavigationAvailable_allKeysExceptAnimIndexable()
50 ApplicationProvider.getApplicationContext())).containsExactly( in getNonIndexableKeys_twoButtonNavigationAvailable_allKeysExceptAnimIndexable()
56 addPackageToPackageManager(ApplicationProvider.getApplicationContext(), in getNonIndexableKeys_threeButtonNavigationAvailable_allKeysExceptAnimIndexable()
59 ApplicationProvider.getApplicationContext())).containsExactly( in getNonIndexableKeys_threeButtonNavigationAvailable_allKeysExceptAnimIndexable()
/packages/modules/AppSearch/testing/mockingservicestests/src/com/android/server/appsearch/stats/
DMockingPlatformLoggerTest.java67 ApplicationProvider.getApplicationContext(), in testCreateExtraStatsLocked_samplingIntervalNotSet_returnsDefault()
102 ApplicationProvider.getApplicationContext(), mAppSearchConfig); in testCreateExtraStatsLocked_samplingIntervalSet_returnsConfigured()
151 ApplicationProvider.getApplicationContext(), in testShouldLogForTypeLocked_trueWhenSampleIntervalIsOne()
170 ApplicationProvider.getApplicationContext(), in testShouldLogForTypeLocked_falseWhenSampleIntervalIsNegative()
194 ApplicationProvider.getApplicationContext(), in testShouldLogForTypeLocked_falseWhenWithinCoolOffInterval()
223 ApplicationProvider.getApplicationContext(), in testShouldLogForTypeLocked_trueWhenOutsideOfCoolOffInterval()
247 ApplicationProvider.getApplicationContext(), in testAddStatsToQueueLocked_zeroCapacity()
273 ApplicationProvider.getApplicationContext(), in testAddStatsToQueueLocked_negativeCapacity()
299 ApplicationProvider.getApplicationContext(), in testAddStatsToQueueLocked_oneApi()
342 ApplicationProvider.getApplicationContext(), in testAddStatsToQueueLocked_capacityChanged()
/packages/modules/CellBroadcastService/src/com/android/cellbroadcastservice/
DDefaultCellBroadcastService.java62 GsmCellBroadcastHandler.makeGsmCellBroadcastHandler(getApplicationContext()); in onCreate()
64 CellBroadcastHandler.makeCellBroadcastHandler(getApplicationContext()); in onCreate()
66 CdmaServiceCategoryProgramHandler.makeScpHandler(getApplicationContext()); in onCreate()
86 int subId = CellBroadcastHandler.getSubIdForPhone(getApplicationContext(), slotIndex); in onCdmaCellBroadcastSms()
94 SmsCbMessage message = parseCdmaBroadcastSms(getApplicationContext(), slotIndex, plmn, in onCdmaCellBroadcastSms()
97 CellBroadcastServiceMetrics.getInstance().logMessageReported(getApplicationContext(), in onCdmaCellBroadcastSms()
171 getApplicationContext(), intent)); in dump()
/packages/services/Telecomm/testapps/src/com/android/server/telecom/testapps/
DTestConnectionService.java188 LocalBroadcastManager.getInstance(getApplicationContext()).registerReceiver( in TestConnection()
193 LocalBroadcastManager.getInstance(getApplicationContext()).registerReceiver( in TestConnection()
196 LocalBroadcastManager.getInstance(getApplicationContext()).registerReceiver( in TestConnection()
216 mRttChatbot = new RttChatbot(getApplicationContext(), in startOutgoing()
238 mRttChatbot = new RttChatbot(getApplicationContext(), in onAnswer()
296 mRttChatbot = new RttChatbot(getApplicationContext(), rttTextStream); in handleRttUpgradeResponse()
307 mRttChatbot = new RttChatbot(getApplicationContext(), textStream); in onStartRtt()
320 LocalBroadcastManager.getInstance(getApplicationContext()).unregisterReceiver(
322 LocalBroadcastManager.getInstance(getApplicationContext()).unregisterReceiver(
381 Toast.makeText(getApplicationContext(), "Got subject :" + callSubject,
[all …]
/packages/modules/Permission/PermissionController/tests/mocking/src/com/android/permissioncontroller/tests/mocking/permission/utils/
DStringUtilsTest.kt34 ApplicationProvider.getApplicationContext(), in getIcuPluralsString_one_noArguments()
46 ApplicationProvider.getApplicationContext(), in getIcuPluralsString_other_noArguments()
58 ApplicationProvider.getApplicationContext(), in getIcuPluralsString_one_additionalArguments()
71 ApplicationProvider.getApplicationContext(), in getIcuPluralsString_other_additionalArguments()
/packages/modules/Permission/tests/utils/safetycenter/java/com/android/safetycenter/testing/
DTestActivity.kt61 ComponentName(getApplicationContext(), TestActivity::class.java.name + "Priority") in setAliasEnabledState()
62 getApplicationContext() in setAliasEnabledState()
67 private fun getApplicationContext(): Context = ApplicationProvider.getApplicationContext() method
/packages/apps/Car/Settings/src/com/android/car/settings/setupservice/
DInitialLockSetupService.java72 LockPatternUtils lockPatternUtils = new LockPatternUtils(getApplicationContext()); in onBind()
131 PasswordHelper helper = new PasswordHelper(getApplicationContext(), getUserId()); in checkValidLock()
144 InitialLockSetupService.this.getApplicationContext()); in setLock()
154 PasswordHelper helper = new PasswordHelper(getApplicationContext(), userId); in setLock()
176 return getApplicationContext().getString(R.string.locktype_unavailable); in checkValidLockAndReturnError()
178 PasswordHelper helper = new PasswordHelper(getApplicationContext(), getUserId()); in checkValidLockAndReturnError()
/packages/modules/HealthFitness/tests/unittests/src/android/health/connect/
DHealthConnectManagerTest.java57 Context context = ApplicationProvider.getApplicationContext(); in testHealthConnectManager_getNoGrantedHealthPermissions_succeeds()
69 Context context = ApplicationProvider.getApplicationContext(); in testHealthConnectManager_getSomeGrantedHealthPermissions_succeeds()
89 Context context = ApplicationProvider.getApplicationContext(); in testHealthConnectManager_getGrantedHealthPermissionsException_rethrows()
101 Context context = ApplicationProvider.getApplicationContext(); in testHealthConnectManager_upsertMedicalResources_throws()
115 Context context = ApplicationProvider.getApplicationContext(); in testHealthConnectManager_deleteResources_notImplemented()
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastAlertDialog.java272 getApplicationContext(), subId, in initDrawableAndImageView()
274 .getRoamingOperatorSupported(getApplicationContext())) in initDrawableAndImageView()
312 getApplicationContext(), message.getSubscriptionId()); in startScreenOnTimer()
525 if (!CellBroadcastSettings.getResourcesForDefaultSubId(getApplicationContext()) in onCreate()
527 .getResourcesForDefaultSubId(getApplicationContext()) in onCreate()
583 Resources res = CellBroadcastSettings.getResourcesByOperator(getApplicationContext(), in onCreate()
585 CellBroadcastReceiver.getRoamingOperatorSupported(getApplicationContext())); in onCreate()
590 getApplicationContext())); in onCreate()
665 getApplicationContext(), true, true, false); in onUserLeaveHint()
738 Resources res = CellBroadcastSettings.getResourcesByOperator(getApplicationContext(), in getLinkMethod()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/reporting/
DReportingJobService.java105 getApplicationContext(), /* forceSchedule= */ false); in onStartJob()
239 DatastoreManagerFactory.getDatastoreManager(getApplicationContext()); in saveExecutionStartTime()
276 saveNextExecution(getApplicationContext(), null);
319 DatastoreManagerFactory.getDatastoreManager(getApplicationContext());
323 datastoreManager, getApplicationContext()),
328 getApplicationContext())
350 getApplicationContext()),
355 getApplicationContext())
/packages/apps/Messaging/src/com/android/messaging/sms/
DSmsStorageStatusManager.java63 final Context context = Factory.get().getApplicationContext(); in postStorageLowNotification()
83 NotificationManagerCompat.from(Factory.get().getApplicationContext()); in postStorageLowNotification()
94 NotificationManagerCompat.from(Factory.get().getApplicationContext()); in cancelStorageLowNotification()
100 return Factory.get().getApplicationContext().getPackageName() + ":smsstoragelow"; in getNotificationTag()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/common/
DEncryptionControllerProvider.java31 return getApplicationContext(context).getEncryptionController();
34 private ManagedProvisioningBaseApplication getApplicationContext(Context context) {
35 return (ManagedProvisioningBaseApplication) context.getApplicationContext();
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DBugleNotifications.java218 NotificationManagerCompat.from(Factory.get().getApplicationContext()); in cancel()
243 final Context context = Factory.get().getApplicationContext(); in cancel()
305 final Context context = Factory.get().getApplicationContext(); in shouldNotify()
325 final Context context = Factory.get().getApplicationContext(); in shouldVibrate()
349 final Context context = Factory.get().getApplicationContext(); in buildNotificationTag()
397 final Resources resources = Factory.get().getApplicationContext().getResources(); in checkInitialized()
413 final Context context = Factory.get().getApplicationContext(); in processAndSend()
616 final Context context = Factory.get().getApplicationContext(); in createMessageNotification()
683 final Context context = Factory.get().getApplicationContext(); in sendNotification()
778 final Context context = Factory.get().getApplicationContext(); in fireOffNotification()
[all …]
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/
DHealthConnectDailyService.java79 HealthConnectDailyJobs.execute(getApplicationContext(), params); in onStartJob()
87 getApplicationContext()); in onStartJob()
95 getApplicationContext()); in onStartJob()
105 getApplicationContext(), Clock.systemUTC())); in onStartJob()
/packages/apps/Settings/src/com/android/settings/homepage/contextualcards/
DFaceReEnrollDialog.java58 final PackageManager pm = getApplicationContext().getPackageManager(); in onCreate()
71 mFaceManager = Utils.getFaceManagerOrNull(getApplicationContext()); in onCreate()
72 mFaceUpdater = new FaceUpdater(getApplicationContext(), mFaceManager); in onCreate()
74 final Context context = getApplicationContext(); in onCreate()
/packages/apps/Car/DebuggingRestrictionController/app/src/androidTest/java/com/android/car/debuggingrestrictioncontroller/
DLoginTest.java19 import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
93 Context ctx = getApplicationContext(); in invalidEmail()
102 Context ctx = getApplicationContext(); in invalidPassword()
156 toPackage(getApplicationContext().getPackageName()), in startTokenActivity()
166 Intent intent = new Intent(getApplicationContext(), TokenActivity.class); in returnedFromTokenActivityOK()
170 toPackage(getApplicationContext().getPackageName()), in returnedFromTokenActivityOK()
189 Intent intent = new Intent(getApplicationContext(), TokenActivity.class); in returnedFromTokenActivityCancelled()
193 toPackage(getApplicationContext().getPackageName()), in returnedFromTokenActivityCancelled()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/attribution/
DAttributionFallbackJobService.java96 getApplicationContext(), /* forceSchedule */ false); in onStartJob()
100 getApplicationContext(), /* forceSchedule */ false); in onStartJob()
103 getApplicationContext(), /* forceSchedule */ false); in onStartJob()
123 getApplicationContext()), in processPendingAttributions()
125 getApplicationContext(), FlagsFactory.getFlags())) in processPendingAttributions()

12345678910>>...111