@metarouter/react-native-sdk 0.1.14 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/build/generated/ksp/debug/java/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl.java +244 -0
- package/android/build/generated/ksp/debug/java/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl.java +165 -0
- package/android/build/generated/source/buildConfig/debug/com/metarouter/reactnativesdk/BuildConfig.java +10 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +7 -0
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +18 -0
- package/android/build/intermediates/aar_metadata/debug/writeDebugAarMetadata/aar-metadata.properties +6 -0
- package/android/build/intermediates/annotation_processor_list/debug/javaPreCompileDebug/annotationProcessors.json +1 -0
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/compile_symbol_list/debug/generateDebugRFile/R.txt +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +1 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/merger.xml +2 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/metarouter/reactnativesdk/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/metarouter/reactnativesdk/MetaRouterReactNativeSDKPackage.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncLocalStorageUtil.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageErrorUtil.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageExpoMigration.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$5.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule$6.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStorageModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStoragePackage$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/AsyncStoragePackage.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/BuildConfig.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/NativeAsyncStorageModuleSpec.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/ReactDatabaseSupplier.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/SerialExecutor$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/SerialExecutor.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$2.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$3.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$4.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$5.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$6.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl$7.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDao_Impl.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl$1.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/reactnativecommunity/asyncstorage/next/StorageDb_Impl.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/linusu/RNGetRandomValuesModule.class +0 -0
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/org/linusu/RNGetRandomValuesPackage.class +0 -0
- package/android/build/intermediates/local_only_symbol_list/debug/parseDebugLocalResources/R-def.txt +2 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +7 -0
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +7 -0
- package/android/build/intermediates/navigation_json/debug/extractDeepLinksDebug/navigation.json +1 -0
- package/android/build/intermediates/nested_resources_validation_report/debug/generateDebugResources/nestedResourcesValidationReport.txt +1 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/java-sources-proto-map.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/counters.tab +2 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +16 -0
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/META-INF/metarouter_react-native-sdk_debug.kotlin_module +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ArgumentHelpersKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageAccess.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageError$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/AsyncStorageError.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/Entry.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ErrorHelpersKt$createExceptionHandler$$inlined$CoroutineExceptionHandler$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/ErrorHelpersKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/MIGRATION_TO_NEXT.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao$DefaultImpls.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao$mergeValues$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDao.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDb$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageDb.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$clear$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$getAllKeys$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiGet$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiMerge$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiRemove$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule$multiSet$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplier$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplier.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/reactnativecommunity/asyncstorage/next/StorageSupplierKt.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule$onInitialized$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule$toHexString$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativeModule.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativePackage$createNativeModules$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/AnalyticsReactNativePackage.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/ConnectionType.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran$Action.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran$createNativeModules$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/Sovran.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule$Companion.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule$onInitialized$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule.class +0 -0
- package/android/build.gradle +30 -35
- package/android/src/main/java/com/metarouter/reactnativesdk/{MetaRouterReactNativeSdkPackage.java → MetaRouterReactNativeSDKPackage.java} +1 -1
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncLocalStorageUtil.java +178 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageErrorUtil.java +45 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageExpoMigration.java +154 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncStorageModule.java +410 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/BuildConfig.java +8 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/NativeAsyncStorageModuleSpec.java +47 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/ReactDatabaseSupplier.java +163 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/SerialExecutor.java +40 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/build.gradle +122 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/config.gradle +125 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/ArgumentHelpers.kt +86 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/ErrorHelpers.kt +39 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/StorageModule.kt +94 -0
- package/android/src/main/java/com/reactnativecommunity/asyncstorage/next/StorageSupplier.kt +161 -0
- package/package.json +1 -1
- package/react-native.config.js +29 -8
- /package/android/src/main/java/com/{reactnativesovran → sovranreactnative}/Sovran.kt +0 -0
- /package/android/src/main/java/com/{reactnativesovran → sovranreactnative}/SovranModule.kt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/constants.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/package-parts.tab_i
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab_i.len
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i
ADDED
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/file-to-id.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab.len
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/id-to-file.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i.len
ADDED
|
Binary file
|
|
Binary file
|
package/android/build/kotlin/compileDebugKotlin/classpath-snapshot/shrunk-classpath-snapshot.bin
ADDED
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
-- Merging decision tree log ---
|
|
2
|
+
manifest
|
|
3
|
+
ADDED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml:2:13-83
|
|
4
|
+
INJECTED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml:2:13-83
|
|
5
|
+
package
|
|
6
|
+
INJECTED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml
|
|
7
|
+
xmlns:android
|
|
8
|
+
ADDED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml:2:23-81
|
|
9
|
+
uses-sdk
|
|
10
|
+
INJECTED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml reason: use-sdk injection requested
|
|
11
|
+
INJECTED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml
|
|
12
|
+
INJECTED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml
|
|
13
|
+
android:targetSdkVersion
|
|
14
|
+
INJECTED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml
|
|
15
|
+
android:minSdkVersion
|
|
16
|
+
INJECTED from /Users/choudlette/development/metarouter/ion/packages/demo-mobile/react-native/node_modules/@metarouter/react-native-sdk/android/build/intermediates/tmp/ProcessLibraryManifest/debug/tempAndroidManifest16060778903747402948.xml
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/com/segmentanalyticsreactnative/ConnectionType.class
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build/tmp/kotlin-classes/debug/com/sovranreactnative/SovranModule$Companion.class
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/android/build.gradle
CHANGED
|
@@ -1,39 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
buildscript {
|
|
2
|
+
repositories {
|
|
3
|
+
google()
|
|
4
|
+
mavenCentral()
|
|
5
|
+
gradlePluginPortal()
|
|
6
|
+
}
|
|
7
|
+
dependencies {
|
|
8
|
+
classpath "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin:1.9.25-1.0.20"
|
|
9
|
+
}
|
|
7
10
|
}
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
roomVersion: "2.5.0"
|
|
13
|
-
]
|
|
14
|
-
|
|
15
|
-
// Define coroutines version for AsyncStorage
|
|
16
|
-
ext.AsyncStorageLibs = [
|
|
17
|
-
coroutines: "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
|
|
18
|
-
]
|
|
12
|
+
apply plugin: 'com.android.library'
|
|
13
|
+
apply plugin: 'kotlin-android'
|
|
14
|
+
apply plugin: 'com.google.devtools.ksp'
|
|
19
15
|
|
|
20
16
|
android {
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
namespace 'com.metarouter.reactnativesdk'
|
|
18
|
+
compileSdkVersion 33
|
|
19
|
+
|
|
23
20
|
defaultConfig {
|
|
24
|
-
minSdkVersion
|
|
25
|
-
targetSdkVersion
|
|
21
|
+
minSdkVersion 21
|
|
22
|
+
targetSdkVersion 33
|
|
26
23
|
versionCode 1
|
|
27
24
|
versionName "0.1.0"
|
|
28
25
|
}
|
|
29
|
-
|
|
26
|
+
|
|
30
27
|
compileOptions {
|
|
31
28
|
sourceCompatibility JavaVersion.VERSION_1_8
|
|
32
29
|
targetCompatibility JavaVersion.VERSION_1_8
|
|
33
30
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
|
|
32
|
+
kotlin {
|
|
33
|
+
jvmToolchain(17)
|
|
37
34
|
}
|
|
38
35
|
}
|
|
39
36
|
|
|
@@ -45,16 +42,14 @@ repositories {
|
|
|
45
42
|
|
|
46
43
|
dependencies {
|
|
47
44
|
implementation 'com.facebook.react:react-native:+'
|
|
48
|
-
|
|
49
|
-
// Kotlin support
|
|
50
45
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
|
|
51
|
-
|
|
52
|
-
// AsyncStorage
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
|
|
47
|
+
// AsyncStorage + Room support
|
|
48
|
+
def roomVersion = "2.5.0"
|
|
49
|
+
def coroutinesVersion = "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
|
|
50
|
+
|
|
51
|
+
implementation "androidx.room:room-runtime:$roomVersion"
|
|
52
|
+
implementation "androidx.room:room-ktx:$roomVersion"
|
|
53
|
+
ksp "androidx.room:room-compiler:$roomVersion"
|
|
54
|
+
implementation coroutinesVersion
|
|
60
55
|
}
|
|
@@ -12,7 +12,7 @@ import java.util.List;
|
|
|
12
12
|
// Import the bundled packages
|
|
13
13
|
import com.reactnativecommunity.asyncstorage.AsyncStoragePackage;
|
|
14
14
|
import com.segmentanalyticsreactnative.AnalyticsReactNativePackage;
|
|
15
|
-
import com.
|
|
15
|
+
import com.sovranreactnative.Sovran;
|
|
16
16
|
import org.linusu.RNGetRandomValuesPackage;
|
|
17
17
|
|
|
18
18
|
public class MetaRouterReactNativeSDKPackage implements ReactPackage {
|
package/android/src/main/java/com/reactnativecommunity/asyncstorage/AsyncLocalStorageUtil.java
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
package com.reactnativecommunity.asyncstorage;
|
|
9
|
+
|
|
10
|
+
import javax.annotation.Nullable;
|
|
11
|
+
import java.io.File;
|
|
12
|
+
import java.util.Arrays;
|
|
13
|
+
import java.util.Iterator;
|
|
14
|
+
import android.content.ContentValues;
|
|
15
|
+
import android.content.Context;
|
|
16
|
+
import android.database.Cursor;
|
|
17
|
+
import android.database.sqlite.SQLiteDatabase;
|
|
18
|
+
import android.os.Build;
|
|
19
|
+
import android.text.TextUtils;
|
|
20
|
+
import android.util.Log;
|
|
21
|
+
import com.facebook.react.bridge.ReadableArray;
|
|
22
|
+
import org.json.JSONException;
|
|
23
|
+
import org.json.JSONObject;
|
|
24
|
+
import static com.reactnativecommunity.asyncstorage.ReactDatabaseSupplier.KEY_COLUMN;
|
|
25
|
+
import static com.reactnativecommunity.asyncstorage.ReactDatabaseSupplier.TABLE_CATALYST;
|
|
26
|
+
import static com.reactnativecommunity.asyncstorage.ReactDatabaseSupplier.VALUE_COLUMN;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Helper for database operations.
|
|
30
|
+
*/
|
|
31
|
+
public class AsyncLocalStorageUtil {
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Build the String required for an SQL select statement:
|
|
35
|
+
* WHERE key IN (?, ?, ..., ?)
|
|
36
|
+
* without 'WHERE' and with selectionCount '?'
|
|
37
|
+
*/
|
|
38
|
+
/* package */ static String buildKeySelection(int selectionCount) {
|
|
39
|
+
String[] list = new String[selectionCount];
|
|
40
|
+
Arrays.fill(list, "?");
|
|
41
|
+
return KEY_COLUMN + " IN (" + TextUtils.join(", ", list) + ")";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Build the String[] arguments needed for an SQL selection, i.e.:
|
|
46
|
+
* {a, b, c}
|
|
47
|
+
* to be used in the SQL select statement: WHERE key in (?, ?, ?)
|
|
48
|
+
*/
|
|
49
|
+
/* package */ static String[] buildKeySelectionArgs(ReadableArray keys, int start, int count) {
|
|
50
|
+
String[] selectionArgs = new String[count];
|
|
51
|
+
for (int keyIndex = 0; keyIndex < count; keyIndex++) {
|
|
52
|
+
selectionArgs[keyIndex] = keys.getString(start + keyIndex);
|
|
53
|
+
}
|
|
54
|
+
return selectionArgs;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Returns the value of the given key, or null if not found.
|
|
59
|
+
*/
|
|
60
|
+
public static @Nullable String getItemImpl(SQLiteDatabase db, String key) {
|
|
61
|
+
String[] columns = {VALUE_COLUMN};
|
|
62
|
+
String[] selectionArgs = {key};
|
|
63
|
+
|
|
64
|
+
Cursor cursor = db.query(
|
|
65
|
+
TABLE_CATALYST,
|
|
66
|
+
columns,
|
|
67
|
+
KEY_COLUMN + "=?",
|
|
68
|
+
selectionArgs,
|
|
69
|
+
null,
|
|
70
|
+
null,
|
|
71
|
+
null);
|
|
72
|
+
|
|
73
|
+
try {
|
|
74
|
+
if (!cursor.moveToFirst()) {
|
|
75
|
+
return null;
|
|
76
|
+
} else {
|
|
77
|
+
return cursor.getString(0);
|
|
78
|
+
}
|
|
79
|
+
} finally {
|
|
80
|
+
cursor.close();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Sets the value for the key given, returns true if successful, false otherwise.
|
|
86
|
+
*/
|
|
87
|
+
/* package */ static boolean setItemImpl(SQLiteDatabase db, String key, String value) {
|
|
88
|
+
ContentValues contentValues = new ContentValues();
|
|
89
|
+
contentValues.put(KEY_COLUMN, key);
|
|
90
|
+
contentValues.put(VALUE_COLUMN, value);
|
|
91
|
+
|
|
92
|
+
long inserted = db.insertWithOnConflict(
|
|
93
|
+
TABLE_CATALYST,
|
|
94
|
+
null,
|
|
95
|
+
contentValues,
|
|
96
|
+
SQLiteDatabase.CONFLICT_REPLACE);
|
|
97
|
+
|
|
98
|
+
return (-1 != inserted);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Does the actual merge of the (key, value) pair with the value stored in the database.
|
|
103
|
+
* NB: This assumes that a database lock is already in effect!
|
|
104
|
+
* @return the errorCode of the operation
|
|
105
|
+
*/
|
|
106
|
+
/* package */ static boolean mergeImpl(SQLiteDatabase db, String key, String value)
|
|
107
|
+
throws JSONException {
|
|
108
|
+
String oldValue = getItemImpl(db, key);
|
|
109
|
+
String newValue;
|
|
110
|
+
|
|
111
|
+
if (oldValue == null) {
|
|
112
|
+
newValue = value;
|
|
113
|
+
} else {
|
|
114
|
+
JSONObject oldJSON = new JSONObject(oldValue);
|
|
115
|
+
JSONObject newJSON = new JSONObject(value);
|
|
116
|
+
deepMergeInto(oldJSON, newJSON);
|
|
117
|
+
newValue = oldJSON.toString();
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return setItemImpl(db, key, newValue);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Merges two {@link JSONObject}s. The newJSON object will be merged with the oldJSON object by
|
|
125
|
+
* either overriding its values, or merging them (if the values of the same key in both objects
|
|
126
|
+
* are of type {@link JSONObject}). oldJSON will contain the result of this merge.
|
|
127
|
+
*/
|
|
128
|
+
private static void deepMergeInto(JSONObject oldJSON, JSONObject newJSON)
|
|
129
|
+
throws JSONException {
|
|
130
|
+
Iterator<?> keys = newJSON.keys();
|
|
131
|
+
while (keys.hasNext()) {
|
|
132
|
+
String key = (String) keys.next();
|
|
133
|
+
|
|
134
|
+
JSONObject newJSONObject = newJSON.optJSONObject(key);
|
|
135
|
+
JSONObject oldJSONObject = oldJSON.optJSONObject(key);
|
|
136
|
+
if (newJSONObject != null && oldJSONObject != null) {
|
|
137
|
+
deepMergeInto(oldJSONObject, newJSONObject);
|
|
138
|
+
oldJSON.put(key, oldJSONObject);
|
|
139
|
+
} else {
|
|
140
|
+
oldJSON.put(key, newJSON.get(key));
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* From Pie and up, Android started to use Write-ahead logging (WAL), instead of journal rollback
|
|
146
|
+
* for atomic commits and rollbacks.
|
|
147
|
+
* Basically, WAL does not write directly to the database file, rather to the supporting WAL file.
|
|
148
|
+
* Because of that, migration to the next storage might not be successful, because the content of
|
|
149
|
+
* RKStorage might be still in WAL file instead. Committing all data from WAL to db file is called
|
|
150
|
+
* a "checkpoint" and is done automatically (by default) when the WAL file reaches a threshold
|
|
151
|
+
* size of 1000 pages.
|
|
152
|
+
* More here: https://sqlite.org/wal.html
|
|
153
|
+
*
|
|
154
|
+
* This helper will force checkpoint on RKStorage, if Next storage file does not exists yet.
|
|
155
|
+
*/
|
|
156
|
+
public static void verifyAndForceSqliteCheckpoint(Context ctx) {
|
|
157
|
+
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
|
|
158
|
+
Log.i("AsyncStorage_Next", "SQLite checkpoint not required on this API version.");
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
File nextStorageFile = ctx.getDatabasePath("AsyncStorage");
|
|
162
|
+
File currentStorageFile = ctx.getDatabasePath(ReactDatabaseSupplier.DATABASE_NAME);
|
|
163
|
+
boolean isCheckpointRequired = !nextStorageFile.exists() && currentStorageFile.exists();
|
|
164
|
+
if (!isCheckpointRequired) {
|
|
165
|
+
Log.i("AsyncStorage_Next", "SQLite checkpoint not required.");
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
try {
|
|
170
|
+
ReactDatabaseSupplier supplier = ReactDatabaseSupplier.getInstance(ctx);
|
|
171
|
+
supplier.get().rawQuery("PRAGMA wal_checkpoint", null).close();
|
|
172
|
+
supplier.closeDatabase();
|
|
173
|
+
Log.i("AsyncStorage_Next", "Forcing SQLite checkpoint successful.");
|
|
174
|
+
} catch (Exception e) {
|
|
175
|
+
Log.w("AsyncStorage_Next", "Could not force checkpoint on RKStorage, the Next storage might not migrate the data properly: " + e.getMessage());
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|