private synchronized void terminate() { Log.w("RedPhoneService", "termination stack", new Exception()); lockManager.updatePhoneState(LockManager.PhoneState.PROCESSING); NotificationBarManager.setCallEnded(this); incomingRinger.stop(); outgoingRinger.stop(); if (currentCallRecord != null) { currentCallRecord.finishCall(); currentCallRecord = null; } if (currentCallManager != null) { currentCallManager.terminate(); currentCallManager = null; } shutdownAudio(); state = RedPhone.STATE_IDLE; lockManager.updatePhoneState(LockManager.PhoneState.IDLE); // XXX [email protected] -- Do we still need to stop the Service? // Log.d("RedPhoneService", "STOP SELF" ); // this.stopSelf(); }
private void handleBusyCall(Intent intent) { SessionDescriptor session = (SessionDescriptor) intent.getParcelableExtra(Constants.SESSION); if (currentCallManager != null && session.equals(currentCallManager.getSessionDescriptor())) { Log.w("RedPhoneService", "Duplicate incoming call signal, ignoring..."); return; } handleMissedCall(extractRemoteNumber(intent)); try { SignalingSocket signalingSocket = new SignalingSocket( this, session.getFullServerName(), Release.SERVER_PORT, localNumber, password, OtpCounterProvider.getInstance()); signalingSocket.setBusy(session.sessionId); signalingSocket.close(); } catch (SignalingException e) { Log.w("RedPhoneService", e); } }
public String getCurrentCallSAS() { if (currentCallManager != null) return currentCallManager.getSAS(); else return null; }
private void handleSetMute(Intent intent) { if (currentCallManager != null) { currentCallManager.setMute(intent.getBooleanExtra(Constants.MUTE_VALUE, false)); } }