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

Commit 46ca47fa authored by cketti's avatar cketti
Browse files

Remove unused parameter

parent 713082fe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ object Core : EarlyInit {
    @JvmStatic
    fun setServicesEnabled(context: Context) {
        val appContext = context.applicationContext
        val acctLength = Preferences.getPreferences(appContext).accounts.size
        val acctLength = Preferences.getPreferences().accounts.size
        val enable = acctLength > 0

        setServicesEnabled(appContext, enable)
+2 −3
Original line number Diff line number Diff line
package com.fsck.k9

import android.content.Context
import androidx.annotation.GuardedBy
import androidx.annotation.RestrictTo
import com.fsck.k9.mail.MessagingException
@@ -291,8 +290,8 @@ class Preferences internal constructor(

    companion object {
        @JvmStatic
        fun getPreferences(context: Context): Preferences {
            return DI.get(Preferences::class.java)
        fun getPreferences(): Preferences {
            return DI.get()
        }
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ public class LocalStore {
    }

    protected Preferences getPreferences() {
        return Preferences.getPreferences(context);
        return Preferences.getPreferences();
    }

    public OutboxStateRepository getOutboxStateRepository() {
+2 −2
Original line number Diff line number Diff line
@@ -188,7 +188,7 @@ public class SettingsImporter {

            Imported imported = parseSettings(inputStream, globalSettings, accountUuids, false);

            Preferences preferences = Preferences.getPreferences(context);
            Preferences preferences = Preferences.getPreferences();
            Storage storage = preferences.getStorage();

            if (globalSettings) {
@@ -331,7 +331,7 @@ public class SettingsImporter {

        AccountDescription original = new AccountDescription(account.name, account.uuid);

        Preferences prefs = Preferences.getPreferences(context);
        Preferences prefs = Preferences.getPreferences();
        List<Account> accounts = prefs.getAccounts();

        String uuid = account.uuid;
+3 −3
Original line number Diff line number Diff line
@@ -96,7 +96,7 @@ public class AttachmentProvider extends ContentProvider {

        final AttachmentInfo attachmentInfo;
        try {
            final Account account = Preferences.getPreferences(getContext()).getAccount(accountUuid);
            final Account account = Preferences.getPreferences().getAccount(accountUuid);
            attachmentInfo = DI.get(LocalStoreProvider.class).getInstance(account).getAttachmentInfo(id);
        } catch (MessagingException e) {
            Timber.e(e, "Unable to retrieve attachment info from local store for ID: %s", id);
@@ -143,7 +143,7 @@ public class AttachmentProvider extends ContentProvider {

    private String getType(String accountUuid, String id, String mimeType) {
        String type;
        final Account account = Preferences.getPreferences(getContext()).getAccount(accountUuid);
        final Account account = Preferences.getPreferences().getAccount(accountUuid);

        try {
            final LocalStore localStore = DI.get(LocalStoreProvider.class).getInstance(account);
@@ -182,7 +182,7 @@ public class AttachmentProvider extends ContentProvider {

    @Nullable
    private OpenPgpDataSource getAttachmentDataSource(String accountUuid, String attachmentId) throws MessagingException {
        final Account account = Preferences.getPreferences(getContext()).getAccount(accountUuid);
        final Account account = Preferences.getPreferences().getAccount(accountUuid);
        LocalStore localStore = DI.get(LocalStoreProvider.class).getInstance(account);
        return localStore.getAttachmentDataSource(attachmentId);
    }
Loading