flutter_secure_storage
flutter_secure_storage copied to clipboard
StrictMode disk read violation
Congratulations for the new release!
I am still using version 4.2.1 and if I enable StrictMode I see the following logs.
D/StrictMode: StrictMode policy violation; ~duration=1659 ms: android.os.strictmode.DiskReadViolation
at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1596)
at android.app.SharedPreferencesImpl.awaitLoadedLocked(SharedPreferencesImpl.java:275)
at android.app.SharedPreferencesImpl.getString(SharedPreferencesImpl.java:301)
at com.it_nomads.fluttersecurestorage.ciphers.StorageCipher18Implementation.moveSecretFromPreferencesIfNeeded(StorageCipher18Implementation.java:96)
at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.initInstance(FlutterSecureStoragePlugin.java:61)
at com.it_nomads.fluttersecurestorage.FlutterSecureStoragePlugin.onAttachedToEngine(FlutterSecureStoragePlugin.java:82)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.add(FlutterEngineConnectionRegistry.java:143)
at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:64)
at java.lang.reflect.Method.invoke(Native Method)
at io.flutter.embedding.engine.plugins.util.GeneratedPluginRegister.registerGeneratedPlugins(GeneratedPluginRegister.java:80)
Would it be possible to move the call to moveSecretFromPreferencesIfNeeded
to a thread different from Main?