-
Notifications
You must be signed in to change notification settings - Fork 626
Migrate common from SharedPreferences to DataStore #6801
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
Conversation
Javadoc Changes:
|
Coverage Report 1Affected Products
Test Logs |
Test Results 50 files - 1 008 50 suites - 1 008 1m 11s ⏱️ - 34m 41s Results for commit e6f66fd. ± Comparison against base commit f08e0c7. This pull request removes 5909 tests.
♻️ This comment has been updated with latest results. |
Size Report 1Affected Products
Test Logs |
Startup Time Report 1Note: Layout is sometimes suboptimal due to limited formatting support on GitHub. Please check this report on GCS. Notes
Startup Times
|
Firebase AI Mock Responses Check
|
Per b/423592727,
This adds a
DataStore
class that wraps aroundandroidx.datastore.core.DataStore
, and provides more Java friendly methods for creation and interop. This should make migrations fromSharedPreferences
in existing Java code much easier.Note that usages of
SharedPreferences
in Kotlin should just useandroidx.datastore.core.DataStore
directly instead, as they have no need for the interop features. Furthermore, it would make it easier in the future to remove ourDataStore
wrapper once more SDKs have been migrated to Kotlin.This wrapper class comes with full documentation detailing how it should be used, and quirks to keep in mind.
Since
firebase-common
has been migrated to use this wrapper, and common has tests with theirSharedPreferences
usages, our wrapper already has implicit testing.This PR also fixes the following: