From c3420daa8ad1c3133f4aacbc03abe0c9f6dd84cf Mon Sep 17 00:00:00 2001 From: Fabrizio Moscon Date: Sun, 12 Jan 2020 19:02:52 +0000 Subject: [PATCH] formatting --- .../RNTwilioVoice/TwilioVoiceModule.java | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java b/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java index f1171802..19e0e2de 100644 --- a/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java +++ b/android/src/main/java/com/hoxfon/react/RNTwilioVoice/TwilioVoiceModule.java @@ -252,6 +252,7 @@ public void onRinging(Call call) { } eventManager.sendEvent(EVENT_CALL_STATE_RINGING, params); } + @Override public void onConnected(Call call) { if (BuildConfig.DEBUG) { @@ -303,15 +304,14 @@ public void onConnected(Call call) { @Override public void onDisconnected(Call call, CallException error) { + if (BuildConfig.DEBUG) { + Log.d(TAG, "CALL DISCONNECTED callListener().onDisconnected call state = "+call.getState()); + } unsetAudioFocus(); proximityManager.stopProximitySensor(); headsetManager.stopWiredHeadsetEvent(getReactApplicationContext()); callAccepted = false; - if (BuildConfig.DEBUG) { - Log.d(TAG, "call disconnected"); - } - WritableMap params = Arguments.createMap(); String callSid = ""; if (call != null) { @@ -347,14 +347,15 @@ public void onStats(@NonNull List statsReports) { @Override public void onConnectFailure(Call call, CallException error) { + if (BuildConfig.DEBUG) { + Log.d(TAG, "CALL FAILURE callListener().onConnectFailure call state = "+call.getState()); + } unsetAudioFocus(); proximityManager.stopProximitySensor(); callAccepted = false; - if (BuildConfig.DEBUG) { - Log.d(TAG, "connect failure"); - } - Log.e(TAG, String.format("CallListener onDisconnected error: %d, %s", + + Log.e(TAG, String.format("CallListener onConnectFailure error: %d, %s", error.getErrorCode(), error.getMessage())); WritableMap params = Arguments.createMap(); @@ -733,9 +734,9 @@ public void disconnect() { } @ReactMethod - public void setMuted(Boolean muteValue) { + public void setMuted(Boolean value) { if (activeCall != null) { - activeCall.mute(muteValue); + activeCall.mute(value); } }