Skip to content

Commit e19c723

Browse files
committed
Merge branch 'release/0.4.15' into main
2 parents 2f27ba7 + 723c7bd commit e19c723

File tree

1,502 files changed

+10088
-3992
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,502 files changed

+10088
-3992
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ on:
99

1010
# Enrich gradle.properties for CI/CD
1111
env:
12-
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC -Dkotlin.daemon.jvm.options="-Xmx3g"
13-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 -Dsonar.gradle.skipCompile=true
12+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
13+
CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true
1414

1515
jobs:
1616
debug:

.github/workflows/danger.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- run: |
1212
npm install --save-dev @babel/plugin-transform-flow-strip-types
1313
- name: Danger
14-
uses: danger/[email protected].1
14+
uses: danger/[email protected].2
1515
with:
1616
args: "--dangerfile ./tools/danger/dangerfile.js"
1717
env:

.github/workflows/maestro.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88

99
# Enrich gradle.properties for CI/CD
1010
env:
11-
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC -Dkotlin.daemon.jvm.options="-Xmx3g"
12-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 --no-daemon -Dsonar.gradle.skipCompile=true
11+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
12+
CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true
1313

1414
jobs:
1515
build-apk:

.github/workflows/nightly.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ on:
77
- cron: "0 4 * * *"
88

99
env:
10-
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
11-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 --no-daemon -Dsonar.gradle.skipCompile=true
10+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
11+
CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true
1212

1313
jobs:
1414
nightly:

.github/workflows/nightlyReports.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ on:
88

99
# Enrich gradle.properties for CI/CD
1010
env:
11-
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.daemon.jvm.options="-Xmx3g" -Dkotlin.incremental=false -XX:+UseG1GC
12-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 -Dsonar.gradle.skipCompile=true
11+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
12+
CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true
1313

1414
jobs:
1515
nightlyReports:

.github/workflows/quality.yml

+40-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
# Enrich gradle.properties for CI/CD
1111
env:
1212
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
13-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 --no-daemon -Dsonar.gradle.skipCompile=true
13+
CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true
1414

1515
jobs:
1616
checkScript:
@@ -33,6 +33,27 @@ jobs:
3333
- name: Search for invalid screenshot files
3434
run: ./tools/test/checkInvalidScreenshots.py
3535

36+
checkDependencies:
37+
name: Search for invalid dependencies
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v4
41+
- name: Use JDK 17
42+
uses: actions/setup-java@v4
43+
with:
44+
distribution: 'temurin' # See 'Supported distributions' for available options
45+
java-version: '17'
46+
- name: Configure gradle
47+
uses: gradle/actions/setup-gradle@v3
48+
with:
49+
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
50+
- name: Set up Python 3.12
51+
uses: actions/setup-python@v5
52+
with:
53+
python-version: 3.12
54+
- name: Search for invalid dependencies
55+
run: ./tools/dependencies/checkDependencies.py
56+
3657
# Code checks
3758
konsist:
3859
name: Konsist tests
@@ -88,6 +109,10 @@ jobs:
88109
uses: gradle/actions/setup-gradle@v3
89110
with:
90111
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
112+
- name: Build Gplay Debug
113+
run: ./gradlew :app:compileGplayDebugKotlin $CI_GRADLE_ARG_PROPERTIES
114+
- name: Build Fdroid Debug
115+
run: ./gradlew :app:compileFdroidDebugKotlin $CI_GRADLE_ARG_PROPERTIES
91116
- name: Run lint
92117
run: ./gradlew :app:lintGplayDebug :app:lintFdroidDebug $CI_GRADLE_ARG_PROPERTIES
93118
- name: Upload reports
@@ -187,6 +212,19 @@ jobs:
187212
- name: Run Knit
188213
run: ./gradlew knitCheck $CI_GRADLE_ARG_PROPERTIES
189214

215+
# Note: to auto fix issues you can use the following command:
216+
# shellcheck -f diff <files> | git apply
217+
shellcheck:
218+
name: Check shell scripts
219+
runs-on: ubuntu-latest
220+
steps:
221+
- uses: actions/checkout@v4
222+
- name: Run shellcheck
223+
uses: ludeeus/[email protected]
224+
with:
225+
scandir: ./tools
226+
severity: warning
227+
190228
upload_reports:
191229
name: Project Check Suite
192230
runs-on: ubuntu-latest
@@ -207,7 +245,7 @@ jobs:
207245
yarn add danger-plugin-lint-report --dev
208246
- name: Danger lint
209247
if: always()
210-
uses: danger/[email protected].1
248+
uses: danger/[email protected].2
211249
with:
212250
args: "--dangerfile ./tools/danger/dangerfile-lint.js"
213251
env:

