From 85aa265b169226b2cad439f360ebf87e285e0b4c Mon Sep 17 00:00:00 2001 From: Julian Raufelder Date: Fri, 22 Jan 2021 12:09:02 +0100 Subject: [PATCH] Fix auto PhotoContentJob in debug build variant --- .../org/cryptomator/presentation/service/PhotoContentJob.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/java/org/cryptomator/presentation/service/PhotoContentJob.kt b/presentation/src/main/java/org/cryptomator/presentation/service/PhotoContentJob.kt index 8250f256..68ee0e5a 100644 --- a/presentation/src/main/java/org/cryptomator/presentation/service/PhotoContentJob.kt +++ b/presentation/src/main/java/org/cryptomator/presentation/service/PhotoContentJob.kt @@ -15,7 +15,9 @@ import android.provider.MediaStore import android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI import androidx.annotation.RequiresApi import org.cryptomator.domain.exception.FatalBackendException +import org.cryptomator.presentation.R import org.cryptomator.presentation.util.FileUtil +import org.cryptomator.presentation.util.ResourceHelper import org.cryptomator.util.file.MimeTypeMap_Factory import org.cryptomator.util.file.MimeTypes import timber.log.Timber @@ -121,7 +123,7 @@ class PhotoContentJob : JobService() { private const val PHOTOS_CONTENT_JOB = 23 init { - val builder = JobInfo.Builder(PHOTOS_CONTENT_JOB, ComponentName("org.cryptomator", PhotoContentJob::class.java.name)) + val builder = JobInfo.Builder(PHOTOS_CONTENT_JOB, ComponentName(ResourceHelper.getString(R.string.app_id), PhotoContentJob::class.java.name)) builder.addTriggerContentUri(JobInfo.TriggerContentUri(EXTERNAL_CONTENT_URI, FLAG_NOTIFY_FOR_DESCENDANTS)) builder.addTriggerContentUri(JobInfo.TriggerContentUri(MEDIA_URI, FLAG_NOTIFY_FOR_DESCENDANTS)) jobInfo = builder.build()