Home
last modified time | relevance | path

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

123456789

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowPackageManagerTest.java120 ApplicationProvider.getApplicationContext().getPackageManager(); in setUp()
128 ApplicationProvider.getApplicationContext() in packageInstallerCreateSession()
147 ApplicationProvider.getApplicationContext() in packageInstallerOpenSession()
208 ApplicationProvider.getApplicationContext().getPackageName(); in testCheckPermission_thisPackage()
348 intent.setPackage(ApplicationProvider.getApplicationContext().getPackageName()); in testQueryBroadcastReceiverSucceeds()
370 intent.setPackage(ApplicationProvider.getApplicationContext().getPackageName()); in testQueryBroadcastReceiver_matchAllWithoutIntentFilter()
384 ApplicationProvider.getApplicationContext().getPackageName(), in testGetPackageInfo_ForReceiversSucceeds()
444 ApplicationProvider.getApplicationContext() in getPermissionGroupInfo_fromManifest()
557 ApplicationProvider.getApplicationContext().getPackageName(), 0); in getApplicationInfo_ThisApplication()
560 .isEqualTo(ApplicationProvider.getApplicationContext().getPackageName()); in getApplicationInfo_ThisApplication()
[all …]
DShadowStatusBarManagerTest.java4 import static androidx.test.core.app.ApplicationProvider.getApplicationContext;
26 getApplicationContext().getSystemService(Context.STATUS_BAR_SERVICE))) in getDisable()
38 getApplicationContext().getSystemService(Context.STATUS_BAR_SERVICE))) in getDisable2()
47 getApplicationContext().getSystemService(Context.STATUS_BAR_SERVICE), in callDisableMethodofStatusBarManager()
56 getApplicationContext().getSystemService(Context.STATUS_BAR_SERVICE), in callDisable2MethodofStatusBarManager()
DSQLiteOpenHelperTest.java24 helper = new TestOpenHelper(ApplicationProvider.getApplicationContext(), "path", null, 1); in setUp()
99 new TestOpenHelper(ApplicationProvider.getApplicationContext(), path1, null, 1); in testGetPath()
101 ApplicationProvider.getApplicationContext().getDatabasePath(path1).getAbsolutePath(); in testGetPath()
105 new TestOpenHelper(ApplicationProvider.getApplicationContext(), path2, null, 1); in testGetPath()
107 ApplicationProvider.getApplicationContext().getDatabasePath(path2).getAbsolutePath(); in testGetPath()
114 new TestOpenHelper(ApplicationProvider.getApplicationContext(), "path2", null, 1); in testCloseMultipleDbs()
129 new TestOpenHelper(ApplicationProvider.getApplicationContext(), "path2", null, 1); in testOpenMultipleDbsOnCreate()
168 new TestOpenHelper(ApplicationProvider.getApplicationContext(), "path2", null, 1); in testMultipleDbsPreserveData()
180 new TestOpenHelper(ApplicationProvider.getApplicationContext(), "path2", null, 1); in testCloseOneDbKeepsDataForOther()
DShadowRelativeLayoutTest.java22 ImageView imageView = new ImageView(ApplicationProvider.getApplicationContext()); in getRules_shouldShowAddRuleData_sinceApiLevel17()
23 RelativeLayout layout = new RelativeLayout(ApplicationProvider.getApplicationContext()); in getRules_shouldShowAddRuleData_sinceApiLevel17()
35 ImageView imageView = new ImageView(ApplicationProvider.getApplicationContext()); in getRules_shouldShowAddRuleData_uptoApiLevel16()
36 RelativeLayout layout = new RelativeLayout(ApplicationProvider.getApplicationContext()); in getRules_shouldShowAddRuleData_uptoApiLevel16()
DShadowContextWrapperTest.java48 private final Context context = ApplicationProvider.getApplicationContext();
269 Application application = ApplicationProvider.getApplicationContext(); in broadcastReceivers_shouldBeSharedAcrossContextsPerApplicationContext()
343 assertThat(activity.getApplicationContext()).isSameAs(activity.getApplicationContext()); in shouldReturnSameApplicationContextEveryTime()
345 …assertThat(activity.getApplicationContext()).isSameAs(Robolectric.setupActivity(Activity.class).ge… in shouldReturnSameApplicationContextEveryTime()
351 LayoutInflater.from(ApplicationProvider.getApplicationContext()) in shouldReturnApplicationContext_forViewContextInflatedWithApplicationContext()
354 assertThat(viewContext.getApplicationContext()) in shouldReturnApplicationContext_forViewContextInflatedWithApplicationContext()
355 .isEqualTo(ApplicationProvider.getApplicationContext()); in shouldReturnApplicationContext_forViewContextInflatedWithApplicationContext()
460 shadowOf((Application) ApplicationProvider.getApplicationContext()) in bindServiceDelegatesToShadowApplication()
503 assertThat(ApplicationProvider.getApplicationContext().getPackageManager()).isNotNull();
DShadowSoundPoolTest.java45 int soundId = soundPool.load(ApplicationProvider.getApplicationContext(), R.raw.sound, 1); in playedSoundsFromResourcesAreRecorded()
55 int soundId = soundPool.load(ApplicationProvider.getApplicationContext(), R.raw.sound, 1); in playedSoundsFromResourcesAreCollected()
109 int soundId = soundPool.load(ApplicationProvider.getApplicationContext(), R.raw.sound, 1); in notifyResourceLoaded_notifiesListener()
153 int soundId = soundPool.load(ApplicationProvider.getApplicationContext(), R.raw.sound, 1); in playedSoundsAreCleared()
DShadowWallpaperManagerTest.java17 WallpaperManager.getInstance(ApplicationProvider.getApplicationContext()); in getInstance_shouldCreateInstance()
24 WallpaperManager.getInstance(ApplicationProvider.getApplicationContext()); in sendWallpaperCommand_shouldNotThrowException()
DShadowBackupManagerTest.java43 shadowOf((Application) ApplicationProvider.getApplicationContext()) in setUp()
45 backupManager = new BackupManager(ApplicationProvider.getApplicationContext()); in setUp()
64 assertThat(new BackupManager(ApplicationProvider.getApplicationContext()).isBackupEnabled()) in setBackupEnabled_multipleInstances_shouldBeEnabled()
78 shadowOf((Application) ApplicationProvider.getApplicationContext()) in isBackupEnabled_noPermission_shouldThrowSecurityException()
DShadowScrollViewTest.java15 ScrollView scrollView = new ScrollView(ApplicationProvider.getApplicationContext()); in shouldSmoothScrollTo()
24 ScrollView scrollView = new ScrollView(ApplicationProvider.getApplicationContext()); in shouldSmoothScrollBy()
DShadowCheckedTextViewTest.java20 checkedTextView = new CheckedTextView(ApplicationProvider.getApplicationContext()); in beforeTests()
42 CheckedTextView view = new CheckedTextView(ApplicationProvider.getApplicationContext()); in toggle_shouldChangeCheckedness()
DShadowImageViewTest.java22 Resources resources = ApplicationProvider.getApplicationContext().getResources(); in getDrawableResourceId_shouldWorkWhenTheDrawableWasCreatedFromAResource()
24 ImageView imageView = new ImageView(ApplicationProvider.getApplicationContext()); in getDrawableResourceId_shouldWorkWhenTheDrawableWasCreatedFromAResource()
DShadowDatePickerDialogTest.java21 new DatePickerDialog(ApplicationProvider.getApplicationContext(), null, 2012, 6, 7); in returnsTheInitialYearMonthAndDayPassedIntoTheDatePickerDialog()
38 ApplicationProvider.getApplicationContext(), expectedDateSetListener, 2012, 6, 7); in savesTheCallback()
DShadowAppWidgetHostViewTest.java22 appWidgetHostView = new AppWidgetHostView(ApplicationProvider.getApplicationContext()); in setUp()
46 AppWidgetHost host = new AppWidgetHost(ApplicationProvider.getApplicationContext(), 0); in shouldBeAbleToHaveHostSet()
/external/subsampling-scale-image-view/sample/src/main/java/com/davemorrissey/labs/subscaleview/test/eventhandlingadvanced/
DAdvancedEventHandlingActivity.java42 …Toast.makeText(getApplicationContext(), "Single tap: " + ((int)sCoord.x) + ", " + ((int)sCoord.y),… in onCreate()
44 … Toast.makeText(getApplicationContext(), "Single tap: Image not ready", Toast.LENGTH_SHORT).show(); in onCreate()
52 …Toast.makeText(getApplicationContext(), "Long press: " + ((int)sCoord.x) + ", " + ((int)sCoord.y),… in onCreate()
54 … Toast.makeText(getApplicationContext(), "Long press: Image not ready", Toast.LENGTH_SHORT).show(); in onCreate()
61 …Toast.makeText(getApplicationContext(), "Double tap: " + ((int)sCoord.x) + ", " + ((int)sCoord.y),… in onCreate()
63 … Toast.makeText(getApplicationContext(), "Double tap: Image not ready", Toast.LENGTH_SHORT).show(); in onCreate()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/fakes/
DRoboMenuItemTest.java23 item = new RoboMenuItem(ApplicationProvider.getApplicationContext()); in setUp()
57 item.setActionView(new View(ApplicationProvider.getApplicationContext())); in expandActionView_shouldSetExpandedTrue()
64 item.setActionView(new View(ApplicationProvider.getApplicationContext())); in expandActionView_shouldInvokeListener()
77 item.setActionView(new View(ApplicationProvider.getApplicationContext())); in collapseActionView_shouldSetExpandedFalse()
85 item.setActionView(new View(ApplicationProvider.getApplicationContext())); in collapseActionView_shouldInvokeListener()
145 ApplicationProvider.getApplicationContext().getResources().getDrawable(R.drawable.an_image); in getIcon_shouldReturnDrawableFromSetIconDrawable()
DRoboMenuTest.java23 RoboMenu menu = new RoboMenu(ApplicationProvider.getApplicationContext()); in addAndRemoveMenuItems()
39 RoboMenu menu = new RoboMenu(ApplicationProvider.getApplicationContext()); in addSubMenu()
69 RoboMenu menu = new RoboMenu(ApplicationProvider.getApplicationContext()); in add_AddsItemsInOrder()
/external/androidplot/Examples/DemoApp/src/com/androidplot/demos/
DSimplePieChartActivity.java86 sf1.configure(getApplicationContext(), R.xml.pie_segment_formatter1); in onCreate()
91 sf2.configure(getApplicationContext(), R.xml.pie_segment_formatter2); in onCreate()
96 sf3.configure(getApplicationContext(), R.xml.pie_segment_formatter3); in onCreate()
101 sf4.configure(getApplicationContext(), R.xml.pie_segment_formatter4); in onCreate()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/
DShadowingTest.java25 assertThat(new Toast(ApplicationProvider.getApplicationContext()).toString()) in shouldDelegateToObjectToStringIfShadowHasNone()
31 assertFalse(new View(ApplicationProvider.getApplicationContext()).hashCode() == 0); in shouldDelegateToObjectHashCodeIfShadowHasNone()
36 View view = new View(ApplicationProvider.getApplicationContext()); in shouldDelegateToObjectEqualsIfShadowHasNone()
DResourceLoaderTest.java46 ApplicationProvider.getApplicationContext() in checkDefaultBooleanValue()
56 ApplicationProvider.getApplicationContext() in checkQualifiedBooleanValue()
77 LayoutInflater.from(ApplicationProvider.getApplicationContext()) in checkForPollutionHelper()
105 assertThat(ApplicationProvider.getApplicationContext().getResources().getString(resId)) in shouldMakeInternalResourcesAvailable()
DDrawableResourceLoaderTest.java35 resources = ApplicationProvider.getApplicationContext().getResources(); in setup()
41 ApplicationProvider.getApplicationContext().getResources().getDrawable(R.drawable.rainbow)); in testGetDrawable_rainbow()
78 ApplicationProvider.getApplicationContext() in testLayerDrawable_xlarge()
89 ApplicationProvider.getApplicationContext() in testLayerDrawable()
/external/libchrome/base/android/java/src/org/chromium/base/
DBuildInfo.java58 String hostPackageName = ContextUtils.getApplicationContext().getPackageName(); in getAll()
90 Context appContext = ContextUtils.getApplicationContext(); in BuildInfo()
138 currentResourcesVersion = ContextUtils.getApplicationContext().getString( in BuildInfo()
189 return ContextUtils.getApplicationContext().getApplicationInfo().targetSdkVersion >= 28; in targetsAtLeastP()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DRequestManagerRetriever.java72 applicationManager = new RequestManager(context.getApplicationContext(), in getApplicationManager()
99 return get(activity.getApplicationContext()); in get()
112 return get(fragment.getActivity().getApplicationContext()); in get()
125 return get(activity.getApplicationContext()); in get()
146 return get(fragment.getActivity().getApplicationContext()); in get()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/
DRobolectricTestRunnerSelfTest.java24 assertThat((Application) ApplicationProvider.getApplicationContext()) in shouldInitializeAndBindApplicationButNotCallOnCreate()
27 assertThat(((MyTestApplication) ApplicationProvider.getApplicationContext()).onCreateWasCalled) in shouldInitializeAndBindApplicationButNotCallOnCreate()
40 Resources appResources = ApplicationProvider.getApplicationContext().getResources(); in shouldSetUpSystemResources()
DTemporaryBindingsTest.java25 Shadow.extract(new View(ApplicationProvider.getApplicationContext())); in overridingShadowBindingsShouldNotAffectBindingsInLaterTests()
32 shadowOf(new View(ApplicationProvider.getApplicationContext())) in overridingShadowBindingsShouldNotAffectBindingsInLaterTestsAgain()
/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/android/controller/
DContentProviderControllerTest.java26 contentResolver = ApplicationProvider.getApplicationContext().getContentResolver(); in setUp()
33 .isEqualTo(((Application) ApplicationProvider.getApplicationContext()).getBaseContext()); in shouldSetBaseContext()
106 ApplicationProvider.getApplicationContext() in onCreate()

123456789