public class ImsExternalCallTracker extends Object implements ImsPhoneCallTracker.PhoneStateListener
Modifier and Type | Class and Description |
---|---|
class |
ImsExternalCallTracker.ExternalCallStateListener
Implements the
ImsExternalCallStateListener , which is responsible for receiving
external call state updates from the IMS framework. |
class |
ImsExternalCallTracker.ExternalConnectionListener
Receives callbacks from
ImsExternalConnection s when a call pull has been initiated. |
static interface |
ImsExternalCallTracker.ImsCallNotify
Interface implemented by modules which are capable of notifying interested parties of new
unknown connections, and changes to call state.
|
Modifier and Type | Field and Description |
---|---|
static String |
EXTRA_IMS_EXTERNAL_CALL_ID
Extra key used when informing telecom of a new external call using the
TelecomManager.addNewUnknownCall(PhoneAccountHandle, Bundle) API. |
static String |
TAG |
Constructor and Description |
---|
ImsExternalCallTracker(ImsPhone phone) |
ImsExternalCallTracker(ImsPhone phone,
ImsPullCall callPuller,
ImsExternalCallTracker.ImsCallNotify callNotifier) |
Modifier and Type | Method and Description |
---|---|
Connection |
getConnectionById(int callId)
Finds an external connection given a call Id.
|
ImsExternalCallTracker.ExternalCallStateListener |
getExternalCallStateListener() |
void |
onPhoneStateChanged(PhoneConstants.State oldState,
PhoneConstants.State newState)
Handles changes to the phone state as notified by the
ImsPhoneCallTracker . |
void |
refreshExternalCallState(List<ImsExternalCallState> externalCallStates)
Called when the IMS stack receives a new dialog event package.
|
void |
setCallPuller(ImsPullCall callPuller)
Sets the implementation of
ImsPullCall which is responsible for pulling calls. |
void |
tearDown()
Performs any cleanup required before the ImsExternalCallTracker is destroyed.
|
public static final String TAG
public static final String EXTRA_IMS_EXTERNAL_CALL_ID
TelecomManager.addNewUnknownCall(PhoneAccountHandle, Bundle)
API.
Used to ensure that when Telecom requests the ConnectionService
to
create the connection for the unknown call that we can determine which
ImsExternalConnection
in mExternalConnections
is the one being requested.public ImsExternalCallTracker(ImsPhone phone, ImsPullCall callPuller, ImsExternalCallTracker.ImsCallNotify callNotifier)
public ImsExternalCallTracker(ImsPhone phone)
public void tearDown()
public void setCallPuller(ImsPullCall callPuller)
ImsPullCall
which is responsible for pulling calls.callPuller
- The pull call implementation.public ImsExternalCallTracker.ExternalCallStateListener getExternalCallStateListener()
public void onPhoneStateChanged(PhoneConstants.State oldState, PhoneConstants.State newState)
ImsPhoneCallTracker
.onPhoneStateChanged
in interface ImsPhoneCallTracker.PhoneStateListener
oldState
- The previous phone state.newState
- The new phone state.public void refreshExternalCallState(List<ImsExternalCallState> externalCallStates)
ImsExternalConnection
s to represent the dialogs in the dialog event
package data.externalCallStates
- the ImsExternalCallState
information for the dialog event
package.public Connection getConnectionById(int callId)
callId
- The call Id.Connection
, or null
if no match found.