Search in sources :

Example 36 with Singleton

use of javax.inject.Singleton in project ring-client-android by savoirfairelinux.

the class ServiceInjectionModule method provideContactService.

@Provides
@Singleton
ContactService provideContactService(PreferencesService sharedPreferencesService) {
    ContactServiceImpl contactService = new ContactServiceImpl();
    mRingApplication.getRingInjectionComponent().inject(contactService);
    return contactService;
}
Also used : ContactServiceImpl(cx.ring.services.ContactServiceImpl) Singleton(javax.inject.Singleton) Provides(dagger.Provides)

Example 37 with Singleton

use of javax.inject.Singleton in project ring-client-android by savoirfairelinux.

the class ServiceInjectionModule method provideHardwareService.

@Provides
@Singleton
HardwareService provideHardwareService(Context context) {
    HardwareServiceImpl hardwareService = new HardwareServiceImpl(context);
    mRingApplication.getRingInjectionComponent().inject(hardwareService);
    return hardwareService;
}
Also used : HardwareServiceImpl(cx.ring.services.HardwareServiceImpl) Singleton(javax.inject.Singleton) Provides(dagger.Provides)

Example 38 with Singleton

use of javax.inject.Singleton in project ring-client-android by savoirfairelinux.

the class ServiceInjectionModule method provideDeviceRuntimeService.

@Provides
@Singleton
DeviceRuntimeService provideDeviceRuntimeService(LogService logService) {
    DeviceRuntimeServiceImpl runtimeService = new DeviceRuntimeServiceImpl();
    mRingApplication.getRingInjectionComponent().inject(runtimeService);
    runtimeService.loadNativeLibrary();
    return runtimeService;
}
Also used : DeviceRuntimeServiceImpl(cx.ring.services.DeviceRuntimeServiceImpl) Singleton(javax.inject.Singleton) Provides(dagger.Provides)

Example 39 with Singleton

use of javax.inject.Singleton in project ring-client-android by savoirfairelinux.

the class ServiceInjectionModule method provideConferenceService.

@Provides
@Singleton
ConferenceService provideConferenceService() {
    ConferenceService conferenceService = new ConferenceService();
    mRingApplication.getRingInjectionComponent().inject(conferenceService);
    return conferenceService;
}
Also used : ConferenceService(cx.ring.services.ConferenceService) Singleton(javax.inject.Singleton) Provides(dagger.Provides)

Example 40 with Singleton

use of javax.inject.Singleton in project ring-client-android by savoirfairelinux.

the class ServiceInjectionModule method provideCallService.

@Provides
@Singleton
CallService provideCallService() {
    CallService callService = new CallService();
    mRingApplication.getRingInjectionComponent().inject(callService);
    return callService;
}
Also used : CallService(cx.ring.services.CallService) Singleton(javax.inject.Singleton) Provides(dagger.Provides)

Aggregations

Singleton (javax.inject.Singleton)168 Provides (dagger.Provides)98 Provides (com.google.inject.Provides)57 HttpLoggingInterceptor (okhttp3.logging.HttpLoggingInterceptor)21 Named (javax.inject.Named)17 OkHttpClient (okhttp3.OkHttpClient)17 Cache (okhttp3.Cache)10 List (java.util.List)9 ConfigBinder.configBinder (com.facebook.airlift.configuration.ConfigBinder.configBinder)8 Binder (com.google.inject.Binder)8 Module (com.google.inject.Module)8 CachingStripeMetadataSource (com.facebook.presto.orc.CachingStripeMetadataSource)7 DwrfAwareStripeMetadataSourceFactory (com.facebook.presto.orc.DwrfAwareStripeMetadataSourceFactory)7 OrcDataSourceId (com.facebook.presto.orc.OrcDataSourceId)7 StorageStripeMetadataSource (com.facebook.presto.orc.StorageStripeMetadataSource)7 StripeMetadataSource (com.facebook.presto.orc.StripeMetadataSource)7 StripeMetadataSourceFactory (com.facebook.presto.orc.StripeMetadataSourceFactory)7 CachingOrcFileTailSource (com.facebook.presto.orc.cache.CachingOrcFileTailSource)7 OrcCacheConfig (com.facebook.presto.orc.cache.OrcCacheConfig)7 OrcFileTailSource (com.facebook.presto.orc.cache.OrcFileTailSource)7