Injected the ContributionDao where needed.

This commit is contained in:
Paul Hawke 2018-01-04 22:11:36 -06:00 committed by Paul Hawke
parent f2ed57a127
commit 9927879680
9 changed files with 70 additions and 46 deletions

View file

@ -23,6 +23,7 @@ import fr.free.nrw.commons.nearby.NearbyPlaces;
import fr.free.nrw.commons.upload.UploadController;
import static android.content.Context.MODE_PRIVATE;
import static fr.free.nrw.commons.contributions.ContributionsContentProvider.CONTRIBUTION_AUTHORITY;
@Module
@SuppressWarnings({"WeakerAccess", "unused"})
@ -42,10 +43,16 @@ public class CommonsApplicationModule {
@Provides
@Named("category")
public ContentProviderClient provideContentProviderClient() {
public ContentProviderClient provideCategoryContentProviderClient() {
return application.getContentResolver().acquireContentProviderClient(CATEGORY_AUTHORITY);
}
@Provides
@Named("contribution")
public ContentProviderClient provideContributionContentProviderClient() {
return application.getContentResolver().acquireContentProviderClient(CONTRIBUTION_AUTHORITY);
}
@Provides
@Named("application_preferences")
public SharedPreferences providesApplicationSharedPreferences() {