.github/workflows/recordScreenshots.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
# Enrich gradle.properties for CI/CD
99
env:
10-
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx5g -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC -Dsonar.gradle.skipCompile=true
10+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx5g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC -Dsonar.gradle.skipCompile=true
1111

1212
jobs:
1313
record:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
# Enrich gradle.properties for CI/CD
99
env:
1010
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
11-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 --no-daemon -Dsonar.gradle.skipCompile=true
11+
CI_GRADLE_ARG_PROPERTIES: --stacktrace --no-daemon -Dsonar.gradle.skipCompile=true
1212

1313
jobs:
1414
gplay:

.github/workflows/scripts/recordScreenshots.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ if [[ -z ${REPO} ]]; then
6262
fi
6363

6464
echo "Deleting previous screenshots"
65-
./gradlew removeOldSnapshots --stacktrace -PpreDexEnable=false --max-workers 4 --warn
65+
./gradlew removeOldSnapshots --stacktrace --warn
6666

6767
echo "Record screenshots"
68-
./gradlew recordPaparazziDebug --stacktrace -PpreDexEnable=false --max-workers 4 --warn
68+
./gradlew recordPaparazziDebug --stacktrace --warn
6969

7070
echo "Committing changes"
7171
git config http.sslVerify false

.github/workflows/sonar.yml

+15-6
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@ on:
99

1010
# Enrich gradle.properties for CI/CD
1111
env:
12-
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -XX:MaxMetaspaceSize=512m -Dkotlin.incremental=false -XX:+UseG1GC
13-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 --warn -Dsonar.gradle.skipCompile=true
12+
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx6g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
13+
CI_GRADLE_ARG_PROPERTIES: --stacktrace --warn -Dsonar.gradle.skipCompile=true
14+
GROUP: ${{ format('sonar-{0}', github.ref) }}
1415

1516
jobs:
1617
sonar:
1718
name: Sonar Quality Checks
1819
runs-on: ubuntu-latest
1920
# Allow all jobs on main and develop. Just one per PR.
2021
concurrency:
21-
group: ${{ github.ref == 'refs/heads/main' && format('sonar-main-{0}', github.sha) || github.ref == 'refs/heads/develop' && format('sonar-develop-{0}', github.sha) || format('sonar-{0}', github.ref) }}
22-
cancel-in-progress: true
22+
group: ${{ format('sonar-{0}', github.ref) }}
23+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/develop' }}
2324
steps:
2425
- uses: actions/checkout@v4
2526
with:
@@ -35,8 +36,16 @@ jobs:
3536
uses: gradle/actions/setup-gradle@v3
3637
with:
3738
cache-read-only: ${{ github.ref != 'refs/heads/develop' }}
38-
- name: Build projects
39-
run: ./gradlew assembleDebug createFullJarDebugTestFixtures :app:createFullJarGplayDebugTestFixtures $CI_GRADLE_ARG_PROPERTIES
39+
- name: Build Gplay Debug
40+
run: ./gradlew :app:assembleGplayDebug $CI_GRADLE_ARG_PROPERTIES
41+
- name: Build Fdroid Debug
42+
run: ./gradlew :app:assembleFdroidDebug $CI_GRADLE_ARG_PROPERTIES
43+
- name: Build Sample
44+
run: ./gradlew :samples:minimal:assembleDebug $CI_GRADLE_ARG_PROPERTIES
45+
- name: Build library fixtures
46+
run: ./gradlew assembleDebug createFullJarDebugTestFixtures $CI_GRADLE_ARG_PROPERTIES
47+
- name: Build app fixtures
48+
run: ./gradlew :app:createFullJarGplayDebugTestFixtures $CI_GRADLE_ARG_PROPERTIES
4049
- name: 🔊 Publish results to Sonar
4150
env:
4251
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
# Enrich gradle.properties for CI/CD
1111
env:
1212
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx7g -XX:MaxMetaspaceSize=512m -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError" -Dkotlin.incremental=false -XX:+UseG1GC
13-
CI_GRADLE_ARG_PROPERTIES: --stacktrace -PpreDexEnable=false --max-workers 8 --warn -Dsonar.gradle.skipCompile=true
13+
CI_GRADLE_ARG_PROPERTIES: --stacktrace -Dsonar.gradle.skipCompile=true
1414

1515
jobs:
1616
tests:

.idea/dictionaries/shared.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGES.md

