From 2ba0c6c43d4a344c6befcc12981674531e2ca6d1 Mon Sep 17 00:00:00 2001 From: Emmanuel Quentin Date: Thu, 28 Apr 2022 08:37:39 -0400 Subject: [PATCH] Add missing hasVideo attribute --- android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java | 2 +- .../src/main/java/io/wazo/callkeep/VoiceConnectionService.java | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java b/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java index 8092c511..2a2524e2 100644 --- a/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java +++ b/android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java @@ -179,7 +179,6 @@ public ReactApplicationContext getContext() { public void reportNewIncomingCall(String uuid, String number, String callerName, boolean hasVideo, String payload) { Log.d(TAG, "[RNCallKeepModule] reportNewIncomingCall, uuid: " + uuid + ", number: " + number + ", callerName: " + callerName); - // @TODO: handle video this.displayIncomingCall(uuid, number, callerName, hasVideo); @@ -188,6 +187,7 @@ public void reportNewIncomingCall(String uuid, String number, String callerName, args.putString("handle", number); args.putString("callUUID", uuid); args.putString("name", callerName); + args.putString("hasVideo", hasVideo); if (payload != null) { args.putString("payload", payload); } diff --git a/android/src/main/java/io/wazo/callkeep/VoiceConnectionService.java b/android/src/main/java/io/wazo/callkeep/VoiceConnectionService.java index 29d288a1..47200be5 100644 --- a/android/src/main/java/io/wazo/callkeep/VoiceConnectionService.java +++ b/android/src/main/java/io/wazo/callkeep/VoiceConnectionService.java @@ -389,6 +389,9 @@ private Boolean canMakeOutgoingCall() { private Connection createConnection(ConnectionRequest request) { Bundle extras = request.getExtras(); + if (request.getAddress() == null) { + return null; + } HashMap extrasMap = this.bundleToMap(extras); String callerNumber = request.getAddress().toString();