public void separate() throws CallStateException { if (!disconnected) { owner.separate(this); } else { throw new CallStateException("disconnected"); } }
public void hangup() throws CallStateException { if (!disconnected) { owner.hangup(this); } else { throw new CallStateException("disconnected"); } }
/*package*/ public ConnectionBase( Context context, String dialString, CallTracker ct, Call parent, CallDetails moCallDetails) { createWakeLock(context); acquireWakeLock(); owner = ct; h = new MyHandler(owner.getLooper()); this.dialString = dialString; if ((moCallDetails != null) && (moCallDetails.call_domain == CallDetails.RIL_CALL_DOMAIN_PS)) this.address = dialString; else this.address = PhoneNumberUtils.extractNetworkPortionAlt(dialString); this.postDialString = PhoneNumberUtils.extractPostDialPortion(dialString); index = -1; isIncoming = false; cnapName = null; createTime = System.currentTimeMillis(); callDetails = moCallDetails; if (parent != null) { this.parent = parent; // for the cdma three way call case, do not change parent state // pass remote caller id in cdma 3 way call only if (parent.state == Call.State.ACTIVE) { cnapNamePresentation = Connection.PRESENTATION_ALLOWED; numberPresentation = Connection.PRESENTATION_ALLOWED; parent.attachFake(this, Call.State.ACTIVE); } else { // MO call for Gsm & Cdma, set state to dialing parent.attachFake(this, Call.State.DIALING); } } }
/*package*/ public ConnectionBase(Context context, DriverCall dc, CallTracker ct, int index) { createWakeLock(context); acquireWakeLock(); owner = ct; h = new MyHandler(owner.getLooper()); address = dc.number; isIncoming = dc.isMT; createTime = System.currentTimeMillis(); cnapName = dc.name; // TBD if present check cnapNamePresentation = dc.namePresentation; numberPresentation = dc.numberPresentation; if (dc.uusInfo != null) // only for Gsm uusInfo = dc.uusInfo; if (dc.callDetails != null) callDetails = dc.callDetails; if ((callDetails != null) && (callDetails.call_domain == CallDetails.RIL_CALL_DOMAIN_PS)) { parent = imsParentFromDCState(dc.state); // parent = call from ImsPhone } else { parent = parentFromDCState(dc.state); // parent = call from CdmaPhone } this.index = index; if (parent != null) parent.attach(this, dc); else { Log.e(LOG_TAG, "This ConnectionBase does not have a parent call"); } }
@Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("ImsPhoneCallTracker extends:"); super.dump(fd, pw, args); pw.println(" mVoiceCallEndedRegistrants=" + mVoiceCallEndedRegistrants); pw.println(" mVoiceCallStartedRegistrants=" + mVoiceCallStartedRegistrants); pw.println(" mRingingCall=" + mRingingCall); pw.println(" mForegroundCall=" + mForegroundCall); pw.println(" mBackgroundCall=" + mBackgroundCall); pw.println(" mHandoverCall=" + mHandoverCall); pw.println(" mPendingMO=" + mPendingMO); // pw.println(" mHangupPendingMO=" + mHangupPendingMO); pw.println(" mPhone=" + mPhone); pw.println(" mDesiredMute=" + mDesiredMute); pw.println(" mState=" + mState); }
/** This is a Call waiting call for cdma */ public ConnectionBase( Context context, CdmaCallWaitingNotification cw, CallTracker ct, Call parent) { createWakeLock(context); acquireWakeLock(); owner = ct; h = new MyHandler(owner.getLooper()); address = cw.number; numberPresentation = cw.numberPresentation; cnapName = cw.name; cnapNamePresentation = cw.namePresentation; index = -1; isIncoming = true; createTime = System.currentTimeMillis(); connectTime = 0; this.parent = parent; parent.attachFake(this, Call.State.WAITING); }
@Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("GsmCallTracker extends:"); super.dump(fd, pw, args); pw.println("connections: length=" + connections.length); for (int i = 0; i < connections.length; i++) { pw.printf(" connections[%d]=%s\n", i, connections[i]); } pw.println(" voiceCallEndedRegistrants=" + voiceCallEndedRegistrants); pw.println(" voiceCallStartedRegistrants=" + voiceCallStartedRegistrants); pw.println(" droppedDuringPoll: size=" + droppedDuringPoll.size()); for (int i = 0; i < droppedDuringPoll.size(); i++) { pw.printf(" droppedDuringPoll[%d]=%s\n", i, droppedDuringPoll.get(i)); } pw.println(" ringingCall=" + ringingCall); pw.println(" foregroundCall=" + foregroundCall); pw.println(" backgroundCall=" + backgroundCall); pw.println(" pendingMO=" + pendingMO); pw.println(" hangupPendingMO=" + hangupPendingMO); pw.println(" phone=" + phone); pw.println(" desiredMute=" + desiredMute); pw.println(" state=" + state); }