public void pauseOrResumeCall(LinphoneCall call) { LinphoneCore lc = LinphoneManager.getLc(); if (call != null && LinphoneUtils.isCallRunning(call)) { if (call.isInConference()) { lc.removeFromConference(call); if (lc.getConferenceSize() <= 1) { lc.leaveConference(); } } else { lc.pauseCall(call); pause.setBackgroundResource(R.drawable.pause_on); } } else if (call != null) { if (call.getState() == State.Paused) { lc.resumeCall(call); pause.setBackgroundResource(R.drawable.pause_off); } } }
@Override public void onResume() { super.onResume(); LinphoneCore lc = RedfoxManager.getLcIfManagerNotDestroyedOrNull(); if (lc != null) { LinphoneCall call = lc.getCurrentCall(); if (isInCall && (call != null || lc.getConferenceSize() > 1 || lc.getCallsNb() > 0)) { // We are obviously connected if (lc.getDefaultProxyConfig() == null) { statusLed.setImageResource(R.drawable.led_disconnected); statusText.setText(getString(R.string.no_account)); } else { statusLed.setImageResource( getStatusIconResource(lc.getDefaultProxyConfig().getState(), true)); statusText.setText(getStatusIconText(lc.getDefaultProxyConfig().getState())); } } } else { statusText.setVisibility(View.VISIBLE); } }