private void handleDenyCall(Intent intent) { state = RedPhone.STATE_IDLE; incomingRinger.stop(); CallLogger.logMissedCall(this, remoteNumber, System.currentTimeMillis()); ((ResponderCallManager) this.currentCallManager).answer(false); this.terminate(); }
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(); }
public void notifyCallFresh() { Log.w("RedPhoneService", "Good call, time to ring and display call card..."); sendMessage(RedPhone.HANDLE_INCOMING_CALL, remoteNumber); lockManager.updatePhoneState(LockManager.PhoneState.INTERACTIVE); startCallCardActivity(); incomingRinger.start(); NotificationBarManager.setCallInProgress(this); }
private void handleAnswerCall(Intent intent) { state = RedPhone.STATE_ANSWERING; incomingRinger.stop(); currentCallRecord = CallLogger.logIncomingCall(this, remoteNumber); ((ResponderCallManager) this.currentCallManager).answer(true); }