Update CommonsApplication.java

This commit is contained in:
Prajeen Govardhanam 2017-12-21 20:54:37 +05:30 committed by GitHub
parent 8f32fc1c01
commit 1d94b8a87c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,17 +61,6 @@ public class CommonsApplication extends DaggerApplication {
private CommonsApplicationComponent component;
private RefWatcher refWatcher;
/**
* Provides a way to get member refWatcher
*
* @param context Application context
* @return application member refWatcher
*/
public static RefWatcher getRefWatcher(Context context) {
CommonsApplication application = (CommonsApplication) context.getApplicationContext();
return application.refWatcher;
}
/**
* Used to declare and initialize various components and dependencies
*/
@ -106,11 +95,22 @@ public class CommonsApplication extends DaggerApplication {
}
return LeakCanary.install(this);
}
/**
* Helps in injecting dependency library Dagger
* @return Dagger injector
/**
* Provides a way to get member refWatcher
*
* @param context Application context
* @return application member refWatcher
*/
public static RefWatcher getRefWatcher(Context context) {
CommonsApplication application = (CommonsApplication) context.getApplicationContext();
return application.refWatcher;
}
/**
* Helps in injecting dependency library Dagger
* @return Dagger injector
*/
@Override
protected AndroidInjector<? extends DaggerApplication> applicationInjector() {
return injector();