From 8d12862b91a57d6dc8c552f0fb25bb9d308996a7 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Fri, 12 Jan 2024 15:06:51 +0100 Subject: [PATCH 01/21] check if sync worker is already running Signed-off-by: Jonas Mayer --- .../client/jobs/BackgroundJobManager.kt | 1 + .../client/jobs/BackgroundJobManagerImpl.kt | 10 ++++++++ .../nextcloud/client/jobs/FilesSyncWork.kt | 4 ++++ .../utils/extensions/WorkManagerExtensions.kt | 23 +++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt index 68a7a027ec..e366bd2054 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt @@ -163,4 +163,5 @@ interface BackgroundJobManager { fun cancelAllJobs() fun schedulePeriodicHealthStatus() fun startHealthStatus() + fun bothFilesSyncJobsRunning(): Boolean } diff --git a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt index 945e14ded7..59bab2e038 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt @@ -21,6 +21,7 @@ import androidx.work.PeriodicWorkRequest import androidx.work.WorkInfo import androidx.work.WorkManager import androidx.work.workDataOf +import com.google.common.util.concurrent.ListenableFuture import com.nextcloud.client.account.User import com.nextcloud.client.core.Clock import com.nextcloud.client.di.Injectable @@ -28,11 +29,14 @@ import com.nextcloud.client.documentscan.GeneratePdfFromImagesWork import com.nextcloud.client.jobs.download.FileDownloadWorker import com.nextcloud.client.jobs.upload.FileUploadWorker import com.nextcloud.client.preferences.AppPreferences +import com.nextcloud.utils.extensions.isWorkRunning import com.nextcloud.utils.extensions.isWorkScheduled import com.owncloud.android.datamodel.OCFile +import com.owncloud.android.lib.common.utils.Log_OC import com.owncloud.android.operations.DownloadType import java.util.Date import java.util.UUID +import java.util.concurrent.ExecutionException import java.util.concurrent.TimeUnit import kotlin.reflect.KClass @@ -403,6 +407,12 @@ internal class BackgroundJobManagerImpl( workManager.cancelJob(JOB_PERIODIC_CALENDAR_BACKUP, user) } + override fun bothFilesSyncJobsRunning(): Boolean { + + return workManager.isWorkRunning(JOB_PERIODIC_FILES_SYNC) && + workManager.isWorkRunning(JOB_IMMEDIATE_FILES_SYNC) + } + override fun schedulePeriodicFilesSyncJob() { val request = periodicRequestBuilder( jobClass = FilesSyncWork::class, diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 651c65aa02..d714ae7561 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -94,6 +94,10 @@ class FilesSyncWork( @Suppress("MagicNumber") override fun doWork(): Result { + if (backgroundJobManager.bothFilesSyncJobsRunning()){ + Log_OC.d(TAG,"Kill Sync Worker since another instance of the worker seems to be running already!") + return Result.success() + } backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index efd20b1296..bc456cb662 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -33,3 +33,26 @@ fun WorkManager.isWorkScheduled(tag: String): Boolean { return running } + +fun WorkManager.isWorkRunning(tag: String): Boolean { + val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) + var running = false + var workInfoList: List = emptyList() + + try { + workInfoList = statuses.get() + } catch (e: ExecutionException) { + Log_OC.d("Worker", "ExecutionException in isWorkScheduled: $e") + } catch (e: InterruptedException) { + Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") + } + + for (workInfo in workInfoList) { + val state = workInfo.state + running = running || state == WorkInfo.State.RUNNING + } + + return running +} + + From d56c342aedba23c2331a52b34e220336641952c2 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 16 Jan 2024 09:27:29 +0100 Subject: [PATCH 02/21] fix spotless Signed-off-by: Jonas Mayer --- .../com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt | 4 ---- app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 4 ++-- .../com/nextcloud/utils/extensions/WorkManagerExtensions.kt | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt index 59bab2e038..d12f116922 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt @@ -21,7 +21,6 @@ import androidx.work.PeriodicWorkRequest import androidx.work.WorkInfo import androidx.work.WorkManager import androidx.work.workDataOf -import com.google.common.util.concurrent.ListenableFuture import com.nextcloud.client.account.User import com.nextcloud.client.core.Clock import com.nextcloud.client.di.Injectable @@ -32,11 +31,9 @@ import com.nextcloud.client.preferences.AppPreferences import com.nextcloud.utils.extensions.isWorkRunning import com.nextcloud.utils.extensions.isWorkScheduled import com.owncloud.android.datamodel.OCFile -import com.owncloud.android.lib.common.utils.Log_OC import com.owncloud.android.operations.DownloadType import java.util.Date import java.util.UUID -import java.util.concurrent.ExecutionException import java.util.concurrent.TimeUnit import kotlin.reflect.KClass @@ -408,7 +405,6 @@ internal class BackgroundJobManagerImpl( } override fun bothFilesSyncJobsRunning(): Boolean { - return workManager.isWorkRunning(JOB_PERIODIC_FILES_SYNC) && workManager.isWorkRunning(JOB_IMMEDIATE_FILES_SYNC) } diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index d714ae7561..d0b9580325 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -94,8 +94,8 @@ class FilesSyncWork( @Suppress("MagicNumber") override fun doWork(): Result { - if (backgroundJobManager.bothFilesSyncJobsRunning()){ - Log_OC.d(TAG,"Kill Sync Worker since another instance of the worker seems to be running already!") + if (backgroundJobManager.bothFilesSyncJobsRunning()) { + Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") return Result.success() } backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index bc456cb662..a621672887 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -54,5 +54,3 @@ fun WorkManager.isWorkRunning(tag: String): Boolean { return running } - - From 6c85372a4bf0b577b59c6ac587e92cb070207b1e Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Thu, 18 Jan 2024 13:49:36 +0100 Subject: [PATCH 03/21] Fix to many returns in doWork Signed-off-by: Jonas Mayer --- .../java/com/nextcloud/client/jobs/FilesSyncWork.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index d0b9580325..17574d0fcc 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -94,15 +94,15 @@ class FilesSyncWork( @Suppress("MagicNumber") override fun doWork(): Result { - if (backgroundJobManager.bothFilesSyncJobsRunning()) { - Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") - return Result.success() - } backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) + // If we are in power save mode or sync worker already running, better to postpone upload val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) - // If we are in power save mode, better to postpone upload - if (powerManagementService.isPowerSavingEnabled && !overridePowerSaving) { + val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() + if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving) || alreadyRunning) { + if (alreadyRunning) { + Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") + } val result = Result.success() backgroundJobManager.logEndOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class), result) return result From c420b5eb32a40d5f685a35288ed6cec0293e7f02 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Mon, 29 Jan 2024 15:27:01 +0100 Subject: [PATCH 04/21] remove for loops Signed-off-by: Jonas Mayer --- .../utils/extensions/WorkManagerExtensions.kt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index a621672887..a2b61b8778 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -15,7 +15,6 @@ import java.util.concurrent.ExecutionException fun WorkManager.isWorkScheduled(tag: String): Boolean { val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) - var running = false var workInfoList: List = emptyList() try { @@ -26,17 +25,13 @@ fun WorkManager.isWorkScheduled(tag: String): Boolean { Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") } - for (workInfo in workInfoList) { - val state = workInfo.state - running = running || (state == WorkInfo.State.RUNNING || state == WorkInfo.State.ENQUEUED) + return workInfoList.any { + it.state == WorkInfo.State.RUNNING || it.state == WorkInfo.State.ENQUEUED } - - return running } fun WorkManager.isWorkRunning(tag: String): Boolean { val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) - var running = false var workInfoList: List = emptyList() try { @@ -47,10 +42,7 @@ fun WorkManager.isWorkRunning(tag: String): Boolean { Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") } - for (workInfo in workInfoList) { - val state = workInfo.state - running = running || state == WorkInfo.State.RUNNING + return workInfoList.any { + it.state == WorkInfo.State.RUNNING } - - return running } From b832c0a706a5ab120c837ec84579f65d102daa9f Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 9 Apr 2024 16:51:10 +0200 Subject: [PATCH 05/21] Make code better readable Signed-off-by: Jonas Mayer --- .../nextcloud/client/jobs/FilesSyncWork.kt | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 17574d0fcc..ed12c9bafa 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -92,21 +92,35 @@ class FilesSyncWork( setForegroundAsync(foregroundInfo) } + private fun canExitEarly(changedFiles: Array?): Boolean { + // If we are in power save mode better to postpone scan and upload + val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) + if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving)){ + return true + } + + // or sync worker already running and no changed files to be processed + val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() + if (alreadyRunning && changedFiles.isNullOrEmpty()) { + Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") + return true + } + + return false + } + @Suppress("MagicNumber") override fun doWork(): Result { backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) - // If we are in power save mode or sync worker already running, better to postpone upload - val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) - val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() - if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving) || alreadyRunning) { - if (alreadyRunning) { - Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") - } + val changedFiles = inputData.getStringArray(CHANGED_FILES) + + if (canExitEarly(changedFiles)) { val result = Result.success() backgroundJobManager.logEndOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class), result) return result } + val resources = context.resources val lightVersion = resources.getBoolean(R.bool.syncedFolder_light) FilesSyncHelper.restartJobsIfNeeded( @@ -117,7 +131,6 @@ class FilesSyncWork( ) // Get changed files from ContentObserverWork (only images and videos) or by scanning filesystem - val changedFiles = inputData.getStringArray(CHANGED_FILES) collectChangedFiles(changedFiles) // Create all the providers we'll need From b121c21406834580db0499327dd4c027362d513a Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 9 Apr 2024 16:55:52 +0200 Subject: [PATCH 06/21] Make code better readable and add early exit if no folder is enabled Signed-off-by: Jonas Mayer --- .../main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index ed12c9bafa..a81d43d109 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -102,7 +102,12 @@ class FilesSyncWork( // or sync worker already running and no changed files to be processed val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() if (alreadyRunning && changedFiles.isNullOrEmpty()) { - Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") + Log_OC.d(TAG, "FILESYNC Kill Sync Worker since another instance of the worker seems to be running already!") + return true + } + + if (! syncedFolderProvider.syncedFolders.any { it.isEnabled }){ + Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") return true } From aef9a41a5f319cdc0a6c851e7c2cf01aa5ec0d61 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Fri, 12 Jan 2024 15:06:51 +0100 Subject: [PATCH 07/21] check if sync worker is already running Signed-off-by: Jonas Mayer --- .../client/jobs/BackgroundJobManager.kt | 1 + .../client/jobs/BackgroundJobManagerImpl.kt | 10 ++++++++ .../nextcloud/client/jobs/FilesSyncWork.kt | 4 ++++ .../utils/extensions/WorkManagerExtensions.kt | 23 +++++++++++++++++++ 4 files changed, 38 insertions(+) diff --git a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt index 68a7a027ec..e366bd2054 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManager.kt @@ -163,4 +163,5 @@ interface BackgroundJobManager { fun cancelAllJobs() fun schedulePeriodicHealthStatus() fun startHealthStatus() + fun bothFilesSyncJobsRunning(): Boolean } diff --git a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt index 945e14ded7..59bab2e038 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt @@ -21,6 +21,7 @@ import androidx.work.PeriodicWorkRequest import androidx.work.WorkInfo import androidx.work.WorkManager import androidx.work.workDataOf +import com.google.common.util.concurrent.ListenableFuture import com.nextcloud.client.account.User import com.nextcloud.client.core.Clock import com.nextcloud.client.di.Injectable @@ -28,11 +29,14 @@ import com.nextcloud.client.documentscan.GeneratePdfFromImagesWork import com.nextcloud.client.jobs.download.FileDownloadWorker import com.nextcloud.client.jobs.upload.FileUploadWorker import com.nextcloud.client.preferences.AppPreferences +import com.nextcloud.utils.extensions.isWorkRunning import com.nextcloud.utils.extensions.isWorkScheduled import com.owncloud.android.datamodel.OCFile +import com.owncloud.android.lib.common.utils.Log_OC import com.owncloud.android.operations.DownloadType import java.util.Date import java.util.UUID +import java.util.concurrent.ExecutionException import java.util.concurrent.TimeUnit import kotlin.reflect.KClass @@ -403,6 +407,12 @@ internal class BackgroundJobManagerImpl( workManager.cancelJob(JOB_PERIODIC_CALENDAR_BACKUP, user) } + override fun bothFilesSyncJobsRunning(): Boolean { + + return workManager.isWorkRunning(JOB_PERIODIC_FILES_SYNC) && + workManager.isWorkRunning(JOB_IMMEDIATE_FILES_SYNC) + } + override fun schedulePeriodicFilesSyncJob() { val request = periodicRequestBuilder( jobClass = FilesSyncWork::class, diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 651c65aa02..d714ae7561 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -94,6 +94,10 @@ class FilesSyncWork( @Suppress("MagicNumber") override fun doWork(): Result { + if (backgroundJobManager.bothFilesSyncJobsRunning()){ + Log_OC.d(TAG,"Kill Sync Worker since another instance of the worker seems to be running already!") + return Result.success() + } backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index efd20b1296..bc456cb662 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -33,3 +33,26 @@ fun WorkManager.isWorkScheduled(tag: String): Boolean { return running } + +fun WorkManager.isWorkRunning(tag: String): Boolean { + val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) + var running = false + var workInfoList: List = emptyList() + + try { + workInfoList = statuses.get() + } catch (e: ExecutionException) { + Log_OC.d("Worker", "ExecutionException in isWorkScheduled: $e") + } catch (e: InterruptedException) { + Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") + } + + for (workInfo in workInfoList) { + val state = workInfo.state + running = running || state == WorkInfo.State.RUNNING + } + + return running +} + + From 24b1fa2da7bea0f5fc38d375667cbd708589a009 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 16 Jan 2024 09:27:29 +0100 Subject: [PATCH 08/21] fix spotless Signed-off-by: Jonas Mayer --- .../com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt | 4 ---- app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 4 ++-- .../com/nextcloud/utils/extensions/WorkManagerExtensions.kt | 2 -- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt index 59bab2e038..d12f116922 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt @@ -21,7 +21,6 @@ import androidx.work.PeriodicWorkRequest import androidx.work.WorkInfo import androidx.work.WorkManager import androidx.work.workDataOf -import com.google.common.util.concurrent.ListenableFuture import com.nextcloud.client.account.User import com.nextcloud.client.core.Clock import com.nextcloud.client.di.Injectable @@ -32,11 +31,9 @@ import com.nextcloud.client.preferences.AppPreferences import com.nextcloud.utils.extensions.isWorkRunning import com.nextcloud.utils.extensions.isWorkScheduled import com.owncloud.android.datamodel.OCFile -import com.owncloud.android.lib.common.utils.Log_OC import com.owncloud.android.operations.DownloadType import java.util.Date import java.util.UUID -import java.util.concurrent.ExecutionException import java.util.concurrent.TimeUnit import kotlin.reflect.KClass @@ -408,7 +405,6 @@ internal class BackgroundJobManagerImpl( } override fun bothFilesSyncJobsRunning(): Boolean { - return workManager.isWorkRunning(JOB_PERIODIC_FILES_SYNC) && workManager.isWorkRunning(JOB_IMMEDIATE_FILES_SYNC) } diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index d714ae7561..d0b9580325 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -94,8 +94,8 @@ class FilesSyncWork( @Suppress("MagicNumber") override fun doWork(): Result { - if (backgroundJobManager.bothFilesSyncJobsRunning()){ - Log_OC.d(TAG,"Kill Sync Worker since another instance of the worker seems to be running already!") + if (backgroundJobManager.bothFilesSyncJobsRunning()) { + Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") return Result.success() } backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index bc456cb662..a621672887 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -54,5 +54,3 @@ fun WorkManager.isWorkRunning(tag: String): Boolean { return running } - - From 575e413b8d5d33e232f707ece46472ccd181af75 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Thu, 18 Jan 2024 13:49:36 +0100 Subject: [PATCH 09/21] Fix to many returns in doWork Signed-off-by: Jonas Mayer --- .../java/com/nextcloud/client/jobs/FilesSyncWork.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index d0b9580325..17574d0fcc 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -94,15 +94,15 @@ class FilesSyncWork( @Suppress("MagicNumber") override fun doWork(): Result { - if (backgroundJobManager.bothFilesSyncJobsRunning()) { - Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") - return Result.success() - } backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) + // If we are in power save mode or sync worker already running, better to postpone upload val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) - // If we are in power save mode, better to postpone upload - if (powerManagementService.isPowerSavingEnabled && !overridePowerSaving) { + val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() + if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving) || alreadyRunning) { + if (alreadyRunning) { + Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") + } val result = Result.success() backgroundJobManager.logEndOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class), result) return result From c64d4c8fbc5e91a2489a56217ac49dd85c51f3ab Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Mon, 29 Jan 2024 15:27:01 +0100 Subject: [PATCH 10/21] remove for loops Signed-off-by: Jonas Mayer --- .../utils/extensions/WorkManagerExtensions.kt | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index a621672887..a2b61b8778 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -15,7 +15,6 @@ import java.util.concurrent.ExecutionException fun WorkManager.isWorkScheduled(tag: String): Boolean { val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) - var running = false var workInfoList: List = emptyList() try { @@ -26,17 +25,13 @@ fun WorkManager.isWorkScheduled(tag: String): Boolean { Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") } - for (workInfo in workInfoList) { - val state = workInfo.state - running = running || (state == WorkInfo.State.RUNNING || state == WorkInfo.State.ENQUEUED) + return workInfoList.any { + it.state == WorkInfo.State.RUNNING || it.state == WorkInfo.State.ENQUEUED } - - return running } fun WorkManager.isWorkRunning(tag: String): Boolean { val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) - var running = false var workInfoList: List = emptyList() try { @@ -47,10 +42,7 @@ fun WorkManager.isWorkRunning(tag: String): Boolean { Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") } - for (workInfo in workInfoList) { - val state = workInfo.state - running = running || state == WorkInfo.State.RUNNING + return workInfoList.any { + it.state == WorkInfo.State.RUNNING } - - return running } From ac9902fc3ce69805d97134034fcf5d8d1d05c0b2 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 9 Apr 2024 16:51:10 +0200 Subject: [PATCH 11/21] Make code better readable Signed-off-by: Jonas Mayer --- .../nextcloud/client/jobs/FilesSyncWork.kt | 29 ++++++++++++++----- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 17574d0fcc..ed12c9bafa 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -92,21 +92,35 @@ class FilesSyncWork( setForegroundAsync(foregroundInfo) } + private fun canExitEarly(changedFiles: Array?): Boolean { + // If we are in power save mode better to postpone scan and upload + val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) + if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving)){ + return true + } + + // or sync worker already running and no changed files to be processed + val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() + if (alreadyRunning && changedFiles.isNullOrEmpty()) { + Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") + return true + } + + return false + } + @Suppress("MagicNumber") override fun doWork(): Result { backgroundJobManager.logStartOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class)) - // If we are in power save mode or sync worker already running, better to postpone upload - val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) - val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() - if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving) || alreadyRunning) { - if (alreadyRunning) { - Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") - } + val changedFiles = inputData.getStringArray(CHANGED_FILES) + + if (canExitEarly(changedFiles)) { val result = Result.success() backgroundJobManager.logEndOfWorker(BackgroundJobManagerImpl.formatClassTag(this::class), result) return result } + val resources = context.resources val lightVersion = resources.getBoolean(R.bool.syncedFolder_light) FilesSyncHelper.restartJobsIfNeeded( @@ -117,7 +131,6 @@ class FilesSyncWork( ) // Get changed files from ContentObserverWork (only images and videos) or by scanning filesystem - val changedFiles = inputData.getStringArray(CHANGED_FILES) collectChangedFiles(changedFiles) // Create all the providers we'll need From cf8199e17a1376dd7485b4f1a558f7501e2281f8 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 9 Apr 2024 16:55:52 +0200 Subject: [PATCH 12/21] Make code better readable and add early exit if no folder is enabled Signed-off-by: Jonas Mayer --- .../main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index ed12c9bafa..a81d43d109 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -102,7 +102,12 @@ class FilesSyncWork( // or sync worker already running and no changed files to be processed val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() if (alreadyRunning && changedFiles.isNullOrEmpty()) { - Log_OC.d(TAG, "Kill Sync Worker since another instance of the worker seems to be running already!") + Log_OC.d(TAG, "FILESYNC Kill Sync Worker since another instance of the worker seems to be running already!") + return true + } + + if (! syncedFolderProvider.syncedFolders.any { it.isEnabled }){ + Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") return true } From 80eff536889f6c69d0f131d1f794e6aabc6bbc7d Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 9 Apr 2024 17:13:41 +0200 Subject: [PATCH 13/21] Fix codacy Signed-off-by: Jonas Mayer --- .../main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index a81d43d109..940569a779 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -93,25 +93,26 @@ class FilesSyncWork( } private fun canExitEarly(changedFiles: Array?): Boolean { + var canExitEarly = false // If we are in power save mode better to postpone scan and upload val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving)){ - return true + canExitEarly = true } // or sync worker already running and no changed files to be processed val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() if (alreadyRunning && changedFiles.isNullOrEmpty()) { Log_OC.d(TAG, "FILESYNC Kill Sync Worker since another instance of the worker seems to be running already!") - return true + canExitEarly = true } if (! syncedFolderProvider.syncedFolders.any { it.isEnabled }){ Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") - return true + canExitEarly = true } - return false + return canExitEarly } @Suppress("MagicNumber") From f53fb0b93b5528eea3715bbd9750ea92a531455e Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Tue, 9 Apr 2024 18:06:03 +0200 Subject: [PATCH 14/21] Fix spotbugs Signed-off-by: Jonas Mayer --- app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 940569a779..c754b337e5 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -96,7 +96,7 @@ class FilesSyncWork( var canExitEarly = false // If we are in power save mode better to postpone scan and upload val overridePowerSaving = inputData.getBoolean(OVERRIDE_POWER_SAVING, false) - if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving)){ + if ((powerManagementService.isPowerSavingEnabled && !overridePowerSaving)) { canExitEarly = true } @@ -107,7 +107,7 @@ class FilesSyncWork( canExitEarly = true } - if (! syncedFolderProvider.syncedFolders.any { it.isEnabled }){ + if (!syncedFolderProvider.syncedFolders.any { it.isEnabled }) { Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") canExitEarly = true } From 68629ea60337e48d3466da18c03966f588e46540 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Thu, 2 May 2024 15:25:22 +0200 Subject: [PATCH 15/21] get rid of repeated codes in WorkManagerExtensions Signed-off-by: Jonas Mayer --- .../utils/extensions/WorkManagerExtensions.kt | 38 +++++++------------ 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index a2b61b8778..10a3ff4ea5 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -13,36 +13,24 @@ import com.google.common.util.concurrent.ListenableFuture import com.owncloud.android.lib.common.utils.Log_OC import java.util.concurrent.ExecutionException -fun WorkManager.isWorkScheduled(tag: String): Boolean { - val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) +private const val TAG = "WorkManager" + +fun WorkManager.isWorkRunning(tag: String): Boolean = checkWork(tag, listOf(WorkInfo.State.RUNNING)) + +fun WorkManager.isWorkScheduled(tag: String): Boolean = + checkWork(tag, listOf(WorkInfo.State.RUNNING, WorkInfo.State.ENQUEUED)) + +private fun WorkManager.checkWork(tag: String, stateConditions: List): Boolean { + val statuses: ListenableFuture> = getWorkInfosByTag(tag) var workInfoList: List = emptyList() try { workInfoList = statuses.get() } catch (e: ExecutionException) { - Log_OC.d("Worker", "ExecutionException in isWorkScheduled: $e") + Log_OC.d(TAG, "ExecutionException in checkWork: $e") } catch (e: InterruptedException) { - Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") + Log_OC.d(TAG, "InterruptedException in checkWork: $e") } - return workInfoList.any { - it.state == WorkInfo.State.RUNNING || it.state == WorkInfo.State.ENQUEUED - } -} - -fun WorkManager.isWorkRunning(tag: String): Boolean { - val statuses: ListenableFuture> = this.getWorkInfosByTag(tag) - var workInfoList: List = emptyList() - - try { - workInfoList = statuses.get() - } catch (e: ExecutionException) { - Log_OC.d("Worker", "ExecutionException in isWorkScheduled: $e") - } catch (e: InterruptedException) { - Log_OC.d("Worker", "InterruptedException in isWorkScheduled: $e") - } - - return workInfoList.any { - it.state == WorkInfo.State.RUNNING - } -} + return workInfoList.any { workInfo -> stateConditions.contains(workInfo.state) } +} \ No newline at end of file From a73b3e9e72d9a6cb3288f6633f04b97a0fa486b2 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Thu, 2 May 2024 15:42:12 +0200 Subject: [PATCH 16/21] Skip folder scan if charging only and not charging Signed-off-by: Jonas Mayer --- .../java/com/nextcloud/client/jobs/FilesSyncWork.kt | 10 +++++++++- .../com/owncloud/android/utils/FilesSyncHelper.java | 10 ++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index c754b337e5..05028c99e3 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -112,6 +112,14 @@ class FilesSyncWork( canExitEarly = true } + if (syncedFolderProvider.syncedFolders.all { it.isChargingOnly } && + !powerManagementService.battery.isCharging && + !powerManagementService.battery.isFull) { + + Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") + canExitEarly = true + } + return canExitEarly } @@ -181,7 +189,7 @@ class FilesSyncWork( // Check every file in every synced folder for changes and update // filesystemDataProvider database (potentially needs a long time so use foreground worker) updateForegroundWorker(5, true) - FilesSyncHelper.insertAllDBEntries(syncedFolderProvider) + FilesSyncHelper.insertAllDBEntries(syncedFolderProvider, powerManagementService) updateForegroundWorker(50, true) } } diff --git a/app/src/main/java/com/owncloud/android/utils/FilesSyncHelper.java b/app/src/main/java/com/owncloud/android/utils/FilesSyncHelper.java index c68c54329c..dd8d566a26 100644 --- a/app/src/main/java/com/owncloud/android/utils/FilesSyncHelper.java +++ b/app/src/main/java/com/owncloud/android/utils/FilesSyncHelper.java @@ -115,9 +115,15 @@ public final class FilesSyncHelper { } } - public static void insertAllDBEntries(SyncedFolderProvider syncedFolderProvider) { + public static void insertAllDBEntries(SyncedFolderProvider syncedFolderProvider, + PowerManagementService powerManagementService) { for (SyncedFolder syncedFolder : syncedFolderProvider.getSyncedFolders()) { - if (syncedFolder.isEnabled()) { + if (syncedFolder.isEnabled() && + !(syncedFolder.isChargingOnly() && + !powerManagementService.getBattery().isCharging() && + !powerManagementService.getBattery().isFull() + ) + ) { insertAllDBEntriesForSyncedFolder(syncedFolder); } } From 9cbdbead0872dd9761da8066501651801f023b2f Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Thu, 2 May 2024 16:00:13 +0200 Subject: [PATCH 17/21] Fix codacy Signed-off-by: Jonas Mayer --- .../com/nextcloud/utils/extensions/WorkManagerExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt index f4bb60d77a..6e285cc2da 100644 --- a/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt +++ b/app/src/main/java/com/nextcloud/utils/extensions/WorkManagerExtensions.kt @@ -33,4 +33,4 @@ private fun WorkManager.checkWork(tag: String, stateConditions: List stateConditions.contains(workInfo.state) } -} \ No newline at end of file +} From 98586faa7797e0994670e0497a0143e68956ba62 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Thu, 2 May 2024 16:09:32 +0200 Subject: [PATCH 18/21] Fix spotless Signed-off-by: Jonas Mayer --- app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index 45aeeb6ffa..bbe0f0d6d6 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -113,8 +113,8 @@ class FilesSyncWork( if (syncedFolderProvider.syncedFolders.all { it.isChargingOnly } && !powerManagementService.battery.isCharging && - !powerManagementService.battery.isFull) { - + !powerManagementService.battery.isFull + ) { Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") canExitEarly = true } From aae144331ca46b93fbf920e9e1739897d62155b2 Mon Sep 17 00:00:00 2001 From: Jonas Mayer Date: Thu, 2 May 2024 16:18:50 +0200 Subject: [PATCH 19/21] Fix log messages Signed-off-by: Jonas Mayer --- .../main/java/com/nextcloud/client/jobs/FilesSyncWork.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt index bbe0f0d6d6..52a2ac2245 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/FilesSyncWork.kt @@ -102,12 +102,12 @@ class FilesSyncWork( // or sync worker already running and no changed files to be processed val alreadyRunning = backgroundJobManager.bothFilesSyncJobsRunning() if (alreadyRunning && changedFiles.isNullOrEmpty()) { - Log_OC.d(TAG, "FILESYNC Kill Sync Worker since another instance of the worker seems to be running already!") + Log_OC.d(TAG, "File-sync kill worker since another instance of the worker seems to be running already!") canExitEarly = true } if (!syncedFolderProvider.syncedFolders.any { it.isEnabled }) { - Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") + Log_OC.d(TAG, "File-sync kill worker since no sync folder is enabled!") canExitEarly = true } @@ -115,7 +115,7 @@ class FilesSyncWork( !powerManagementService.battery.isCharging && !powerManagementService.battery.isFull ) { - Log_OC.d(TAG, "FILESYNC Kill Sync Worker since no sync folder is enabled!") + Log_OC.d(TAG, "File-sync kill worker since phone is not charging!") canExitEarly = true } From 956b6755a79206e4cf8ebc409f54e90e8b541b96 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Fri, 3 May 2024 02:42:21 +0000 Subject: [PATCH 20/21] Fix(l10n): Update translations from Transifex Signed-off-by: Nextcloud bot --- app/src/main/res/values-tr/strings.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml index 91c82f0b94..e0c3ef5096 100644 --- a/app/src/main/res/values-tr/strings.xml +++ b/app/src/main/res/values-tr/strings.xml @@ -88,6 +88,8 @@ Sunucu adı bulunamadı %1$s birden çok hesabı desteklemiyor Bağlantı kurulamadı + Oturum açmaktan vazgeç + Lütfen oturum açma işlemini tarayıcınızdan tamamlayın salt okunur olduğundan özgün klasörde kaldı Yalnızca kullanıma göre ücretlendirilmeyen kablosuz ağ üzerinden yüklensin /OtomatikYükleme From 60b927c51ebd2d343a4250b2bbc337557e990a54 Mon Sep 17 00:00:00 2001 From: Nextcloud bot Date: Fri, 3 May 2024 15:40:53 +0000 Subject: [PATCH 21/21] Updating reuse.yml workflow from template Signed-off-by: Nextcloud bot --- .github/workflows/reuse.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index 57231dcf6c..8e6f3ca797 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -9,10 +9,10 @@ name: REUSE Compliance Check -on: [pull_request] +on: pull_request jobs: - test: + reuse-compliance-check: runs-on: ubuntu-latest steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4