Home
last modified time | relevance | path

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

123

/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()
/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()
/external/chromium_org/components/cronet/android/sample/src/org/chromium/cronet_sample_apk/
DCronetSampleActivity.java58 super(getApplicationContext(), "Cronet Sample", in SampleRequestContext()
75 Intent intent = new Intent(getApplicationContext(), in onRequestComplete()
84 Toast toast = Toast.makeText(getApplicationContext(), text, in onRequestComplete()
107 Intent intent = new Intent(getApplicationContext(), in onRequestComplete()
117 Toast toast = Toast.makeText(getApplicationContext(), text, in onRequestComplete()
159 getApplicationContext(), config); in onCreate()
/external/chromium_org/components/gcm_driver/android/java/src/org/chromium/components/gcm_driver/
DGCMListener.java62 GCMDriver.onMessageReceived(getApplicationContext(), UNKNOWN_APP_ID, in onMessage()
72 GCMDriver.onMessagesDeleted(getApplicationContext(), UNKNOWN_APP_ID); in onDeletedMessages()
/external/chromium_org/content/shell/android/browsertests_apk/src/org/chromium/content_browsertests_apk/
DContentBrowserTestsActivity.java42 BrowserStartupController.get(getApplicationContext()).initChromiumBrowserProcessForTests(); in onCreate()
58 nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext()); in runTests()
/external/chromium_org/content/public/android/java/src/org/chromium/content/browser/
DScreenOrientationListener.java200 mAppContext = context.getApplicationContext(); in addObserver()
203 assert mAppContext == context.getApplicationContext(); in addObserver()
DBrowserStartupController.java125 sInstance = new BrowserStartupController(context.getApplicationContext()); in get()
279 Context appContext = mContext.getApplicationContext(); in prepareToStartBrowserProcess()
/external/glide/library/src/main/java/com/bumptech/glide/manager/
DRequestManagerRetriever.java25 applicationManager = new RequestManager(context.getApplicationContext()); in get()
72 return get(fragment.getActivity().getApplicationContext()); in get()
/external/chromium_org/content/public/android/java/src/org/chromium/content/app/
DChildProcessService.java149 LibraryLoader.loadNow(getApplicationContext(), false); in onCreate()
174 ContentMain.initApplicationContext(sContext.get().getApplicationContext()); in onCreate()
175 nativeInitChildProcess(sContext.get().getApplicationContext(), in onCreate()
/external/chromium_org/ui/android/java/src/org/chromium/ui/base/
DWindowAndroid.java64 assert context == context.getApplicationContext(); in WindowAndroid()
190 public Context getApplicationContext() { in getApplicationContext() method in WindowAndroid
/external/chromium_org/remoting/android/java/src/org/chromium/chromoting/
DThirdPartyTokenFetcher.java72 this.mRedirectUriScheme = context.getApplicationContext().getPackageName(); in ThirdPartyTokenFetcher()
219 context.getApplicationContext(), in setEnabled()
/external/chromium_org/chrome/android/java/src/org/chromium/chrome/browser/sync/
DChromiumSyncAdapterService.java31 return getOrCreateSyncAdapter(getApplicationContext()).getSyncAdapterBinder(); in onBind()
/external/chromium_org/chrome/android/java/src/org/chromium/chrome/browser/identity/
DSettingsSecureBasedIdentificationGenerator.java27 mContext = context.getApplicationContext(); in SettingsSecureBasedIdentificationGenerator()
/external/chromium_org/components/cronet/android/java/src/org/chromium/net/
DHttpUrlConnectionUrlRequestFactory.java21 mContext = context.getApplicationContext(); in HttpUrlConnectionUrlRequestFactory()
DChromiumUrlRequestFactory.java26 context.getApplicationContext(), UserAgent.from(context), in ChromiumUrlRequestFactory()
/external/robolectric/src/main/java/com/xtremelabs/robolectric/internal/
DAppSingletonizer.java18 Application applicationContext = (Application) context.getApplicationContext(); in getInstance()
/external/chromium_org/tools/android/memconsumer/java/src/org/chromium/memconsumer/
DResidentService.java43 new Notification.Builder(getApplicationContext()). in useMemory()
/external/chromium_org/android_webview/java/src/org/chromium/android_webview/
DAndroidProtocolHandler.java103 if (context.getApplicationContext() != null) { in openResource()
104 context = context.getApplicationContext(); in openResource()

123