public class GsmCdmaConnection extends Connection
Connection.Capability, Connection.Listener, Connection.ListenerBase, Connection.PostDialListener, Connection.PostDialState
AUDIO_QUALITY_HIGH_DEFINITION, AUDIO_QUALITY_STANDARD, mAddress, mCause, mCnapName, mCnapNamePresentation, mConnectTime, mConnectTimeReal, mConvertedNumber, mCreateTime, mDialString, mDuration, mHoldingStartTime, mIsIncoming, mListeners, mNextPostDialChar, mNumberConverted, mNumberPresentation, mPostDialState, mPostDialString, mPreHandoverState
Constructor and Description |
---|
GsmCdmaConnection(Context context,
CdmaCallWaitingNotification cw,
GsmCdmaCallTracker ct,
GsmCdmaCall parent)
This is a Call waiting call
|
GsmCdmaConnection(GsmCdmaPhone phone,
DriverCall dc,
GsmCdmaCallTracker ct,
int index)
This is probably an MT call that we first saw in a CLCC response or a hand over.
|
GsmCdmaConnection(GsmCdmaPhone phone,
String dialString,
GsmCdmaCallTracker ct,
GsmCdmaCall parent,
boolean isEmergencyCall)
This is an MO call, created when dialing
|
Modifier and Type | Method and Description |
---|---|
void |
cancelPostDial()
Cancel any post
|
void |
dispose() |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
static String |
formatDialString(String phoneNumber)
format original dial string
1) convert international dialing prefix "+" to
string specified per region
2) handle corner cases for PAUSE/WAIT dialing:
If PAUSE/WAIT sequence at the end, ignore them.
|
GsmCdmaCall |
getCall() |
long |
getDisconnectTime()
Disconnect time in currentTimeMillis() format.
|
long |
getHoldDurationMillis()
If this connection is HOLDING, return the number of milliseconds
that it has been on hold for (approximately).
|
int |
getNumberPresentation()
Returns the caller id presentation type for incoming and waiting calls
|
Connection |
getOrigConnection()
Returns the original Connection instance associated with
this Connection
|
String |
getOrigDialString()
Get original dial string.
|
int |
getPreciseDisconnectCause()
Returns the CallFail reason provided by the RIL with the result of
RIL_REQUEST_LAST_CALL_FAIL_CAUSE
|
String |
getRemainingPostDialString()
Returns the portion of the post dial string that has not
yet been dialed, or "" if none
|
Call.State |
getState()
If this Connection is connected, then it is associated with
a Call.
|
UUSInfo |
getUUSInfo()
Returns the User to User Signaling (UUS) information associated with
incoming and waiting calls
|
String |
getVendorDisconnectCause()
Returns a string disconnect cause which is from vendor.
|
void |
hangup()
Hangup individual Connection
|
boolean |
isMultiparty()
Returns whether the original ImsPhoneConnection was a member
of a conference call
|
void |
migrateFrom(Connection c) |
boolean |
onDisconnect(int cause)
Called when the radio indicates the connection has been disconnected.
|
void |
proceedAfterWaitChar()
See Phone.setOnPostDialWaitCharacter()
|
void |
proceedAfterWildChar(String str)
See Phone.setOnPostDialWildCharacter()
|
void |
separate()
Separate this call from its owner Call and assigns it to a new Call
(eg if it is currently part of a Conference call
TODO: Throw exception?
|
boolean |
update(DriverCall dc) |
void |
updateParent(GsmCdmaCall oldParent,
GsmCdmaCall newParent) |
addCapability, addListener, addPostDialListener, clearPostDialListeners, clearUserData, getAddress, getAudioQuality, getCallSubstate, getCnapName, getCnapNamePresentation, getConferenceParticipants, getConnectionCapabilities, getConnectionExtras, getConnectTime, getConnectTimeReal, getCreateTime, getDisconnectCause, getDurationMillis, getHoldingStartTime, getPhoneType, getPostDialState, getPulledDialogId, getStateBeforeHandover, getTelecomCallId, getUserData, getVideoProvider, getVideoState, hasCapabilities, isActiveCallDisconnectedOnAnswer, isAlive, isConferenceHost, isIncoming, isMemberOfPeerConference, isPulledCall, isRinging, isWifi, notifyPostDialListeners, notifyPostDialListenersNextChar, onCallPullFailed, onConferenceMergeFailed, onConnectionEvent, onDisconnectConferenceParticipant, onExitedEcmMode, onHandoverToWifiFailed, pullExternalCall, removeCapability, removeListener, removePostDialListener, setActiveCallDisconnectedOnAnswer, setAllowAddCallDuringVideoCall, setAudioQuality, setCallSubstate, setConnectionCapabilities, setConnectionExtras, setConnectTime, setConverted, setIsPulledCall, setPulledDialogId, setTelecomCallId, setUserData, setVideoProvider, setVideoState, setWifi, shouldAllowAddCallDuringVideoCall, toString, updateConferenceParticipants, updateMultipartyState
public GsmCdmaConnection(GsmCdmaPhone phone, DriverCall dc, GsmCdmaCallTracker ct, int index)
public GsmCdmaConnection(GsmCdmaPhone phone, String dialString, GsmCdmaCallTracker ct, GsmCdmaCall parent, boolean isEmergencyCall)
public GsmCdmaConnection(Context context, CdmaCallWaitingNotification cw, GsmCdmaCallTracker ct, GsmCdmaCall parent)
public void dispose()
public static String formatDialString(String phoneNumber)
public String getOrigDialString()
Connection
getOrigDialString
in class Connection
public GsmCdmaCall getCall()
getCall
in class Connection
public long getDisconnectTime()
Connection
getDisconnectTime
in class Connection
public long getHoldDurationMillis()
Connection
getHoldDurationMillis
in class Connection
public Call.State getState()
Connection
getState
in class Connection
public void hangup() throws CallStateException
Connection
hangup
in class Connection
CallStateException
public void separate() throws CallStateException
Connection
separate
in class Connection
CallStateException
public void proceedAfterWaitChar()
Connection
proceedAfterWaitChar
in class Connection
public void proceedAfterWildChar(String str)
Connection
proceedAfterWildChar
in class Connection
public void cancelPostDial()
Connection
cancelPostDial
in class Connection
public boolean onDisconnect(int cause)
onDisconnect
in class Connection
cause
- call disconnect cause; values are defined in DisconnectCause
public boolean update(DriverCall dc)
public String getRemainingPostDialString()
Connection
getRemainingPostDialString
in class Connection
public void updateParent(GsmCdmaCall oldParent, GsmCdmaCall newParent)
protected void finalize()
Object
finalize
method to dispose of
system resources or to perform other cleanup.
The general contract of finalize
is that it is invoked
if and when the JavaTM virtual
machine has determined that there is no longer any
means by which this object can be accessed by any thread that has
not yet died, except as a result of an action taken by the
finalization of some other object or class which is ready to be
finalized. The finalize
method may take any action, including
making this object available again to other threads; the usual purpose
of finalize
, however, is to perform cleanup actions before
the object is irrevocably discarded. For example, the finalize method
for an object that represents an input/output connection might perform
explicit I/O transactions to break the connection before the object is
permanently discarded.
The finalize
method of class Object
performs no
special action; it simply returns normally. Subclasses of
Object
may override this definition.
The Java programming language does not guarantee which thread will
invoke the finalize
method for any given object. It is
guaranteed, however, that the thread that invokes finalize will not
be holding any user-visible synchronization locks when finalize is
invoked. If an uncaught exception is thrown by the finalize method,
the exception is ignored and finalization of that object terminates.
After the finalize
method has been invoked for an object, no
further action is taken until the Java virtual machine has again
determined that there is no longer any means by which this object can
be accessed by any thread that has not yet died, including possible
actions by other objects or classes which are ready to be finalized,
at which point the object may be discarded.
The finalize
method is never invoked more than once by a Java
virtual machine for any given object.
Any exception thrown by the finalize
method causes
the finalization of this object to be halted, but is otherwise
ignored.
public int getNumberPresentation()
Connection
getNumberPresentation
in class Connection
public UUSInfo getUUSInfo()
Connection
getUUSInfo
in class Connection
public int getPreciseDisconnectCause()
Connection
getPreciseDisconnectCause
in class Connection
public String getVendorDisconnectCause()
Connection
getVendorDisconnectCause
in class Connection
public void migrateFrom(Connection c)
migrateFrom
in class Connection
public Connection getOrigConnection()
Connection
getOrigConnection
in class Connection
public boolean isMultiparty()
Connection
isMultiparty
in class Connection