|
@@ -116,12 +116,15 @@ public class JitsiMeetActivityDelegate {
|
116
|
116
|
= ReactInstanceManagerHolder.getReactInstanceManager();
|
117
|
117
|
|
118
|
118
|
if (reactInstanceManager != null) {
|
119
|
|
- // Try to avoid a crash because some devices trip on this assert:
|
120
|
|
- // https://github.com/facebook/react-native/blob/df4e67fe75d781d1eb264128cadf079989542755/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java#L512
|
121
|
|
- // Why this happens is a mystery wrapped in an enigma.
|
122
|
|
- ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
123
|
|
- if (reactContext != null && activity == reactContext.getCurrentActivity()) {
|
|
119
|
+ try {
|
124
|
120
|
reactInstanceManager.onHostPause(activity);
|
|
121
|
+ } catch (AssertionError e) {
|
|
122
|
+ // There seems to be a problem in RN when resuming an Activity when
|
|
123
|
+ // rotation is involved and the planets align. There doesn't seem to
|
|
124
|
+ // be a proper solution, but since the activity is going away anyway,
|
|
125
|
+ // we'll YOLO-ignore the exception and hope fo the best.
|
|
126
|
+ // Ref: https://github.com/facebook/react-native/search?q=Pausing+an+activity+that+is+not+the+current+activity%2C+this+is+incorrect%21&type=issues
|
|
127
|
+ JitsiMeetLogger.e(e, "Error running onHostPause, ignoring");
|
125
|
128
|
}
|
126
|
129
|
}
|
127
|
130
|
}
|