Skip to content

Add Mail sync debug logging #9140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
*.bat eol=crlf
*.eml eol=crlf
*.jar binary

app-k9mail/build.gradle.kts merge=merge_gradle
app-thunderbird/build.gradle.kts merge=merge_gradle
app-k9mail/src/main/res/raw/changelog_master.xml merge=ours
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Bug report
description: Let us know about crashes or existing functionality not working like it should.
description: Let us know about crashes or existing functionality not working like it should
labels: [ "type: bug", "unconfirmed" ]
body:
- type: markdown
Expand Down
11 changes: 4 additions & 7 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
- name: Feature request
url: https://connect.mozilla.org/t5/ideas/idb-p/ideas/label-name/thunderbird%20android
about: Submit your ideas to improve Thunderbird for Android.
- name: Security Vulnerability
url: https://github.com/thunderbird/thunderbird-android/security/advisories/new
about: Report a security vulnerability. Many users could be harmed from this and it should be kept private until resolved.
- name: Mozilla Support Forum (SUMO)
about: Submit your ideas to improve Thunderbird for Android
- name: Mozilla support forum (SUMO)
url: https://support.mozilla.org/products/thunderbird-android
about: Most issues are not bugs. Ask the community for help.
about: Many issues are not bugs, ask the community for help
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/maintainer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Maintainer issue
about: Please use one of the other issue templates instead
title: ''
labels: []
assignees: []
---

3 changes: 2 additions & 1 deletion .github/ci-gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
org.gradle.daemon=false
org.gradle.parallel=true
org.gradle.workers.max=2
org.gradle.workers.max=4
org.gradle.jvmargs=-Xmx10g -XX:MaxMetaspaceSize=1g -Dfile.encoding=UTF-8 -XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError

kotlin.incremental=false
kotlin.compiler.execution.strategy=in-process
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
version: 2
commit-message:
prefix: chore
include: scope
labels:
- "type: dependency"
updates:
- package-ecosystem: "github-actions"
directory: "/"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0

- name: Quality - Spotless
run: ./gradlew spotlessCheck
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
with:
cache-read-only: true

- uses: github/codeql-action/init@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
- uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
languages: java

- name: Autobuild
uses: github/codeql-action/autobuild@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
uses: github/codeql-action/autobuild@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
uses: github/codeql-action/analyze@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18

4 changes: 2 additions & 2 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
environment: botmobile
steps:
- name: App token generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand All @@ -34,7 +34,7 @@ jobs:
token: ${{ steps.app-token.outputs.token || github.token }}

- name: Cargo cache
uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0

- name: Install mdbook and extensions
run: ./docs/install.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fluidscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
sarif_file: fluidscan-results.sarif
2 changes: 1 addition & 1 deletion .github/workflows/gradle-cache.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0

- name: Build (run full build and tests)
run: ./gradlew build
4 changes: 2 additions & 2 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Cargo cache
uses: actions-rust-lang/setup-rust-toolchain@9399c7bb15d4c7d47b27263d024f0a4978346ba4 # v1.11.0
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0

- name: Install mdbook and extensions
run: ./docs/install.sh
Expand All @@ -31,7 +31,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0

- name: Quality - Spotless Markdown Check
run: ./gradlew spotlessFlexmarkCheck
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/needinfo-answered.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pull-requests: write
steps:
- name: App token generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/needinfo-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
pull-requests: write
steps:
- name: App token generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/needinfo-stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
pull-requests: write
steps:
- name: App token generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pulls-merged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
environment: botmobile
steps:
- name: App token generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@45775bd8235c68ba998cffa5171334d58593da47 # v3.28.15
uses: github/codeql-action/upload-sarif@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
with:
sarif_file: results.sarif
14 changes: 7 additions & 7 deletions .github/workflows/shippable_builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ jobs:
new_version_code: ${{ steps.new_version_code.outputs.new_version_code }}
steps:
- name: App Token Generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand All @@ -232,7 +232,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
if: ${{ contains(matrix.releaseTarget, 'github') || needs.dump_config.outputs.releaseType == 'daily' }}
with:
cache-disabled: "${{ contains(fromJSON('[\"beta\", \"release\"]'), needs.dump_config.outputs.releaseType) }}"
Expand Down Expand Up @@ -480,7 +480,7 @@ jobs:
java-version: '17'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
uses: gradle/actions/setup-gradle@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
with:
cache-disabled: "${{ contains(fromJSON('[\"beta\", \"release\"]'), needs.dump_config.outputs.releaseType) }}"
add-job-summary: on-failure
Expand Down Expand Up @@ -583,7 +583,7 @@ jobs:
env:
RELEASE_TYPE: ${{ needs.dump_config.outputs.releaseType }}
steps:
- uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: unsigned-${{ matrix.appName }}-${{ matrix.packageFormat }}-${{ matrix.packageFlavor }}
path: uploads/
Expand Down Expand Up @@ -704,7 +704,7 @@ jobs:
ref: ${{ steps.shanotes.outputs.app_sha }}

