Skip to content

Commit 4853248

Browse files
authored
Merge pull request #3 from msgharpu/android_fix_2408
Fix Android Build Issues for RN64 Upgrade for patches through 2020-06-30
2 parents 8d4fcd0 + 2c49cec commit 4853248

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
--- "E:\\github\\rnm-63-fresh\\Libraries\\Components\\View\\ReactNativeViewViewConfigAndroid.js" 2020-10-27 20:26:16.000189500 -0700
2-
+++ "E:\\github\\rnm-63\\Libraries\\Components\\View\\ReactNativeViewViewConfigAndroid.js" 2020-10-13 21:21:38.700969000 -0700
3-
@@ -19,6 +19,12 @@
1+
diff --git a/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js b/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js
2+
index ad2542dfa..b6d868022 100644
3+
--- a/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js
4+
+++ b/Libraries/Components/View/ReactNativeViewViewConfigAndroid.js
5+
@@ -19,6 +19,12 @@ const ReactNativeViewViewConfigAndroid = {
46
captured: 'onSelectCapture',
57
},
68
},
79
+ topOnFocusChange: {
810
+ phasedRegistrationNames: {
9-
+ bubbled: 'onFocusChange',
10-
+ captured: 'onFocusChangeCapture',
11+
+ bubbled: 'onFocusChange',
12+
+ captured: 'onFocusChangeCapture',
1113
+ },
1214
+ },
13-
},
14-
directEventTypes: {
15-
topClick: {
15+
topAssetDidLoad: {
16+
phasedRegistrationNames: {
17+
bubbled: 'onAssetDidLoad',

android-patches/patches/OfficeRNHost/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
--- "E:\\github\\rnm-63-fresh\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\bridge\\CatalystInstanceImpl.java" 2020-10-27 20:26:16.742190400 -0700
2-
+++ "E:\\github\\rnm-63\\ReactAndroid\\src\\main\\java\\com\\facebook\\react\\bridge\\CatalystInstanceImpl.java" 2020-10-13 22:13:10.906813300 -0700
3-
@@ -121,7 +121,8 @@
1+
diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java
2+
index dae969346..4b60fd1a7 100644
3+
--- a/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java
4+
+++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/CatalystInstanceImpl.java
5+
@@ -121,7 +121,8 @@ public class CatalystInstanceImpl implements CatalystInstance {
46
final JavaScriptExecutor jsExecutor,
57
final NativeModuleRegistry nativeModuleRegistry,
68
final JSBundleLoader jsBundleLoader,
@@ -10,16 +12,14 @@
1012
FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge.");
1113
Systrace.beginSection(TRACE_TAG_REACT_JAVA_BRIDGE, "createCatalystInstanceImpl");
1214
13-
@@ -139,15 +140,23 @@
15+
@@ -139,15 +140,21 @@ public class CatalystInstanceImpl implements CatalystInstance {
1416
mTraceListener = new JSProfilerTraceListener(this);
1517
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
1618
1719
+ FLog.d(ReactConstants.TAG, "Create module registry");
18-
+
1920
+ createModuleRegistry(mNativeModulesQueueThread,
2021
+ mNativeModuleRegistry.getJavaModules(this),
2122
+ mNativeModuleRegistry.getCxxModules());
22-
+
2323
+ if (catalystInstanceEventListener != null) {
2424
+ FLog.d(ReactConstants.TAG, "Invoking callback onModuleRegistryCreated");
2525
+ catalystInstanceEventListener.onModuleRegistryCreated(this);
@@ -38,7 +38,7 @@
3838
FLog.d(ReactConstants.TAG, "Initializing React Xplat Bridge after initializeBridge");
3939
Systrace.endSection(TRACE_TAG_REACT_JAVA_BRIDGE);
4040

41-
@@ -208,13 +217,15 @@
41+
@@ -208,13 +215,15 @@ public class CatalystInstanceImpl implements CatalystInstance {
4242
private native void jniExtendNativeModules(
4343
Collection<JavaModuleWrapper> javaModules, Collection<ModuleHolder> cxxModules);
4444

@@ -58,41 +58,40 @@ private native void initializeBridge(
5858

5959
@Override
6060
public void setSourceURLs(String deviceURL, String remoteURL) {
61-
@@ -403,7 +414,8 @@
61+
@@ -398,7 +407,8 @@ public class CatalystInstanceImpl implements CatalystInstance {
6262
mJavaScriptContextHolder.clear();
6363

6464
mHybridData.resetNative();
6565
- getReactQueueConfiguration().destroy();
66-
+ // TODO :: Office patch :: Not sure why is this needed ?
66+
+ // TODO :: Office patch :: Not sure why is this needed ?
6767
+ // getReactQueueConfiguration().destroy();
6868
FLog.d(
6969
ReactConstants.TAG,
7070
"CatalystInstanceImpl.destroy() end");
71-
@@ -679,6 +691,8 @@
71+
@@ -568,6 +578,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
72+
}
7273

7374
private native long getJavaScriptContext();
74-
7575
+ public native long getPointerOfInstancePointer();
76-
+
76+
7777
private void incrementPendingJSCalls() {
7878
int oldPendingCalls = mPendingJSCalls.getAndIncrement();
79-
boolean wasIdle = oldPendingCalls == 0;
80-
@@ -784,6 +798,7 @@
79+
@@ -671,6 +682,7 @@ public class CatalystInstanceImpl implements CatalystInstance {
8180
private @Nullable NativeModuleRegistry mRegistry;
8281
private @Nullable JavaScriptExecutor mJSExecutor;
8382
private @Nullable NativeModuleCallExceptionHandler mNativeModuleCallExceptionHandler;
8483
+ private @Nullable CatalystInstanceEventListener mCatalystInstanceEventListener;
8584

8685
public Builder setReactQueueConfigurationSpec(
8786
ReactQueueConfigurationSpec ReactQueueConfigurationSpec) {
88-
@@ -811,13 +826,20 @@
87+
@@ -698,13 +710,20 @@ public class CatalystInstanceImpl implements CatalystInstance {
8988
return this;
9089
}
9190

9291
+ public Builder setCatalystInstanceEventListener(
9392
+ CatalystInstanceEventListener catalystInstanceEventListener) {
94-
+ mCatalystInstanceEventListener = catalystInstanceEventListener;
95-
+ return this;
93+
+ mCatalystInstanceEventListener = catalystInstanceEventListener;
94+
+ return this;
9695
+ }
9796
+
9897
public CatalystInstanceImpl build() {

0 commit comments

Comments
 (0)