@Provides Pump providePump(Thermosiphon pump) { return pump; } }
@Provides OkHttpClient okHttpClient() { return new OkHttpClient(); } }
@Provides ImgurService getImgurService(Retrofit retrofit) { return retrofit.create(ImgurService.class); }
@Provides @Singleton UserRepository provideUserRepository(UserDataRepository userDataRepository) { return userDataRepository; } }
@Singleton @Named("hotViralImages") @Provides Observable<List<Image>> provideHotViralImages(ImgurObservables imgurObservables) { return imgurObservables.getHotViralImages(5 /*maxPages*/); }
@Provides ImgurObservables imgurObservables(ImgurService imgurService) { return new ImgurObservables(imgurService); }
/** * Allow the activity context to be injected but require that it be annotated with * {@link ForActivity @ForActivity} to explicitly differentiate it from application context. */ @Provides @Singleton @ForActivity Context provideActivityContext() { return activity; }
/** * Allow the application context to be injected but require that it be annotated with * {@link ForApplication @ForApplication} to explicitly differentiate it from an activity context. */ @Provides @Singleton @ForApplication Context provideApplicationContext() { return application; }
/** * Allow the application context to be injected but require that it be annotated with * {@link ForApplication @Annotation} to explicitly differentiate it from an activity context. */ @Provides @Singleton @ForApplication Context provideApplicationContext() { return application; }
/** * Expose the activity to dependents in the graph. */ @Provides @PerActivity Activity activity() { return this.activity; } }
@Provides @Singleton ActivityTitleController provideTitleController() { return new ActivityTitleController(activity); } }
@Provides String provideString() { return "injected"; } }
@Provides @Singleton LocationManager provideLocationManager() { return (LocationManager) application.getSystemService(LOCATION_SERVICE); } }
@Provides @Singleton LocationManager provideLocationManager() { return (LocationManager) application.getSystemService(LOCATION_SERVICE); } }
@Provides String provideString() { return value; } }
@Provides @Singleton Heater provideHeater() { return new ElectricHeater(); } }
@Provides @Singleton RepositoryCommentService providesRepositoryCommentService(Context context) { return ServiceGenerator.createService(context, RepositoryCommentService.class); }
@Provides @Singleton GistService providesGistService(Context context) { return ServiceGenerator.createService(context, GistService.class); }
@Provides Integer provideInteger() { try { latch.await(); } catch (InterruptedException e) { throw new AssertionError("Interrupted Thread!!"); } return count.getAndIncrement(); } }
@Provides @Singleton Long provideLong() { return Long.valueOf(provideInteger()); }