@onekeyfe/react-native-bundle-update 1.1.51 → 1.1.52
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/src/main/java/com/margelo/nitro/reactnativebundleupdate/ReactNativeBundleUpdate.kt
CHANGED
|
@@ -99,6 +99,7 @@ object BundleUpdateStoreAndroid {
|
|
|
99
99
|
private const val CURRENT_BUNDLE_VERSION_KEY = "currentBundleVersion"
|
|
100
100
|
private const val MAIN_JS_BUNDLE_FILE_NAME = "main.jsbundle.hbc"
|
|
101
101
|
private const val BACKGROUND_BUNDLE_FILE_NAME = "background.bundle"
|
|
102
|
+
private const val COMMON_BUNDLE_FILE_NAME = "common.bundle"
|
|
102
103
|
private const val METADATA_REQUIRES_BACKGROUND_BUNDLE_KEY = "requiresBackgroundBundle"
|
|
103
104
|
private const val METADATA_BACKGROUND_PROTOCOL_VERSION_KEY = "backgroundProtocolVersion"
|
|
104
105
|
private const val SUPPORTED_BACKGROUND_PROTOCOL_VERSION = "1"
|
|
@@ -807,6 +808,10 @@ object BundleUpdateStoreAndroid {
|
|
|
807
808
|
return getCurrentBundleEntryPath(context, BACKGROUND_BUNDLE_FILE_NAME)
|
|
808
809
|
}
|
|
809
810
|
|
|
811
|
+
fun getCurrentBundleCommonJSBundle(context: Context): String? {
|
|
812
|
+
return getCurrentBundleEntryPath(context, COMMON_BUNDLE_FILE_NAME)
|
|
813
|
+
}
|
|
814
|
+
|
|
810
815
|
fun getWebEmbedPath(context: Context): String {
|
|
811
816
|
val bundleInfo = getValidatedCurrentBundleInfo(context) ?: return ""
|
|
812
817
|
return File(bundleInfo.bundleDir, "web-embed").absolutePath
|