Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziomoscon committed Jan 14, 2020
1 parent 3b63bbb commit c3420da
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -347,14 +347,15 @@ public void onStats(@NonNull List<StatsReport> 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();
Expand Down Expand Up @@ -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);
}
}

Expand Down

0 comments on commit c3420da

Please sign in to comment.