Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e3418c9 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

fix loading of account type in fullScanWorker

parent 1d10f73b
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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)) {