- name: Download Artifacts
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: signed-${{ matrix.appName }}-${{ matrix.packageFormat }}-${{ matrix.packageFlavor }}
path: "uploads/"
Expand Down Expand Up @@ -765,7 +765,7 @@ jobs:
ls -l uploads/${PKG_FILE_PRETTY}

- name: App Token Generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ contains(matrix.releaseTarget, 'github') && vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand Down Expand Up @@ -913,7 +913,7 @@ jobs:

- name: Auth to GCS for FTP
if: ${{ !inputs.skipFtp && contains(matrix.releaseTarget, 'ftp') && matrix.packageFormat == 'apk' }}
uses: google-github-actions/auth@71f986410dfbc7added4569d411d040a91dc6935 # v2.1.8
uses: google-github-actions/auth@ba79af03959ebeac9769e648f473a284504d9193 # v2.1.10
with:
service_account: ${{ steps.prepare_ftp.outputs.SERVICE_ACCOUNT }}
workload_identity_provider: ${{ steps.prepare_ftp.outputs.WORKLOAD_IDENTITY_PROVIDER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/uplift-merges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
pull-requests: write
steps:
- name: App token generate
uses: actions/create-github-app-token@3ff1caaa28b64c9cc276ce0a02e2ff584f3900c5 # v2.0.2
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
if: ${{ !inputs.dryRun && vars.BOT_CLIENT_ID }}
id: app-token
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: gradle/actions/wrapper-validation@06832c7b30a0129d7fb559bcc6e43d26f6374244 # v4.3.1
- uses: gradle/actions/wrapper-validation@8379f6a1328ee0e06e2bb424dadb7b159856a326 # v4.4.0
13 changes: 6 additions & 7 deletions app-common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@ android {

dependencies {
api(projects.legacy.common)

api(projects.legacy.ui.legacy)

api(projects.feature.account.core)

api(projects.feature.launcher)

api(projects.feature.navigation.drawer.api)

implementation(projects.legacy.core)
implementation(projects.legacy.account)
implementation(projects.core.android.account)

implementation(projects.core.account)

implementation(projects.core.featureflags)
implementation(projects.core.featureflag)
implementation(projects.core.ui.legacy.theme2.common)

implementation(projects.feature.account.setup)
implementation(projects.feature.mail.account.api)
implementation(projects.feature.migration.provider)
implementation(projects.feature.widget.messageList)

implementation(projects.mail.protocols.imap)

implementation(libs.androidx.work.runtime)
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
package net.thunderbird.app.common

import com.fsck.k9.legacyCommonAppModules
import com.fsck.k9.legacyCoreModules
import com.fsck.k9.legacyUiModules
import net.thunderbird.app.common.account.appCommonAccountModule
import net.thunderbird.app.common.feature.appCommonFeatureModule
import org.koin.core.module.Module
import org.koin.dsl.module

val appCommonModule: Module = module {
includes(legacyCommonAppModules)
includes(legacyCoreModules)
includes(legacyUiModules)

includes(
appCommonAccountModule,
appCommonFeatureModule,
)
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package com.fsck.k9
package net.thunderbird.app.common

import android.app.Application
import android.content.Context
import android.content.res.Configuration
import android.content.res.Resources
import app.k9mail.feature.widget.message.list.MessageListWidgetManager
import app.k9mail.legacy.di.DI
import com.fsck.k9.Core
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
Expand All @@ -21,10 +25,10 @@ import kotlinx.coroutines.flow.onEach
import net.thunderbird.core.ui.theme.manager.ThemeManager
import org.koin.android.ext.android.inject
import org.koin.core.module.Module
import timber.log.Timber
import androidx.work.Configuration as WorkManagerConfiguration

abstract class CommonApp : Application(), WorkManagerConfiguration.Provider {
abstract class BaseApplication : Application(), WorkManagerConfiguration.Provider {

private val messagingController: MessagingController by inject()
private val messagingListenerProvider: MessagingListenerProvider by inject()
private val themeManager: ThemeManager by inject()
Expand All @@ -38,10 +42,11 @@ abstract class CommonApp : Application(), WorkManagerConfiguration.Provider {

override fun attachBaseContext(base: Context?) {
Core.earlyInit()

super.attachBaseContext(base)

// Start Koin early so it is ready by the time content providers are initialized.
DI.start(this, listOf(provideAppModule()) + coreModules + uiModules + commonAppModules)
DI.start(this, listOf(provideAppModule()))
}

override fun onCreate() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package net.thunderbird.app.common.account

import android.content.res.Resources
import app.k9mail.core.ui.legacy.theme2.common.R
import app.k9mail.legacy.account.AccountManager
import net.thunderbird.core.android.account.AccountManager

class AccountColorPicker(
internal class AccountColorPicker(
private val accountManager: AccountManager,
private val resources: Resources,
) {
Expand Down
Loading