public class ImsPhoneCallTracker extends CallTracker implements ImsPullCall
Modifier and Type | Class and Description |
---|---|
static interface |
ImsPhoneCallTracker.PhoneStateListener |
Handler.Callback
Modifier and Type | Field and Description |
---|---|
ImsPhoneCall |
mBackgroundCall |
ImsPhoneCall |
mForegroundCall |
ImsPhoneCall |
mHandoverCall |
ImsPhoneCall |
mRingingCall |
EVENT_CALL_STATE_CHANGE, EVENT_CALL_WAITING_INFO_CDMA, EVENT_CONFERENCE_RESULT, EVENT_ECT_RESULT, EVENT_EXIT_ECM_RESPONSE_CDMA, EVENT_GET_LAST_CALL_FAIL_CAUSE, EVENT_OPERATION_COMPLETE, EVENT_POLL_CALLS_RESULT, EVENT_RADIO_AVAILABLE, EVENT_RADIO_NOT_AVAILABLE, EVENT_REPOLL_AFTER_DELAY, EVENT_SEPARATE_RESULT, EVENT_SWITCH_RESULT, EVENT_THREE_WAY_DIAL_BLANK_FLASH, EVENT_THREE_WAY_DIAL_L2_RESULT_CDMA, mCi, mHandoverConnections, mLastRelevantPoll, mNeedsPoll, mNumberConverted, mPendingOperations
Constructor and Description |
---|
ImsPhoneCallTracker(ImsPhone phone) |
Modifier and Type | Method and Description |
---|---|
void |
acceptCall(int videoState)
Accepts a call with the specified video state.
|
void |
cancelUSSD() |
boolean |
canConference() |
boolean |
canDial() |
boolean |
canTransfer() |
void |
clearDisconnected() |
void |
conference() |
Connection |
dial(String dialString,
int videoState,
Bundle intentExtras) |
void |
dispose() |
void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
void |
explicitCallTransfer() |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
boolean |
getMute() |
PhoneConstants.State |
getState() |
ImsUtInterface |
getUtInterface() |
long |
getVtDataUsage()
Get aggregated video call data usage since boot.
|
void |
handleMessage(Message msg)
Subclasses must implement this to receive messages.
|
protected void |
handlePollCalls(AsyncResult ar) |
void |
hangup(ImsPhoneCall call) |
void |
hangup(ImsPhoneConnection conn) |
boolean |
isCarrierDowngradeOfVtCallSupported() |
boolean |
isInEmergencyCall() |
boolean |
isUtEnabled() |
boolean |
isVideoCallEnabled() |
boolean |
isVolteEnabled() |
boolean |
isVowifiEnabled() |
protected void |
log(String msg) |
protected void |
loge(String msg) |
void |
pullExternalCall(String number,
int videoState,
int dialogId)
Initiates a pull of an external call.
|
void |
registerForVoiceCallEnded(Handler h,
int what,
Object obj) |
void |
registerForVoiceCallStarted(Handler h,
int what,
Object obj) |
void |
registerPhoneStateListener(ImsPhoneCallTracker.PhoneStateListener listener) |
void |
rejectCall() |
void |
sendDtmf(char c,
Message result) |
void |
sendUSSD(String ussdString,
Message response) |
void |
setMute(boolean mute) |
void |
setUiTTYMode(int uiTtyMode,
Message onComplete) |
void |
startDtmf(char c) |
void |
stopDtmf() |
void |
switchWaitingOrHoldingAndActive() |
void |
unregisterForVoiceCallEnded(Handler h) |
void |
unregisterForVoiceCallStarted(Handler h) |
void |
unregisterPhoneStateListener(ImsPhoneCallTracker.PhoneStateListener listener) |
checkForTestEmergencyNumber, convertNumberIfNecessary, getHoConnection, handleRadioAvailable, isCommandExceptionRadioNotAvailable, notifySrvccState, obtainNoPollCompleteMessage, pollCallsAfterDelay, pollCallsWhenSafe
dispatchMessage, dump, getLooper, getMessageName, getTraceName, hasCallbacks, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, runWithScissors, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
public ImsPhoneCall mRingingCall
public ImsPhoneCall mForegroundCall
public ImsPhoneCall mBackgroundCall
public ImsPhoneCall mHandoverCall
public ImsPhoneCallTracker(ImsPhone phone)
public void dispose()
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 void registerForVoiceCallStarted(Handler h, int what, Object obj)
registerForVoiceCallStarted
in class CallTracker
public void unregisterForVoiceCallStarted(Handler h)
unregisterForVoiceCallStarted
in class CallTracker
public void registerForVoiceCallEnded(Handler h, int what, Object obj)
registerForVoiceCallEnded
in class CallTracker
public void unregisterForVoiceCallEnded(Handler h)
unregisterForVoiceCallEnded
in class CallTracker
public Connection dial(String dialString, int videoState, Bundle intentExtras) throws CallStateException
CallStateException
public void acceptCall(int videoState) throws CallStateException
videoState
- The video StateCallStateException
public void rejectCall() throws CallStateException
CallStateException
public void switchWaitingOrHoldingAndActive() throws CallStateException
CallStateException
public void conference()
public void explicitCallTransfer()
public void clearDisconnected()
public boolean canConference()
public boolean canDial()
public boolean canTransfer()
public void setUiTTYMode(int uiTtyMode, Message onComplete)
public void setMute(boolean mute)
public boolean getMute()
public void sendDtmf(char c, Message result)
public void startDtmf(char c)
public void stopDtmf()
public void hangup(ImsPhoneConnection conn) throws CallStateException
CallStateException
public void hangup(ImsPhoneCall call) throws CallStateException
CallStateException
public void cancelUSSD()
public ImsUtInterface getUtInterface() throws ImsException
ImsException
public void handleMessage(Message msg)
Handler
handleMessage
in class CallTracker
protected void log(String msg)
log
in class CallTracker
protected void loge(String msg)
public void dump(FileDescriptor fd, PrintWriter pw, String[] args)
dump
in class CallTracker
protected void handlePollCalls(AsyncResult ar)
handlePollCalls
in class CallTracker
public boolean isInEmergencyCall()
public boolean isVolteEnabled()
public boolean isVowifiEnabled()
public boolean isVideoCallEnabled()
public PhoneConstants.State getState()
getState
in class CallTracker
public boolean isUtEnabled()
public void pullExternalCall(String number, int videoState, int dialogId)
ImsCallProfile.EXTRA_IS_CALL_PULL
extra specified. We call ImsPhone.notifyUnknownConnection(Connection)
which notifies
Telecom of the new dialed connection. The
PstnIncomingCallNotifier#maybeSwapWithUnknownConnection
logic ensures that the new
ImsPhoneConnection
resulting from the dial gets swapped with the
ImsExternalConnection
, which effectively makes the external call become a regular
call. Magic!pullExternalCall
in interface ImsPullCall
number
- The phone number of the call to be pulled.videoState
- The desired video state of the pulled call.dialogId
- The ImsExternalConnection.getCallId()
dialog id associated with the
call which is being pulled.public long getVtDataUsage()
public void registerPhoneStateListener(ImsPhoneCallTracker.PhoneStateListener listener)
public void unregisterPhoneStateListener(ImsPhoneCallTracker.PhoneStateListener listener)
public boolean isCarrierDowngradeOfVtCallSupported()
true
if downgrading of a video call to audio is supported.