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(); }
@Override public void onDestroy() { super.onDestroy(); unregisterReceiver(pstnCallListener); NotificationBarManager.setCallEnded(this); uncaughtExceptionHandlerManager.unregister(); }