Integrating AutoUpdater's custom JS Bundle loading into Fb4a

Reviewed By: AaaChiuuu

Differential Revision: D3558831

fbshipit-source-id: b3909de774922fae903f3e8718fbfcd9b1ece2f8
This commit is contained in:
Yibin Chen
2016-07-18 16:24:54 -07:00
committed by Facebook Github Bot 1
parent e27c1495bd
commit 4ccd14f31a
3 changed files with 18 additions and 0 deletions

View File

@@ -127,6 +127,11 @@ public abstract class ReactInstanceManager {
*/
public abstract String getSourceUrl();
/**
* The JS Bundle file that this Instance Manager was constructed with.
*/
public abstract @Nullable String getJSBundleFile();
/**
* Attach given {@param rootView} to a catalyst instance manager and start JS application using
* JS module provided by {@link ReactRootView#getJSModuleName}. If the react context is currently

View File

@@ -629,6 +629,11 @@ import static com.facebook.react.bridge.ReactMarkerConstants.RUN_JS_BUNDLE_START
return Assertions.assertNotNull(mSourceUrl);
}
@Override
public @Nullable String getJSBundleFile() {
return mJSBundleFile;
}
/**
* Attach given {@param rootView} to a catalyst instance manager and start JS application using
* JS module provided by {@link ReactRootView#getJSModuleName}. If the react context is currently

View File

@@ -610,6 +610,14 @@ import static com.facebook.systrace.Systrace.TRACE_TAG_REACT_JAVA_BRIDGE;
return Assertions.assertNotNull(mSourceUrl);
}
@Override
public @Nullable String getJSBundleFile() {
if (mBundleLoader == null) {
return null;
}
return mBundleLoader.getSourceUrl();
}
/**
* Attach given {@param rootView} to a catalyst instance manager and start JS application using
* JS module provided by {@link ReactRootView#getJSModuleName}. If the react context is currently