Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@
package com.google.firebase.datastorage

import android.content.Context
import android.os.Process
import android.util.Log
import androidx.datastore.core.DataStore
import androidx.datastore.core.handlers.ReplaceFileCorruptionHandler
import androidx.datastore.preferences.SharedPreferencesMigration
import androidx.datastore.preferences.core.MutablePreferences
import androidx.datastore.preferences.core.Preferences
import androidx.datastore.preferences.core.edit
import androidx.datastore.preferences.core.emptyPreferences
import androidx.datastore.preferences.preferencesDataStore
import com.google.firebase.annotations.concurrent.Background
import kotlinx.coroutines.flow.firstOrNull
Expand Down Expand Up @@ -60,7 +64,16 @@ class JavaDataStorage(val context: Context, val name: String) {
private val Context.dataStore: DataStore<Preferences> by
preferencesDataStore(
name = name,
produceMigrations = { listOf(SharedPreferencesMigration(it, name)) }
produceMigrations = { listOf(SharedPreferencesMigration(it, name)) },
corruptionHandler =
ReplaceFileCorruptionHandler { ex ->
Log.w(
JavaDataStorage::class.simpleName,
"CorruptionException in ${name} DataStore running in process ${Process.myPid()}",
ex
)
emptyPreferences()
}
)

private val dataStore = context.dataStore
Expand Down
7 changes: 3 additions & 4 deletions firebase-crashlytics-ndk/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unreleased

* [changed] Updated `firebase-crashlytics` dependency to 20.0.1

# 20.0.0
* [changed] **Breaking Change**: Updated minSdkVersion to API level 23 or higher.
Expand Down Expand Up @@ -243,12 +243,12 @@ change. The following release notes describe changes in the new SDK.
<li>If you're using [crashlytics] for NDK crash reporting in your app for
the first time, follow the
<a href="/docs/crashlytics/get-started-new-sdk?platform=android">getting
started instructions</a>.
started instructions</a>.
</li>
<li>If you're upgrading from the legacy Fabric SDK to the
[firebase_crashlytics] SDK for NDK crash reporting, follow the
<a href="/docs/crashlytics/upgrade-sdk?platform=android">upgrade
instructions</a> to update your app with the following SDK changes.
instructions</a> to update your app with the following SDK changes.
</li>
</ul>
</aside>
Expand All @@ -259,4 +259,3 @@ change. The following release notes describe changes in the new SDK.
uploading symbol files to [crashlytics] servers. See the
[[crashlytics] Gradle plugin documentation](/docs/crashlytics/ndk-reports-new-sdk)
for more information.

7 changes: 3 additions & 4 deletions firebase-crashlytics/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Unreleased

** [changed] Updated `firebase-sessions` dependency to v3.0.1

# 20.0.0
* [changed] **Breaking Change**: Removed deprecated public constructor `KeyValueBuilder(crashlytics: FirebaseCrashlytics)`
Expand Down Expand Up @@ -683,12 +683,12 @@ The following release notes describe changes in the new SDK.
<li>If you're using [crashlytics] for NDK crash reporting in your app for
the first time, follow the
<a href="/docs/crashlytics/get-started-new-sdk?platform=android">getting
started instructions</a>.
started instructions</a>.
</li>
<li>If you're upgrading from the legacy Fabric SDK to the
[firebase_crashlytics] SDK, follow the
<a href="/docs/crashlytics/upgrade-sdk?platform=android">upgrade
instructions</a> to update your app with the following SDK changes.
instructions</a> to update your app with the following SDK changes.
</li>
</ul>
</aside>
Expand All @@ -702,4 +702,3 @@ The following release notes describe changes in the new SDK.
from your `AndroidManifest.xml` file.
* [removed] The `fabric.properties` and `crashlytics.properties` files are no
longer supported. Remove them from your app.

5 changes: 3 additions & 2 deletions firebase-sessions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Unreleased

* [fixed] Bumped DataStore dependency to include the mitigation for
`CorruptionException` released in version `1.1.5`. See Jetpacks' DataStore
[release notes](https://developer.android.com/jetpack/androidx/releases/datastore#1.1.5).

# 3.0.0
* [changed] Added internal api for Crashlytics to notify Sessions of crash events
Expand Down Expand Up @@ -55,4 +57,3 @@

# 1.0.0
* [feature] Initial Firebase sessions library.

4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ constraintlayout = "2.1.4"
coreKtx = "1.12.0"
coroutines = "1.9.0"
dagger = "2.51" # Don't bump above 2.51 as it causes a bug in AppDistro FeedbackSender JPEG code
datastore = "1.1.3"
datastore = "1.1.7"
dexmaker = "2.28.1"
dexmakerVersion = "1.2"
espressoCore = "3.6.1"
Expand Down Expand Up @@ -238,4 +238,4 @@ spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
protobuf = { id = "com.google.protobuf", version.ref = "protobufGradlePlugin" }
errorprone = { id = "net.ltgt.errorprone", version.ref = "gradleErrorpronePlugin" }
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices" }
crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsGradle" }
crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashlyticsGradle" }
Loading