FileContentProvider: add dagger injection

Signed-off-by: Alice Gaudon <alice@gaudon.pro>
This commit is contained in:
Alice Gaudon 2019-11-06 01:44:41 +01:00
parent 7f4db3fdd0
commit c2ea4de802
2 changed files with 4 additions and 0 deletions

View file

@ -32,6 +32,7 @@ import com.owncloud.android.files.services.FileDownloader;
import com.owncloud.android.files.services.FileUploader;
import com.owncloud.android.jobs.NotificationJob;
import com.owncloud.android.providers.DiskLruImageCacheFileProvider;
import com.owncloud.android.providers.FileContentProvider;
import com.owncloud.android.providers.UsersAndGroupsSearchProvider;
import com.owncloud.android.services.AccountManagerService;
import com.owncloud.android.services.OperationsService;
@ -148,6 +149,7 @@ abstract class ComponentsModule {
@ContributesAndroidInjector abstract BootupBroadcastReceiver bootupBroadcastReceiver();
@ContributesAndroidInjector abstract NotificationJob.NotificationReceiver notificationJobBroadcastReceiver();
@ContributesAndroidInjector abstract FileContentProvider fileContentProvider();
@ContributesAndroidInjector abstract UsersAndGroupsSearchProvider usersAndGroupsSearchProvider();
@ContributesAndroidInjector abstract DiskLruImageCacheFileProvider diskLruImageCacheFileProvider();

View file

@ -63,6 +63,7 @@ import java.util.Locale;
import javax.inject.Inject;
import androidx.annotation.NonNull;
import dagger.android.AndroidInjection;
/**
* The ContentProvider for the ownCloud App.
@ -419,6 +420,7 @@ public class FileContentProvider extends ContentProvider {
@Override
public boolean onCreate() {
AndroidInjection.inject(this);
mDbHelper = new DataBaseHelper(getContext());
mContext = getContext();