public class ImsPhoneConnection extends Connection implements ImsVideoCallProviderWrapper.ImsVideoProviderWrapperCallback
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, mOrigConnection, mPostDialState, mPostDialString, mPreHandoverState
Constructor and Description |
---|
ImsPhoneConnection(Phone phone,
ImsCall imsCall,
ImsPhoneCallTracker ct,
ImsPhoneCall parent,
boolean isUnknown)
This is probably an MT call
|
ImsPhoneConnection(Phone phone,
String dialString,
ImsPhoneCallTracker ct,
ImsPhoneCall parent,
boolean isEmergency)
This is an MO call, created when dialing
|
Modifier and Type | Method and Description |
---|---|
void |
cancelPostDial()
Cancel any post
|
void |
changeParent(ImsPhoneCall parent) |
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.
|
ImsPhoneCall |
getCall() |
long |
getConferenceConnectTime() |
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).
|
long |
getHoldingStartTime()
The time when this Connection last transitioned into HOLDING
in elapsedRealtime() format.
|
ImsCall |
getImsCall() |
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.
|
ImsPhoneCallTracker |
getOwner() |
int |
getPreciseDisconnectCause()
Returns the CallFail reason provided by the RIL with the result of
RIL_REQUEST_LAST_CALL_FAIL_CAUSE
|
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 |
isConferenceHost()
|
protected boolean |
isEmergency()
Indicates whether current phone connection is emergency or not
|
boolean |
isMemberOfPeerConference()
Applicable only for IMS Call.
|
boolean |
isMultiparty()
Returns whether the original ImsPhoneConnection was a member
of a conference call
|
boolean |
onDisconnect() |
boolean |
onDisconnect(int cause)
Called when the connection has been disconnected
|
void |
onDisconnectConferenceParticipant(Uri endpoint)
Notifies this Connection of a request to disconnect a participant of the conference managed
by the connection.
|
void |
onReceiveSessionModifyResponse(int status,
VideoProfile requestProfile,
VideoProfile responseProfile)
Handles notifications from the
ImsVideoCallProviderWrapper of session modification
responses received. |
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?
|
void |
setConferenceConnectTime(long conferenceConnectTime)
Sets the conference connect time.
|
void |
setDisconnectCause(int cause) |
void |
setImsCall(ImsCall imsCall) |
String |
toString()
Provides a string representation of the
ImsPhoneConnection . |
boolean |
update(ImsCall imsCall,
Call.State state) |
boolean |
updateAddressDisplay(ImsCall imsCall)
Check for a change in the address display related fields for the
ImsCall , and
update the ImsPhoneConnection with this information. |
boolean |
updateMediaCapabilities(ImsCall imsCall)
Check for a change in the video capabilities and audio quality for the
ImsCall , and
update the ImsPhoneConnection with this information. |
boolean |
updateWifiState()
Check for a change in the wifi state of the ImsPhoneCallTracker and update the
ImsPhoneConnection with this information. |
addCapability, addListener, addPostDialListener, clearPostDialListeners, clearUserData, getAddress, getAudioQuality, getCallSubstate, getCnapName, getCnapNamePresentation, getConferenceParticipants, getConnectionCapabilities, getConnectionExtras, getConnectTime, getConnectTimeReal, getCreateTime, getDisconnectCause, getDurationMillis, getPhoneType, getPostDialState, getPulledDialogId, getRemainingPostDialString, getStateBeforeHandover, getTelecomCallId, getUserData, getVideoProvider, getVideoState, hasCapabilities, isActiveCallDisconnectedOnAnswer, isAlive, isIncoming, isPulledCall, isRinging, isWifi, migrateFrom, notifyPostDialListeners, notifyPostDialListenersNextChar, onCallPullFailed, onConferenceMergeFailed, onConnectionEvent, onExitedEcmMode, onHandoverToWifiFailed, pullExternalCall, removeCapability, removeListener, removePostDialListener, setActiveCallDisconnectedOnAnswer, setAllowAddCallDuringVideoCall, setAudioQuality, setCallSubstate, setConnectionCapabilities, setConnectionExtras, setConnectTime, setConverted, setIsPulledCall, setPulledDialogId, setTelecomCallId, setUserData, setVideoProvider, setVideoState, setWifi, shouldAllowAddCallDuringVideoCall, updateConferenceParticipants, updateMultipartyState
public ImsPhoneConnection(Phone phone, ImsCall imsCall, ImsPhoneCallTracker ct, ImsPhoneCall parent, boolean isUnknown)
public ImsPhoneConnection(Phone phone, String dialString, ImsPhoneCallTracker ct, ImsPhoneCall parent, boolean isEmergency)
public void dispose()
public String getOrigDialString()
Connection
getOrigDialString
in class Connection
public ImsPhoneCall getCall()
getCall
in class Connection
public long getDisconnectTime()
Connection
getDisconnectTime
in class Connection
public long getHoldingStartTime()
Connection
getHoldingStartTime
in class Connection
public long getHoldDurationMillis()
Connection
getHoldDurationMillis
in class Connection
public void setDisconnectCause(int cause)
public String getVendorDisconnectCause()
Connection
getVendorDisconnectCause
in class Connection
public ImsPhoneCallTracker getOwner()
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
public boolean onDisconnect()
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 Connection getOrigConnection()
Connection
getOrigConnection
in class Connection
public boolean isMultiparty()
Connection
isMultiparty
in class Connection
public boolean isConferenceHost()
isMultiparty()
is true
, determines if this ImsCall
is the
origin of the conference call (i.e. #isConferenceHost()
is true
), or if this
ImsCall
is a member of a conference hosted on another device.isConferenceHost
in class Connection
true
if this call is the origin of the conference call it is a member of,
false
otherwise.public boolean isMemberOfPeerConference()
Connection
isMemberOfPeerConference
in class Connection
true
if the connection is a member of a conference hosted on another device.public ImsCall getImsCall()
public void setImsCall(ImsCall imsCall)
public void changeParent(ImsPhoneCall parent)
public boolean update(ImsCall imsCall, Call.State state)
true
if the ImsPhoneConnection
or its media capabilities have been
changed, and false
otherwise.public int getPreciseDisconnectCause()
Connection
getPreciseDisconnectCause
in class Connection
public void onDisconnectConferenceParticipant(Uri endpoint)
onDisconnectConferenceParticipant
in class Connection
endpoint
- the Uri
of the participant to disconnect.public void setConferenceConnectTime(long conferenceConnectTime)
ImsConference
is created to out of
this phone connection.conferenceConnectTime
- The conference connect time.public long getConferenceConnectTime()
public boolean updateAddressDisplay(ImsCall imsCall)
ImsCall
, and
update the ImsPhoneConnection
with this information.imsCall
- The call to check for changes in address display fields.public boolean updateMediaCapabilities(ImsCall imsCall)
ImsCall
, and
update the ImsPhoneConnection
with this information.imsCall
- The call to check for changes in media capabilities.public boolean updateWifiState()
ImsPhoneConnection
with this information.public String toString()
ImsPhoneConnection
. Primarily intended for
use in log statements.toString
in class Connection
protected boolean isEmergency()
public void onReceiveSessionModifyResponse(int status, VideoProfile requestProfile, VideoProfile responseProfile)
ImsVideoCallProviderWrapper
of session modification
responses received.onReceiveSessionModifyResponse
in interface ImsVideoCallProviderWrapper.ImsVideoProviderWrapperCallback
status
- The status of the original request.requestProfile
- The requested video profile.responseProfile
- The response upon video profile.