[Android] Fix VerifyError on Android 4

The class ReflectiveOperationException used in ExternalAPIModule was
introduced in API level 19.
This commit is contained in:
Lyubo Marinov 2017-09-13 10:47:19 -05:00
parent fe8f383a41
commit f86f21beb2
1 changed files with 3 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import com.facebook.react.bridge.ReadableMapKeySetIterator;
import org.jitsi.meet.sdk.JitsiMeetView; import org.jitsi.meet.sdk.JitsiMeetView;
import org.jitsi.meet.sdk.JitsiMeetViewListener; import org.jitsi.meet.sdk.JitsiMeetViewListener;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.util.HashMap; import java.util.HashMap;
@ -145,8 +146,8 @@ class ExternalAPIModule extends ReactContextBaseJavaModule {
if (method != null) { if (method != null) {
try { try {
method.invoke(listener, toHashMap(data)); method.invoke(listener, toHashMap(data));
} catch (ReflectiveOperationException roe) { } catch (IllegalAccessException | InvocationTargetException e) {
throw new RuntimeException(roe); throw new RuntimeException(e);
} }
} }
} }