-
Notifications
You must be signed in to change notification settings - Fork 4k
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
StrictMode getSharedPreferences failure on API 27 #1981
Comments
Need to gather more context on why strict mode is failing on this, then figure out possible fixes. |
AFAIK, the first time shared prefs are loaded, they are read from file system, so I/O access on UI Thread raises such |
Looks like this is still happening on Android 10, slightly different stacktrace:
Basically retrieving it works fine but then reading the values starts blocking and thrown. Grrr |
Fixed by #1995 |
Steps to Reproduce
Just start the app on an API 27 device
Updating the config triggers a check for whether heap dumping is enabled in the UI, which in turns triggers a shared preferences load which apparently triggers a strict mode failure. This is likely a stupid AOSP bug (SharedPref loading used to be fully async when loading and block if necessary of first getter call)
The text was updated successfully, but these errors were encountered: