Skip to content
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

Android SecureStorage: Stop caching shared preferences instance to fix RemoveAll #20445

Merged
merged 1 commit into from
Feb 9, 2024

Commits on Feb 8, 2024

  1. Stop caching preferences instance

    It appears that reusing the shared preferences instance sometimes causes changes to not be properly committed to disk as the instance is not disposed in some cases before the app is torn down (eg: force close).
    
    Caching isn't really necessary here anyways as the underlying android preference manager does its own layer of caching (so we are just paying the interop tax to get a 'new' instance here).
    
    The simplest fix is to stop caching which is the real content of this change.  We don't cache in the regular preferences API where we use shared preferences and the issue does not seem to exist there.
    Redth committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    4a2695c View commit details
    Browse the repository at this point in the history