Loading app/core/src/main/java/com/fsck/k9/Core.kt +1 −1 Original line number Diff line number Diff line Loading @@ -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) Loading app/core/src/main/java/com/fsck/k9/Preferences.kt +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 Loading Loading @@ -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() } } } app/core/src/main/java/com/fsck/k9/mailstore/LocalStore.java +1 −1 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ public class LocalStore { } protected Preferences getPreferences() { return Preferences.getPreferences(context); return Preferences.getPreferences(); } public OutboxStateRepository getOutboxStateRepository() { Loading app/core/src/main/java/com/fsck/k9/preferences/SettingsImporter.java +2 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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; Loading app/core/src/main/java/com/fsck/k9/provider/AttachmentProvider.java +3 −3 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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 Loading
app/core/src/main/java/com/fsck/k9/Core.kt +1 −1 Original line number Diff line number Diff line Loading @@ -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) Loading
app/core/src/main/java/com/fsck/k9/Preferences.kt +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 Loading Loading @@ -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() } } }
app/core/src/main/java/com/fsck/k9/mailstore/LocalStore.java +1 −1 Original line number Diff line number Diff line Loading @@ -227,7 +227,7 @@ public class LocalStore { } protected Preferences getPreferences() { return Preferences.getPreferences(context); return Preferences.getPreferences(); } public OutboxStateRepository getOutboxStateRepository() { Loading
app/core/src/main/java/com/fsck/k9/preferences/SettingsImporter.java +2 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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; Loading
app/core/src/main/java/com/fsck/k9/provider/AttachmentProvider.java +3 −3 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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