Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

tech:2617: localstate from sharedpref to pref DataStore

Guillaume Jacquart requested to merge 2617-prefdatastore into main

Description

AdvancedPrivacy use sharedpreferences to store various settings of the apps, like which feature is activated, what is the fakelocation location, ...

Android provides the Preferences Datastore component to upgrade the SharedPreferences component and fix some bad sides. Main improvements are better thread handling, and better synchronization handling.

We also use SharedPreferences for trackers whitelist, and it is used in OrbotService, but these would not be the subject of this issue.

Issues

https://gitlab.e.foundation/e/os/backlog/-/issues/2617

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/mobile-team/guidelines/Code-review

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced support for AndroidX DataStore Preferences for improved key-value storage.
    • Added utility functions for managing preferences in DataStore.
    • Enhanced coroutine support for asynchronous operations in various components.
  • Bug Fixes

    • Improved performance and responsiveness through better asynchronous handling.
  • Documentation

    • Updated copyright notices to reflect the years 2022-2024.
  • Chores

    • Updated method signatures across multiple classes to support asynchronous operations.
Edited by CodeRabbitAI

Merge request reports

Loading