From 5e3418c959be449d6fdb6629d991ed50f37406fe Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Thu, 2 Nov 2023 12:40:35 +0100 Subject: [PATCH] fix loading of account type in fullScanWorker --- app/src/main/java/foundation/e/drive/work/FullScanWorker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/foundation/e/drive/work/FullScanWorker.java b/app/src/main/java/foundation/e/drive/work/FullScanWorker.java index 156bcb73..2c210d2b 100644 --- a/app/src/main/java/foundation/e/drive/work/FullScanWorker.java +++ b/app/src/main/java/foundation/e/drive/work/FullScanWorker.java @@ -18,6 +18,7 @@ import androidx.annotation.NonNull; import androidx.work.Worker; import androidx.work.WorkerParameters; +import foundation.e.drive.R; import foundation.e.drive.services.ObserverService; import foundation.e.drive.utils.AppConstants; import foundation.e.drive.utils.CommonUtils; @@ -48,8 +49,7 @@ public class FullScanWorker extends Worker { final SharedPreferences prefs = getApplicationContext().getSharedPreferences(AppConstants.SHARED_PREFERENCE_NAME, Context.MODE_PRIVATE); final String accountName = prefs.getString(AccountManager.KEY_ACCOUNT_NAME, ""); - final String accountType = prefs.getString(AccountManager.KEY_ACCOUNT_TYPE, ""); - + final String accountType = getApplicationContext().getString(R.string.eelo_account_type); final Account mAccount = CommonUtils.getAccount(accountName, accountType, AccountManager.get(this.getApplicationContext())); if (mAccount != null && CommonUtils.isSettingsSyncEnabled(mAccount) && CommonUtils.isMediaSyncEnabled(mAccount)) { -- GitLab