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