use of javax.inject.Singleton in project androidthings-deskclock by leinardi.
the class AndroidThingsModule method provideLightSensorDriverController.
@Singleton
@Provides
LightSensorDriverController provideLightSensorDriverController(@Nullable Tsl256x tsl256x) {
Tsl256xLightSensorDriverController controller = new Tsl256xLightSensorDriverController();
controller.setDriver(tsl256x);
return controller;
}
use of javax.inject.Singleton in project android-bootstrap by sahiljain5040.
the class NetworkModule method provideGson.
@Provides
@Singleton
Gson provideGson() {
GsonBuilder gsonBuilder = new GsonBuilder();
gsonBuilder.setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES);
return gsonBuilder.create();
}
use of javax.inject.Singleton in project android-bootstrap by sahiljain5040.
the class NetworkModule method provideOkHttpCache.
@Provides
@Singleton
Cache provideOkHttpCache(Application application) {
// 10 MiB
int cacheSize = 10 * 1024 * 1024;
Cache cache = new Cache(application.getCacheDir(), cacheSize);
return cache;
}
use of javax.inject.Singleton in project Audient by komamj.
the class AudientRepositoryModule method provideCache.
@Singleton
@Provides
Cache provideCache(Context context) {
// 10 MiB
int cacheSize = 10 * 1024 * 1024;
Cache cache = new Cache(context.getCacheDir(), cacheSize);
return cache;
}
use of javax.inject.Singleton in project Audient by komamj.
the class AudientRepositoryModule method provideCache.
@Singleton
@Provides
Cache provideCache(Context context) {
// 10 MiB
int cacheSize = 10 * 1024 * 1024;
Cache cache = new Cache(context.getCacheDir(), cacheSize);
return cache;
}
Aggregations