Home
last modified time | relevance | path

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

12

/external/robolectric/src/main/java/com/xtremelabs/robolectric/shadows/
DShadowContextWrapper.java47 public Context getApplicationContext() { in getApplicationContext() method in ShadowContextWrapper
48 return baseContext.getApplicationContext(); in getApplicationContext()
58 return getApplicationContext().getResources(); in getResources()
63 return getApplicationContext().getContentResolver(); in getContentResolver()
68 return getApplicationContext().getSystemService(name); in getSystemService()
73 getApplicationContext().sendBroadcast(intent); in sendBroadcast()
77 return ((ShadowApplication) shadowOf(getApplicationContext())).getBroadcastIntents(); in getBroadcastIntents()
87 …return ((ShadowApplication) shadowOf(getApplicationContext())).registerReceiverWithContext(receive… in registerReceiver()
92 getApplicationContext().unregisterReceiver(broadcastReceiver); in unregisterReceiver()
97 …return realContextWrapper == getApplicationContext() ? packageName : getApplicationContext().getPa… in getPackageName()
[all …]
DShadowService.java32 public Context getApplicationContext() { in getApplicationContext() method in ShadowService
76 …((ShadowApplication) shadowOf(getApplicationContext())).assertNoBroadcastListenersRegistered(realS… in assertNoBroadcastListenersRegistered()
DShadowActivity.java68 public final Application getApplicationContext() { in getApplicationContext() method in ShadowActivity
249 return ShadowPreferenceManager.getDefaultSharedPreferences(getApplicationContext()); in getPreferences()
259 … shadowOf(getApplicationContext()).assertNoBroadcastListenersRegistered(realActivity, "Activity"); in assertNoBroadcastListenersRegistered()
392 getApplicationContext().startActivity(intent); in startActivityForResult()
DShadowPreferenceActivity.java19 …preferenceScreen = getResourceLoader().inflatePreferences(getApplicationContext(), preferencesResI… in addPreferencesFromResource()
DShadowMenuInflater.java26 …shadowOf(context.getApplicationContext()).getResourceLoader().inflateMenu(context, resource, root); in inflate()
DShadowPreferenceManager.java21 … ShadowApplication shadowApplication = shadowOf((Application) context.getApplicationContext()); in getDefaultSharedPreferences()
DShadowLayoutInflater.java52 return shadowOf(context.getApplicationContext()).getResourceLoader(); in getResourceLoader()
DShadowContext.java141 return shadowOf((Application) realContext.getApplicationContext()).getResourceLoader(); in getResourceLoader()
/external/robolectric/src/test/java/com/xtremelabs/robolectric/shadows/
DAlarmManagerTest.java112 … Intent newIntent = new Intent(Robolectric.application.getApplicationContext(), String.class); in cancel_removesMatchingPendingIntents()
113 …endingIntent = PendingIntent.getBroadcast(Robolectric.application.getApplicationContext(), 0, newI… in cancel_removesMatchingPendingIntents()
116 … Intent newIntent2 = new Intent(Robolectric.application.getApplicationContext(), Integer.class); in cancel_removesMatchingPendingIntents()
117 …ndingIntent2 = PendingIntent.getBroadcast(Robolectric.application.getApplicationContext(), 0, newI… in cancel_removesMatchingPendingIntents()
122 … Intent newIntent3 = new Intent(Robolectric.application.getApplicationContext(), String.class); in cancel_removesMatchingPendingIntents()
123 …endingIntent = PendingIntent.getBroadcast(Robolectric.application.getApplicationContext(), 0, newI… in cancel_removesMatchingPendingIntents()
131 …endingIntent = PendingIntent.getBroadcast(Robolectric.application.getApplicationContext(), 0, newI… in cancel_removesMatchingPendingIntentsWithActions()
DContextWrapperTest.java123 … assertThat(activity.getApplicationContext(), sameInstance(activity.getApplicationContext())); in shouldReturnSameApplicationContextEveryTime()
125 …assertThat(activity.getApplicationContext(), sameInstance(new Activity().getApplicationContext())); in shouldReturnSameApplicationContextEveryTime()
DLocationManagerTest.java176 .getShadowApplication().getApplicationContext(), 0, someIntent, in shouldRemovePendingIntentsWhenRequestingLocationUpdatesUsingCriteria()
180 Robolectric.getShadowApplication().getApplicationContext(), 0, someOtherIntent, in shouldRemovePendingIntentsWhenRequestingLocationUpdatesUsingCriteria()
213 …gIntent = PendingIntent.getBroadcast(Robolectric.getShadowApplication().getApplicationContext(), 0, in shouldRemovePendingIntentsWhenRequestingLocationUpdatesUsingLocationListeners()
216 …dingIntent = PendingIntent.getBroadcast(Robolectric.getShadowApplication().getApplicationContext(), in shouldRemovePendingIntentsWhenRequestingLocationUpdatesUsingLocationListeners()
264 …gIntent = PendingIntent.getBroadcast(Robolectric.getShadowApplication().getApplicationContext(), 0, in shouldThrowExceptionWhenRequestingLocationUpdatesAndNoProviderIsFound()
362 …gIntent = PendingIntent.getBroadcast(Robolectric.getShadowApplication().getApplicationContext(), 0, in shouldRegisterLocationUpdatesWhenProviderGiven()
378 …gIntent = PendingIntent.getBroadcast(Robolectric.getShadowApplication().getApplicationContext(), 0, in shouldRegisterLocationUpdatesWhenCriteriaGiven()
DTestFragment.java54 Context context = Robolectric.application.getApplicationContext(); in onCreateView()
/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()
DSimpleXYPlotActivity.java65 series1Format.configure(getApplicationContext(), in onCreate()
74 series2Format.configure(getApplicationContext(), in onCreate()
DListViewActivity.java48 … lv.setAdapter(new MyViewAdapter(getApplicationContext(), R.layout.listview_example_item, null)); in onCreate()
/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()
DDefaultConnectivityMonitor.java29 this.context = context.getApplicationContext(); in DefaultConnectivityMonitor()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/internal/
DAppSingletonizer.java18 Application applicationContext = (Application) context.getApplicationContext(); in getInstance()
/external/glide/library/src/main/java/com/bumptech/glide/load/data/
DLocalUriFetcher.java37 this.context = context.getApplicationContext(); in LocalUriFetcher()
/external/glide/library/src/main/java/com/bumptech/glide/request/animation/
DViewAnimationFactory.java69 this.context = context.getApplicationContext(); in ResourceAnimationFactory()
/external/glide/library/src/main/java/com/bumptech/glide/load/model/stream/
DStreamUriLoader.java56 return new StreamAssetPathFetcher(context.getApplicationContext().getAssets(), assetPath); in getAssetPathFetcher()
/external/glide/library/src/main/java/com/bumptech/glide/load/model/file_descriptor/
DFileDescriptorUriLoader.java53 … return new FileDescriptorAssetPathFetcher(context.getApplicationContext().getAssets(), assetPath); in getAssetPathFetcher()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/matchers/
DStartedServiceMatcher.java112 intent.setClass(getShadowApplication().getApplicationContext(), serviceClass); in createIntent()
/external/jmonkeyengine/engine/src/android/com/jme3/system/android/
DJmeAndroidSystem.java109 storageFolder = activity.getApplicationContext().getExternalFilesDir(null); in getStorageFolder()
/external/glide/library/src/main/java/com/bumptech/glide/
DGlideBuilder.java37 this.context = context.getApplicationContext(); in GlideBuilder()

12