+23
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
Changes in Element X v0.4.15 (2024-06-19)
2+
=========================================
3+
4+
Features ✨
5+
----------
6+
- Ringing call notifications and full screen ringing screen for DMs when the device is locked. ([#2894](https://github.com/element-hq/element-x-android/issues/2894))
7+
8+
Bugfixes 🐛
9+
----------
10+
- Improve UX on notification setting changes. ([#1647](https://github.com/element-hq/element-x-android/issues/1647))
11+
- Fix tracing configuration in debug and nightlies:
12+
- Debug will now write the logs to disk too.
13+
- Nightly will be able to customise tracing filters.
14+
- Improved the configure tracing and bug report screens. ([#3016](https://github.com/element-hq/element-x-android/issues/3016))
15+
16+
Other changes
17+
-------------
18+
- Allow cancelling jump to event in timeline. ([#2876](https://github.com/element-hq/element-x-android/issues/2876))
19+
- Make Element Call widget URL configurable ([#3009](https://github.com/element-hq/element-x-android/issues/3009))
20+
- Enable hidden access to developer options in release mode apps. ([#3020](https://github.com/element-hq/element-x-android/issues/3020))
21+
- Improve how active calls work by also taking into account external url calls and waiting for the sync process to start before sending the `m.call.notify` event. ([#3029](https://github.com/element-hq/element-x-android/issues/3029))
22+
23+
124
Changes in Element X v0.4.14 (2024-06-07)
225
=========================================
326

README.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ The application is a total rewrite of [Element-Android](https://github.com/eleme
1414

1515
Learn more about why we are building Element X in our blog post: [https://element.io/blog/element-x-experience-the-future-of-element/](https://element.io/blog/element-x-experience-the-future-of-element/).
1616

17+
[<img src="https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png" alt="Get it on Google Play" height="80">](https://play.google.com/store/apps/details?id=io.element.android.x)[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80">](https://f-droid.org/packages/io.element.android.x)
18+
1719
## Table of contents
1820

1921
<!--- TOC -->
@@ -25,13 +27,13 @@ Learn more about why we are building Element X in our blog post: [https://elemen
2527
* [Contributing](#contributing)
2628
* [Build instructions](#build-instructions)
2729
* [Support](#support)
28-
* [Copyright & License](#copyright-&-license)
30+
* [Copyright and License](#copyright-and-license)
2931

3032
<!--- END -->
3133

3234
## Screenshots
3335

34-
Here are some early screenshots of the application:
36+
Here are some screenshots of the application:
3537

3638
<!--
3739
Commands run before taking the screenshots:
@@ -47,9 +49,9 @@ And to exit demo mode:
4749
adb shell am broadcast -a com.android.systemui.demo -e command exit
4850
-->
4951

50-
|<img src=./docs/images-lfs/screen_1_light.png width=280 />|<img src=./docs/images-lfs/screen_2_light.png width=280 />|<img src=./docs/images-lfs/screen_3_light.png width=280 />|<img src=./docs/images-lfs/screen_4_light.png width=280 />|
52+
|<img src="./docs/images-lfs/screen_1_light.png" width="280" />|<img src="./docs/images-lfs/screen_2_light.png" width="280" />|<img src="./docs/images-lfs/screen_3_light.png" width="280" />|<img src="./docs/images-lfs/screen_4_light.png" width="280" />|
5153
|-|-|-|-|
52-
|<img src=./docs/images-lfs/screen_1_dark.png width=280 />|<img src=./docs/images-lfs/screen_2_dark.png width=280 />|<img src=./docs/images-lfs/screen_3_dark.png width=280 />|<img src=./docs/images-lfs/screen_4_dark.png width=280 />|
54+
|<img src="./docs/images-lfs/screen_1_dark.png" width="280" />|<img src="./docs/images-lfs/screen_2_dark.png" width="280" />|<img src="./docs/images-lfs/screen_3_dark.png" width="280" />|<img src="./docs/images-lfs/screen_4_dark.png" width="280" />|
5355

5456
## Translations
5557

@@ -90,7 +92,7 @@ When you are experiencing an issue on Element X Android, please first search in
9092
and then in [#element-x-android:matrix.org](https://matrix.to/#/#element-x-android:matrix.org).
9193
If after your research you still have a question, ask at [#element-x-android:matrix.org](https://matrix.to/#/#element-x-android:matrix.org). Otherwise feel free to create a GitHub issue if you encounter a bug or a crash, by explaining clearly in detail what happened. You can also perform bug reporting from the application settings. This is especially recommended when you encounter a crash.
9294

93-
## Copyright & License
95+
## Copyright and License
9496

9597
Copyright © New Vector Ltd
9698

app/build.gradle.kts

-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ dependencies {
223223
allLibrariesImpl()
224224
allServicesImpl()
225225
allFeaturesImpl(rootDir, logger)
226-
implementation(projects.features.call)
227226
implementation(projects.features.migration.api)
228227
implementation(projects.anvilannotations)
229228
implementation(projects.appnav)

app/src/main/kotlin/io/element/android/x/di/AppBindings.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import com.squareup.anvil.annotations.ContributesTo
2020
import io.element.android.features.api.MigrationEntryPoint
2121
import io.element.android.features.lockscreen.api.LockScreenEntryPoint
2222
import io.element.android.features.lockscreen.api.LockScreenService
23-
import io.element.android.features.preferences.api.store.AppPreferencesStore
2423
import io.element.android.features.rageshake.api.reporter.BugReporter
2524
import io.element.android.libraries.designsystem.utils.snackbar.SnackbarDispatcher
2625
import io.element.android.libraries.di.AppScope
2726
import io.element.android.libraries.matrix.api.tracing.TracingService
27+
import io.element.android.libraries.preferences.api.store.AppPreferencesStore
2828

2929
@ContributesTo(AppScope::class)
3030
interface AppBindings {

app/src/main/kotlin/io/element/android/x/initializer/TracingInitializer.kt

+29-21
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ import androidx.preference.PreferenceManager
2222
import androidx.startup.Initializer
2323
import io.element.android.features.preferences.impl.developer.tracing.SharedPreferencesTracingConfigurationStore
2424
import io.element.android.features.preferences.impl.developer.tracing.TargetLogLevelMapBuilder
25+
import io.element.android.features.rageshake.api.reporter.BugReporter
2526
import io.element.android.libraries.architecture.bindings
27+
import io.element.android.libraries.core.meta.BuildType
2628
import io.element.android.libraries.matrix.api.tracing.TracingConfiguration
2729
import io.element.android.libraries.matrix.api.tracing.TracingFilterConfigurations
2830
import io.element.android.libraries.matrix.api.tracing.WriteToFilesConfiguration
@@ -36,31 +38,27 @@ class TracingInitializer : Initializer<Unit> {
3638
val tracingService = appBindings.tracingService()
3739
val bugReporter = appBindings.bugReporter()
3840
Timber.plant(tracingService.createTimberTree())
39-
val tracingConfiguration = if (BuildConfig.DEBUG) {
40-
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
41-
val store = SharedPreferencesTracingConfigurationStore(prefs)
42-
val builder = TargetLogLevelMapBuilder(store)
41+
val tracingConfiguration = if (BuildConfig.BUILD_TYPE == BuildType.RELEASE.name) {
4342
TracingConfiguration(
44-
filterConfiguration = TracingFilterConfigurations.custom(builder.getCurrentMap()),
45-
writesToLogcat = true,
46-
writesToFilesConfiguration = WriteToFilesConfiguration.Disabled
43+
filterConfiguration = TracingFilterConfigurations.release,
44+
writesToLogcat = false,
45+
writesToFilesConfiguration = defaultWriteToDiskConfiguration(bugReporter),
4746
)
4847
} else {
49-
val config = if (BuildConfig.BUILD_TYPE == "nightly") {
50-
TracingFilterConfigurations.nightly
51-
} else {
52-
TracingFilterConfigurations.release
53-
}
48+
val prefs = PreferenceManager.getDefaultSharedPreferences(context)
49+
val store = SharedPreferencesTracingConfigurationStore(prefs)
50+
val builder = TargetLogLevelMapBuilder(
51+
tracingConfigurationStore = store,
52+
defaultConfig = if (BuildConfig.BUILD_TYPE == BuildType.NIGHTLY.name) {
53+
TracingFilterConfigurations.nightly
54+
} else {
55+
TracingFilterConfigurations.debug
56+
}
57+
)
5458
TracingConfiguration(
55-
filterConfiguration = config,
56-
writesToLogcat = false,
57-
writesToFilesConfiguration = WriteToFilesConfiguration.Enabled(
58-
directory = bugReporter.logDirectory().absolutePath,
59-
filenamePrefix = "logs",
60-
filenameSuffix = null,
61-
// Keep a minimum of 1 week of log files.
62-
numberOfFiles = 7 * 24,
63-
)
59+
filterConfiguration = TracingFilterConfigurations.custom(builder.getCurrentMap()),
60+
writesToLogcat = BuildConfig.DEBUG,
61+
writesToFilesConfiguration = defaultWriteToDiskConfiguration(bugReporter),
6462
)
6563
}
6664
bugReporter.setCurrentTracingFilter(tracingConfiguration.filterConfiguration.filter)
@@ -69,5 +67,15 @@ class TracingInitializer : Initializer<Unit> {
6967
Os.setenv("RUST_BACKTRACE", "1", true)
7068
}
7169

70+
private fun defaultWriteToDiskConfiguration(bugReporter: BugReporter): WriteToFilesConfiguration.Enabled {
71+
return WriteToFilesConfiguration.Enabled(
72+
directory = bugReporter.logDirectory().absolutePath,
73+
filenamePrefix = "logs",
74+
filenameSuffix = null,
75+
// Keep a minimum of 1 week of log files.
76+
numberOfFiles = 7 * 24,
77+
)
78+
}
79+
7280
override fun dependencies(): List<Class<out Initializer<*>>> = mutableListOf()
7381
}

0 commit comments

Comments
 (0)