Loading app-common/src/main/kotlin/net/thunderbird/app/common/BaseApplication.kt +2 −3 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ import com.fsck.k9.K9 import com.fsck.k9.MessagingListenerProvider import com.fsck.k9.controller.MessagingController import com.fsck.k9.job.WorkManagerConfigurationProvider import com.fsck.k9.logging.Timber import com.fsck.k9.notification.NotificationChannelManager import com.fsck.k9.ui.base.AppLanguageManager import com.fsck.k9.ui.base.extensions.currentLocale Loading Loading @@ -99,7 +98,7 @@ abstract class BaseApplication : Application(), WorkManagerConfiguration.Provide } private fun updateConfigurationWithLocale(configuration: Configuration, locale: Locale) { Timber.d("Updating application configuration with locale '$locale'") Log.d("Updating application configuration with locale '$locale'") val newConfiguration = Configuration(configuration).apply { currentLocale = locale Loading @@ -123,7 +122,7 @@ abstract class BaseApplication : Application(), WorkManagerConfiguration.Provide if (appLanguageManagerInitialized) { appLanguageManager.getOverrideLocale()?.let { overrideLocale -> if (resources.configuration.currentLocale != overrideLocale) { Timber.w("Resources configuration was reset. Re-applying locale override.") Log.w("Resources configuration was reset. Re-applying locale override.") appLanguageManager.applyOverrideLocale() applyOverrideLocaleToConfiguration() } Loading app-common/src/main/kotlin/net/thunderbird/app/common/account/AccountCreator.kt +2 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ import com.fsck.k9.Core import com.fsck.k9.Preferences import com.fsck.k9.account.DeletePolicyProvider import com.fsck.k9.controller.MessagingController import com.fsck.k9.logging.Timber import com.fsck.k9.mail.ServerSettings import com.fsck.k9.mail.store.imap.ImapStoreSettings.autoDetectNamespace import com.fsck.k9.mail.store.imap.ImapStoreSettings.createExtra Loading @@ -24,6 +23,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.common.mail.Protocols import net.thunderbird.core.logging.legacy.Log import net.thunderbird.feature.mail.folder.api.SpecialFolderSelection // TODO Move to feature/account/setup Loading @@ -43,7 +43,7 @@ internal class AccountCreator( return try { withContext(coroutineDispatcher) { AccountCreatorResult.Success(create(account)) } } catch (e: Exception) { Timber.e(e, "Error while creating new account") Log.e(e, "Error while creating new account") AccountCreatorResult.Error(e.message ?: "Unknown create account error") } Loading backend/imap/build.gradle.kts +1 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ dependencies { implementation(libs.kotlinx.coroutines.core) testImplementation(projects.core.logging.testing) testImplementation(projects.mail.testing) testImplementation(projects.backend.testing) testImplementation(libs.mime4j.dom) Loading backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandExpunge.kt +3 −3 Original line number Diff line number Diff line package com.fsck.k9.backend.imap import com.fsck.k9.logging.Timber import com.fsck.k9.mail.store.imap.ImapStore import com.fsck.k9.mail.store.imap.OpenMode import net.thunderbird.core.logging.legacy.Log internal class CommandExpunge(private val imapStore: ImapStore) { fun expunge(folderServerId: String) { Timber.d("processPendingExpunge: folder = %s", folderServerId) Log.d("processPendingExpunge: folder = %s", folderServerId) val remoteFolder = imapStore.getFolder(folderServerId) try { Loading @@ -15,7 +15,7 @@ internal class CommandExpunge(private val imapStore: ImapStore) { remoteFolder.expunge() Timber.d("processPendingExpunge: complete for folder = %s", folderServerId) Log.d("processPendingExpunge: complete for folder = %s", folderServerId) } finally { remoteFolder.close() } Loading backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandMoveOrCopyMessages.kt +3 −3 Original line number Diff line number Diff line package com.fsck.k9.backend.imap import com.fsck.k9.logging.Timber import com.fsck.k9.mail.store.imap.ImapFolder import com.fsck.k9.mail.store.imap.ImapStore import com.fsck.k9.mail.store.imap.OpenMode import net.thunderbird.core.logging.legacy.Log internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) { Loading Loading @@ -36,7 +36,7 @@ internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) { remoteSrcFolder = imapStore.getFolder(srcFolder) if (uids.isEmpty()) { Timber.i("moveOrCopyMessages: no remote messages to move, skipping") Log.i("moveOrCopyMessages: no remote messages to move, skipping") return null } Loading @@ -44,7 +44,7 @@ internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) { val messages = uids.map { uid -> remoteSrcFolder.getMessage(uid) } Timber.d( Log.d( "moveOrCopyMessages: source folder = %s, %d messages, destination folder = %s, isCopy = %s", srcFolder, messages.size, Loading Loading
app-common/src/main/kotlin/net/thunderbird/app/common/BaseApplication.kt +2 −3 Original line number Diff line number Diff line Loading @@ -11,7 +11,6 @@ import com.fsck.k9.K9 import com.fsck.k9.MessagingListenerProvider import com.fsck.k9.controller.MessagingController import com.fsck.k9.job.WorkManagerConfigurationProvider import com.fsck.k9.logging.Timber import com.fsck.k9.notification.NotificationChannelManager import com.fsck.k9.ui.base.AppLanguageManager import com.fsck.k9.ui.base.extensions.currentLocale Loading Loading @@ -99,7 +98,7 @@ abstract class BaseApplication : Application(), WorkManagerConfiguration.Provide } private fun updateConfigurationWithLocale(configuration: Configuration, locale: Locale) { Timber.d("Updating application configuration with locale '$locale'") Log.d("Updating application configuration with locale '$locale'") val newConfiguration = Configuration(configuration).apply { currentLocale = locale Loading @@ -123,7 +122,7 @@ abstract class BaseApplication : Application(), WorkManagerConfiguration.Provide if (appLanguageManagerInitialized) { appLanguageManager.getOverrideLocale()?.let { overrideLocale -> if (resources.configuration.currentLocale != overrideLocale) { Timber.w("Resources configuration was reset. Re-applying locale override.") Log.w("Resources configuration was reset. Re-applying locale override.") appLanguageManager.applyOverrideLocale() applyOverrideLocaleToConfiguration() } Loading
app-common/src/main/kotlin/net/thunderbird/app/common/account/AccountCreator.kt +2 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ import com.fsck.k9.Core import com.fsck.k9.Preferences import com.fsck.k9.account.DeletePolicyProvider import com.fsck.k9.controller.MessagingController import com.fsck.k9.logging.Timber import com.fsck.k9.mail.ServerSettings import com.fsck.k9.mail.store.imap.ImapStoreSettings.autoDetectNamespace import com.fsck.k9.mail.store.imap.ImapStoreSettings.createExtra Loading @@ -24,6 +23,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.withContext import net.thunderbird.core.android.account.LegacyAccount import net.thunderbird.core.common.mail.Protocols import net.thunderbird.core.logging.legacy.Log import net.thunderbird.feature.mail.folder.api.SpecialFolderSelection // TODO Move to feature/account/setup Loading @@ -43,7 +43,7 @@ internal class AccountCreator( return try { withContext(coroutineDispatcher) { AccountCreatorResult.Success(create(account)) } } catch (e: Exception) { Timber.e(e, "Error while creating new account") Log.e(e, "Error while creating new account") AccountCreatorResult.Error(e.message ?: "Unknown create account error") } Loading
backend/imap/build.gradle.kts +1 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,7 @@ dependencies { implementation(libs.kotlinx.coroutines.core) testImplementation(projects.core.logging.testing) testImplementation(projects.mail.testing) testImplementation(projects.backend.testing) testImplementation(libs.mime4j.dom) Loading
backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandExpunge.kt +3 −3 Original line number Diff line number Diff line package com.fsck.k9.backend.imap import com.fsck.k9.logging.Timber import com.fsck.k9.mail.store.imap.ImapStore import com.fsck.k9.mail.store.imap.OpenMode import net.thunderbird.core.logging.legacy.Log internal class CommandExpunge(private val imapStore: ImapStore) { fun expunge(folderServerId: String) { Timber.d("processPendingExpunge: folder = %s", folderServerId) Log.d("processPendingExpunge: folder = %s", folderServerId) val remoteFolder = imapStore.getFolder(folderServerId) try { Loading @@ -15,7 +15,7 @@ internal class CommandExpunge(private val imapStore: ImapStore) { remoteFolder.expunge() Timber.d("processPendingExpunge: complete for folder = %s", folderServerId) Log.d("processPendingExpunge: complete for folder = %s", folderServerId) } finally { remoteFolder.close() } Loading
backend/imap/src/main/java/com/fsck/k9/backend/imap/CommandMoveOrCopyMessages.kt +3 −3 Original line number Diff line number Diff line package com.fsck.k9.backend.imap import com.fsck.k9.logging.Timber import com.fsck.k9.mail.store.imap.ImapFolder import com.fsck.k9.mail.store.imap.ImapStore import com.fsck.k9.mail.store.imap.OpenMode import net.thunderbird.core.logging.legacy.Log internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) { Loading Loading @@ -36,7 +36,7 @@ internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) { remoteSrcFolder = imapStore.getFolder(srcFolder) if (uids.isEmpty()) { Timber.i("moveOrCopyMessages: no remote messages to move, skipping") Log.i("moveOrCopyMessages: no remote messages to move, skipping") return null } Loading @@ -44,7 +44,7 @@ internal class CommandMoveOrCopyMessages(private val imapStore: ImapStore) { val messages = uids.map { uid -> remoteSrcFolder.getMessage(uid) } Timber.d( Log.d( "moveOrCopyMessages: source folder = %s, %d messages, destination folder = %s, isCopy = %s", srcFolder, messages.size, Loading