android: fix exception when sending events without URL
ENTER_PIP_MODE, for example, does not have it.
This commit is contained in:
parent
08c4933c1b
commit
243fdba80f
|
@ -73,6 +73,7 @@ class ExternalAPIModule
|
||||||
BaseReactView view = BaseReactView.findViewByExternalAPIScope(scope);
|
BaseReactView view = BaseReactView.findViewByExternalAPIScope(scope);
|
||||||
|
|
||||||
if (view != null) {
|
if (view != null) {
|
||||||
|
Log.d(TAG, "Sending event: " + name + " with data: " + data);
|
||||||
try {
|
try {
|
||||||
view.onExternalAPIEvent(name, data);
|
view.onExternalAPIEvent(name, data);
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
|
|
@ -181,7 +181,7 @@ public class JitsiMeetView extends BaseReactView<JitsiMeetViewListener> {
|
||||||
* by/associated with the specified {@code eventName}.
|
* by/associated with the specified {@code eventName}.
|
||||||
*/
|
*/
|
||||||
private void maybeSetViewURL(String eventName, ReadableMap eventData) {
|
private void maybeSetViewURL(String eventName, ReadableMap eventData) {
|
||||||
String url = eventData.getString("url");
|
String url = eventData.hasKey("url") ? eventData.getString("url") : null;
|
||||||
|
|
||||||
switch(eventName) {
|
switch(eventName) {
|
||||||
case "CONFERENCE_WILL_JOIN":
|
case "CONFERENCE_WILL_JOIN":
|
||||||
|
|
Loading…
Reference in New Issue