@@ -142,6 +142,8 @@ public void registerPhoneAccount() {
142142 return ;
143143 }
144144
145+ Log .d (TAG , "registerPhoneAccount" );
146+
145147 this .registerPhoneAccount (this .getAppContext ());
146148 }
147149
@@ -162,7 +164,7 @@ public void displayIncomingCall(String uuid, String number, String callerName) {
162164 return ;
163165 }
164166
165- Log .d (TAG , "displayIncomingCall number: " + number + ", callerName: " + callerName );
167+ Log .d (TAG , "displayIncomingCall, uuid: " + uuid + ", number: " + number + ", callerName: " + callerName );
166168
167169 Bundle extras = new Bundle ();
168170 Uri uri = Uri .fromParts (PhoneAccount .SCHEME_TEL , number , null );
@@ -176,6 +178,7 @@ public void displayIncomingCall(String uuid, String number, String callerName) {
176178
177179 @ ReactMethod
178180 public void answerIncomingCall (String uuid ) {
181+ Log .d (TAG , "answerIncomingCall, uuid: " + uuid );
179182 if (!isConnectionServiceAvailable () || !hasPhoneAccount ()) {
180183 return ;
181184 }
@@ -190,12 +193,12 @@ public void answerIncomingCall(String uuid) {
190193
191194 @ ReactMethod
192195 public void startCall (String uuid , String number , String callerName ) {
196+ Log .d (TAG , "startCall called, uuid: " + uuid + ", number: " + number + ", callerName: " + callerName );
197+
193198 if (!isConnectionServiceAvailable () || !hasPhoneAccount () || !hasPermissions () || number == null ) {
194199 return ;
195200 }
196201
197- Log .d (TAG , "startCall number: " + number + ", callerName: " + callerName );
198-
199202 Bundle extras = new Bundle ();
200203 Uri uri = Uri .fromParts (PhoneAccount .SCHEME_TEL , number , null );
201204
@@ -207,12 +210,14 @@ public void startCall(String uuid, String number, String callerName) {
207210 extras .putParcelable (TelecomManager .EXTRA_PHONE_ACCOUNT_HANDLE , handle );
208211 extras .putParcelable (TelecomManager .EXTRA_OUTGOING_CALL_EXTRAS , callExtras );
209212
213+ Log .d (TAG , "startCall, uuid: " + uuid );
214+
210215 telecomManager .placeCall (uri , extras );
211216 }
212217
213218 @ ReactMethod
214219 public void endCall (String uuid ) {
215- Log .d (TAG , "endCall called" );
220+ Log .d (TAG , "endCall called, uuid: " + uuid );
216221 if (!isConnectionServiceAvailable () || !hasPhoneAccount ()) {
217222 return ;
218223 }
@@ -223,7 +228,7 @@ public void endCall(String uuid) {
223228 }
224229 conn .onDisconnect ();
225230
226- Log .d (TAG , "endCall executed" );
231+ Log .d (TAG , "endCall executed, uuid: " + uuid );
227232 }
228233
229234 @ ReactMethod
@@ -362,6 +367,8 @@ public void checkDefaultPhoneAccount(Promise promise) {
362367
363368 @ ReactMethod
364369 public void setOnHold (String uuid , boolean shouldHold ) {
370+ Log .d (TAG , "setOnHold, uuid: " + uuid + ", shouldHold: " + (shouldHold ? "true" : "false" ));
371+
365372 Connection conn = VoiceConnectionService .getConnection (uuid );
366373 if (conn == null ) {
367374 return ;
@@ -376,6 +383,7 @@ public void setOnHold(String uuid, boolean shouldHold) {
376383
377384 @ ReactMethod
378385 public void reportEndCallWithUUID (String uuid , int reason ) {
386+ Log .d (TAG , "reportEndCallWithUUID, uuid: " + uuid + ", reason: " + reason );
379387 if (!isConnectionServiceAvailable () || !hasPhoneAccount ()) {
380388 return ;
381389 }
@@ -389,6 +397,7 @@ public void reportEndCallWithUUID(String uuid, int reason) {
389397
390398 @ ReactMethod
391399 public void rejectCall (String uuid ) {
400+ Log .d (TAG , "rejectCall, uuid: " + uuid );
392401 if (!isConnectionServiceAvailable () || !hasPhoneAccount ()) {
393402 return ;
394403 }
@@ -403,6 +412,7 @@ public void rejectCall(String uuid) {
403412
404413 @ ReactMethod
405414 public void setMutedCall (String uuid , boolean shouldMute ) {
415+ Log .d (TAG , "setMutedCall, uuid: " + uuid + ", shouldMute: " + (shouldMute ? "true" : "false" ));
406416 Connection conn = VoiceConnectionService .getConnection (uuid );
407417 if (conn == null ) {
408418 return ;
@@ -422,6 +432,7 @@ public void setMutedCall(String uuid, boolean shouldMute) {
422432
423433 @ ReactMethod
424434 public void sendDTMF (String uuid , String key ) {
435+ Log .d (TAG , "sendDTMF, uuid: " + uuid + ", key: " + key );
425436 Connection conn = VoiceConnectionService .getConnection (uuid );
426437 if (conn == null ) {
427438 return ;
@@ -432,6 +443,7 @@ public void sendDTMF(String uuid, String key) {
432443
433444 @ ReactMethod
434445 public void updateDisplay (String uuid , String displayName , String uri ) {
446+ Log .d (TAG , "updateDisplay, uuid: " + uuid + ", displayName: " + displayName + ", uri: " + uri );
435447 Connection conn = VoiceConnectionService .getConnection (uuid );
436448 if (conn == null ) {
437449 return ;
@@ -482,6 +494,7 @@ public void setReachable() {
482494
483495 @ ReactMethod
484496 public void setCurrentCallActive (String uuid ) {
497+ Log .d (TAG , "setCurrentCallActive, uuid: " + uuid );
485498 Connection conn = VoiceConnectionService .getConnection (uuid );
486499 if (conn == null ) {
487500 return ;
0 commit comments