public class ImsPhone extends Phone
Handler.Callback
PhoneInternalInterface.DataActivityState, PhoneInternalInterface.SuppService
CF_ID, CF_STATUS, CLIR_KEY, CS_FALLBACK, DATA_DISABLED_ON_BOOT_KEY, EVENT_CALL_RING, EVENT_CARRIER_CONFIG_CHANGED, EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED, EVENT_EMERGENCY_CALLBACK_MODE_ENTER, EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE, EVENT_GET_BASEBAND_VERSION_DONE, EVENT_GET_CALL_FORWARD_DONE, EVENT_GET_DEVICE_IDENTITY_DONE, EVENT_GET_IMEI_DONE, EVENT_GET_IMEISV_DONE, EVENT_GET_RADIO_CAPABILITY, EVENT_ICC_RECORD_EVENTS, EVENT_LAST, EVENT_NV_READY, EVENT_RADIO_AVAILABLE, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, EVENT_RADIO_ON, EVENT_REGISTERED_TO_NETWORK, EVENT_REQUEST_VOICE_RADIO_TECH_DONE, EVENT_RIL_CONNECTED, EVENT_RUIM_RECORDS_LOADED, EVENT_SET_CALL_FORWARD_DONE, EVENT_SET_CLIR_COMPLETE, EVENT_SET_NETWORK_AUTOMATIC, EVENT_SET_ROAMING_PREFERENCE_DONE, EVENT_SET_VM_NUMBER_DONE, EVENT_SIM_RECORDS_LOADED, EVENT_SS, EVENT_SSN, EVENT_UPDATE_PHONE_OBJECT, EVENT_USSD, EVENT_VOICE_RADIO_TECH_CHANGED, EXTRA_KEY_ALERT_MESSAGE, EXTRA_KEY_ALERT_SHOW, EXTRA_KEY_ALERT_TITLE, EXTRA_KEY_NOTIFICATION_MESSAGE, lockForRadioTechnologyChange, mCi, mContext, mDcTracker, mDisconnectRegistrants, mEmergencyCallToggledRegistrants, mIccRecords, mImsPhone, mIsVideoCapable, mMmiCompleteRegistrants, mMmiRegistrants, mNotifier, mPhoneId, mPostDialHandler, mRadioOffOrNotAvailableRegistrants, mSimRecordsLoadedRegistrants, mSimulatedRadioControl, mSmsStorageMonitor, mSmsUsageMonitor, mSuppServiceFailedRegistrants, mTelephonyComponentFactory, mUiccApplication, mUiccController, mUnknownConnectionRegistrants, mVmCount, NETWORK_SELECTION_KEY, NETWORK_SELECTION_NAME_KEY, NETWORK_SELECTION_SHORT_KEY
BM_10_800M_2, BM_4_450M, BM_7_700M2, BM_8_1800M, BM_9_900M, BM_AUS_BAND, BM_AUS2_BAND, BM_AWS, BM_CELL_800, BM_EURO_BAND, BM_EURO_PAMR, BM_IMT2000, BM_JPN_BAND, BM_JTACS, BM_KOREA_PCS, BM_NUM_BAND_MODES, BM_PCS, BM_UNSPECIFIED, BM_US_2500M, BM_US_BAND, CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, CDMA_OTA_PROVISION_STATUS_COMMITTED, CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED, CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, CDMA_RM_AFFILIATED, CDMA_RM_ANY, CDMA_RM_HOME, CDMA_SUBSCRIPTION_NV, CDMA_SUBSCRIPTION_RUIM_SIM, CDMA_SUBSCRIPTION_UNKNOWN, DEBUG_PHONE, FEATURE_ENABLE_CBS, FEATURE_ENABLE_DUN, FEATURE_ENABLE_DUN_ALWAYS, FEATURE_ENABLE_EMERGENCY, FEATURE_ENABLE_FOTA, FEATURE_ENABLE_HIPRI, FEATURE_ENABLE_IMS, FEATURE_ENABLE_MMS, FEATURE_ENABLE_SUPL, NT_MODE_CDMA, NT_MODE_CDMA_NO_EVDO, NT_MODE_EVDO_NO_CDMA, NT_MODE_GLOBAL, NT_MODE_GSM_ONLY, NT_MODE_GSM_UMTS, NT_MODE_LTE_CDMA_AND_EVDO, NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA, NT_MODE_LTE_GSM_WCDMA, NT_MODE_LTE_ONLY, NT_MODE_LTE_TDSCDMA, NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA, NT_MODE_LTE_TDSCDMA_GSM, NT_MODE_LTE_TDSCDMA_GSM_WCDMA, NT_MODE_LTE_TDSCDMA_WCDMA, NT_MODE_LTE_WCDMA, NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA, NT_MODE_TDSCDMA_GSM, NT_MODE_TDSCDMA_GSM_WCDMA, NT_MODE_TDSCDMA_ONLY, NT_MODE_TDSCDMA_WCDMA, NT_MODE_WCDMA_ONLY, NT_MODE_WCDMA_PREF, PREFERRED_CDMA_SUBSCRIPTION, PREFERRED_NT_MODE, REASON_APN_CHANGED, REASON_APN_FAILED, REASON_APN_SWITCHED, REASON_CARRIER_ACTION_DISABLE_METERED_APN, REASON_CARRIER_CHANGE, REASON_CDMA_DATA_ATTACHED, REASON_CDMA_DATA_DETACHED, REASON_CONNECTED, REASON_DATA_ATTACHED, REASON_DATA_DEPENDENCY_MET, REASON_DATA_DEPENDENCY_UNMET, REASON_DATA_DETACHED, REASON_DATA_DISABLED, REASON_DATA_ENABLED, REASON_DATA_SPECIFIC_DISABLED, REASON_IWLAN_AVAILABLE, REASON_LOST_DATA_CONNECTION, REASON_NW_TYPE_CHANGED, REASON_PDP_RESET, REASON_PS_RESTRICT_DISABLED, REASON_PS_RESTRICT_ENABLED, REASON_RADIO_TURNED_OFF, REASON_RESTORE_DEFAULT_APN, REASON_ROAMING_OFF, REASON_ROAMING_ON, REASON_SIM_LOADED, REASON_SIM_NOT_READY, REASON_SINGLE_PDN_ARBITRATION, REASON_VOICE_CALL_ENDED, REASON_VOICE_CALL_STARTED, TTY_MODE_FULL, TTY_MODE_HCO, TTY_MODE_OFF, TTY_MODE_VCO
Constructor and Description |
---|
ImsPhone(Context context,
PhoneNotifier notifier,
Phone defaultPhone) |
ImsPhone(Context context,
PhoneNotifier notifier,
Phone defaultPhone,
boolean unitTestMode) |
Modifier and Type | Method and Description |
---|---|
void |
acceptCall(int videoState)
Answers a ringing or waiting call.
|
void |
activateCellBroadcastSms(int activate,
Message response)
Activate or deactivate cell broadcast SMS.
|
void |
callEndCleanupHandOverCallIfAny() |
void |
cancelUSSD() |
boolean |
canConference()
Whether or not the phone can conference in the current phone
state--that is, one call holding and one call active.
|
boolean |
canDial() |
boolean |
canTransfer()
Whether or not the phone can do explicit call transfer in the current
phone state--that is, one call holding and one call active.
|
void |
clearDisconnected()
Clears all DISCONNECTED connections from Call connection lists.
|
void |
conference()
Conferences holding and active.
|
Connection |
dial(String dialString,
int videoState)
Initiate a new voice connection.
|
Connection |
dial(String dialString,
UUSInfo uusInfo,
int videoState,
Bundle intentExtras)
Initiate a new voice connection with supplementary User to User
Information.
|
boolean |
disableDataConnectivity() |
void |
disableLocationUpdates()
Disable location update notifications.
|
void |
dispose() |
void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
boolean |
enableDataConnectivity() |
void |
enableLocationUpdates()
Enable location update notifications.
|
void |
exitEmergencyCallbackMode()
request to exit emergency call back mode
the caller should use setOnECMModeExitResponse
to receive the emergency callback mode exit response
|
void |
explicitCallTransfer()
Connects the two calls and disconnects the subscriber from both calls
Explicit Call Transfer occurs asynchronously
and may fail.
|
List<CellInfo> |
getAllCellInfo() |
void |
getAvailableNetworks(Message response)
Scan available networks.
|
ImsPhoneCall |
getBackgroundCall()
Gets the background call object, which represents all connections that
are holding (all connections that have been accepted or connected, but
do not have their audio path connected).
|
void |
getCallBarring(String facility,
Message onComplete) |
boolean |
getCallForwardingIndicator()
Get voice call forwarding indicator status.
|
void |
getCallForwardingOption(int commandInterfaceCFReason,
Message onComplete)
getCallForwardingOptions
gets a call forwarding option.
|
CallTracker |
getCallTracker()
Get call tracker
|
void |
getCallWaiting(Message onComplete)
getCallWaiting
gets call waiting activation state.
|
void |
getCellBroadcastSmsConfig(Message response)
Query the current configuration of cdma cell broadcast SMS.
|
CellLocation |
getCellLocation()
Get the current CellLocation.
|
List<DataConnection> |
getCurrentDataConnectionList() |
Uri[] |
getCurrentSubscriberUris()
SIP URIs aliased to the current subscriber given by the IMS implementation.
|
PhoneInternalInterface.DataActivityState |
getDataActivityState()
Get the current DataActivityState.
|
void |
getDataCallList(Message response)
Get the current active Data Call list
|
PhoneConstants.DataState |
getDataConnectionState()
Get the current for the default apn DataState.
|
PhoneConstants.DataState |
getDataConnectionState(String apnType)
Get the current DataState.
|
boolean |
getDataEnabled() |
boolean |
getDataRoamingEnabled() |
Phone |
getDefaultPhone()
This function returns the parent phone of the current phone.
|
String |
getDeviceId()
Retrieves the unique device ID, e.g., IMEI for GSM phones and MEID for CDMA phones.
|
String |
getDeviceSvn()
Retrieves the software version number for the device, e.g., IMEI/SV
for GSM phones.
|
String |
getEsn()
Retrieves the ESN for CDMA phones.
|
ImsExternalCallTracker |
getExternalCallTracker() |
ImsPhoneCall |
getForegroundCall()
Gets the foreground call object, which represents all connections that
are dialing or active (all connections
that have their audio path connected).
|
String |
getGroupIdLevel1()
Retrieves the Group Identifier Level1 for GSM phones.
|
String |
getGroupIdLevel2()
Retrieves the Group Identifier Level2 for phones.
|
ArrayList<Connection> |
getHandoverConnection() |
IccCard |
getIccCard()
Returns the ICC card interface for this phone, or null
if not applicable to underlying technology.
|
IccFileHandler |
getIccFileHandler()
Retrieves the IccFileHandler of the Phone instance
|
IccPhoneBookInterfaceManager |
getIccPhoneBookInterfaceManager()
Retrieves the IccPhoneBookInterfaceManager of the Phone
|
boolean |
getIccRecordsLoaded()
Returns SIM record load state.
|
String |
getIccSerialNumber()
Retrieves the serial number of the ICC, if applicable.
|
String |
getImei()
Retrieves IMEI for phones.
|
ImsEcbmStateListener |
getImsEcbmStateListener() |
String |
getLine1AlphaTag()
Returns the alpha tag associated with the msisdn number.
|
String |
getLine1Number()
Get the line 1 phone number (MSISDN).
|
LinkProperties |
getLinkProperties(String apnType)
Return the LinkProperties for the named apn or null if not available
|
String |
getMeid()
Retrieves MEID for CDMA phones.
|
boolean |
getMessageWaitingIndicator()
Get voice message waiting indicator status.
|
boolean |
getMute()
Gets current mute status.
|
void |
getNeighboringCids(Message response)
Query neighboring cell IDs.
|
void |
getOutgoingCallerIdDisplay(Message onComplete)
getOutgoingCallerIdDisplay
gets outgoing caller id display.
|
List<? extends ImsPhoneMmiCode> |
getPendingMmiCodes()
Returns a list of MMI codes that are pending.
|
int |
getPhoneId()
Returns the phone id.
|
int |
getPhoneType()
Return a numerical identifier for the phone radio interface.
|
ImsPhoneCall |
getRingingCall()
Gets the ringing call object, which represents an incoming
connection (if present) that is pending answer/accept.
|
ServiceState |
getServiceState()
Get the current ServiceState.
|
SignalStrength |
getSignalStrength()
Get current signal strength.
|
PhoneConstants.State |
getState()
Get current coarse-grained voice call state.
|
int |
getSubId() |
String |
getSubscriberId()
Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
|
String |
getVoiceMailAlphaTag()
Returns the alpha tag associated with the voice mail number.
|
String |
getVoiceMailNumber()
Get the voice mail access phone number.
|
long |
getVtDataUsage() |
PowerManager.WakeLock |
getWakeLock() |
boolean |
handleInCallMmiCommands(String dialString)
Handles in-call MMI commands.
|
void |
handleMessage(Message msg)
When overridden the derived class needs to call
super.handleMessage(msg) so this method has a
a chance to process the message.
|
boolean |
handlePinMmi(String dialString)
Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
without SEND (so
dial is not appropriate). |
boolean |
isDataConnectivityPossible()
Report on whether data connectivity is allowed.
|
boolean |
isImsRegistered()
Query the IMS Registration Status.
|
boolean |
isInEcm() |
boolean |
isInEmergencyCall() |
boolean |
isUtEnabled()
Return if UT capability of ImsPhone is enabled or not
|
boolean |
isVideoEnabled()
Determines if video calling is enabled for the phone.
|
boolean |
isVolteEnabled()
Get Volte Feature Availability
|
boolean |
isWifiCallingEnabled()
Get Wifi Calling Feature Availability
|
void |
migrateFrom(Phone from) |
boolean |
needsOtaServiceProvisioning()
Returns true if OTA Service Provisioning needs to be performed.
|
void |
notifyCallForwardingIndicator() |
void |
notifyDisconnect(Connection cn) |
void |
notifyForVideoCapabilityChanged(boolean isVideoCapable)
Notify registrants if phone is video capable.
|
void |
notifyIncomingRing() |
void |
notifyNewRingingConnection(Connection c) |
void |
notifyPhoneStateChanged()
Notify any interested party of a Phone state change
PhoneConstants.State |
void |
notifyPreciseCallStateChanged()
Notify registrants of a change in the call state.
|
void |
notifySrvccState(Call.SrvccState state) |
void |
notifySuppSvcNotification(SuppServiceNotification suppSvc) |
void |
onFeatureCapabilityChanged() |
void |
onMMIDone(ImsPhoneMmiCode mmi)
Removes the given MMI from the pending list and notifies
registrants that it is complete.
|
void |
onTtyModeReceived(int mode) |
protected void |
onUpdateIccAvailability() |
void |
processDisconnectReason(ImsReasonInfo imsReasonInfo)
Show notification in case of some error codes.
|
void |
registerForOnHoldTone(Handler h,
int what,
Object obj)
Notifies when out-band on-hold tone is needed.
|
void |
registerForRingbackTone(Handler h,
int what,
Object obj)
Notifies when out-band ringback tone is needed.
|
void |
registerForSilentRedial(Handler h,
int what,
Object obj) |
void |
registerForSuppServiceNotification(Handler h,
int what,
Object obj)
Register for Supplementary Service notifications from the network.
|
void |
registerForTtyModeReceived(Handler h,
int what,
Object obj)
Register for TTY mode change notifications from the network.
|
void |
rejectCall()
Reject (ignore) a ringing call.
|
void |
saveClirSetting(int commandInterfaceCLIRMode)
Saves CLIR setting so that we can re-apply it as necessary
(in case the RIL resets it across reboots).
|
void |
selectNetworkManually(OperatorInfo network,
boolean persistSelection,
Message response)
Manually selects a network.
|
void |
sendDtmf(char c)
Play a DTMF tone on the active call.
|
void |
sendEmergencyCallStateChange(boolean callActive) |
void |
sendUSSD(String ussdString,
Message response) |
void |
sendUssdResponse(String ussdMessge)
Sends user response to a USSD REQUEST message.
|
void |
setBroadcastEmergencyCallStateChanges(boolean broadcast)
Set boolean broadcastEmergencyCallStateChanges
|
void |
setCallBarring(String facility,
boolean lockState,
String password,
Message onComplete) |
void |
setCallForwardingOption(int commandInterfaceCFAction,
int commandInterfaceCFReason,
String dialingNumber,
int serviceClass,
int timerSeconds,
Message onComplete) |
void |
setCallForwardingOption(int commandInterfaceCFAction,
int commandInterfaceCFReason,
String dialingNumber,
int timerSeconds,
Message onComplete)
setCallForwardingOptions
sets a call forwarding option.
|
void |
setCallWaiting(boolean enable,
int serviceClass,
Message onComplete) |
void |
setCallWaiting(boolean enable,
Message onComplete)
setCallWaiting
sets a call forwarding option.
|
void |
setCellBroadcastSmsConfig(int[] configValuesArray,
Message response)
Configure cell broadcast SMS.
|
protected void |
setCurrentSubscriberUris(Uri[] currentSubscriberUris) |
void |
setDataEnabled(boolean enable) |
void |
setDataRoamingEnabled(boolean enable) |
void |
setImsRegistered(boolean value) |
boolean |
setLine1Number(String alphaTag,
String number,
Message onComplete)
Sets the MSISDN phone number in the SIM card.
|
void |
setMute(boolean muted)
Mutes or unmutes the microphone for the active call.
|
void |
setNetworkSelectionModeAutomatic(Message response)
Switches network selection mode to "automatic", re-scanning and
re-selecting a network if appropriate.
|
void |
setOnEcbModeExitResponse(Handler h,
int what,
Object obj)
registers for exit emergency call back mode request response
|
void |
setOutgoingCallerIdDisplay(int clirMode,
Message onComplete)
setOutgoingCallerIdDisplay
sets a call forwarding option.
|
void |
setRadioPower(boolean power)
Sets the radio power on/off state (off is sometimes
called "airplane mode").
|
void |
setUiTTYMode(int uiTtyMode,
Message onComplete)
setUiTTYMode
sets a TTY mode option.
|
void |
setVoiceMailNumber(String alphaTag,
String voiceMailNumber,
Message onComplete)
setVoiceMailNumber
sets the voicemail number in the SIM card.
|
void |
startDtmf(char c)
Start to paly a DTMF tone on the active call.
|
protected void |
startOnHoldTone(Connection cn)
Signals all registrants that the remote hold tone should be started for a connection.
|
void |
startRingbackTone() |
void |
stopDtmf()
Stop the playing DTMF tone.
|
protected void |
stopOnHoldTone(Connection cn)
Signals all registrants that the remote hold tone should be stopped for a connection.
|
void |
stopRingbackTone() |
void |
switchHoldingAndActive()
Places any active calls on hold, and makes any held calls
active.
|
void |
unregisterForOnHoldTone(Handler h)
Unregisters for on-hold tone notification.
|
void |
unregisterForRingbackTone(Handler h)
Unregisters for ringback tone notification.
|
void |
unregisterForSilentRedial(Handler h) |
void |
unregisterForSuppServiceNotification(Handler h)
Unregisters for Supplementary Service notifications.
|
void |
unregisterForTtyModeReceived(Handler h)
Unregisters for TTY mode change notifications.
|
void |
unsetOnEcbModeExitResponse(Handler h)
Unregisters for exit emergency call back mode request response
|
void |
updateServiceLocation()
Update the ServiceState CellLocation for current network registration.
|
carrierActionSetMeteredApnsEnabled, carrierActionSetRadioEnabled, checkWfcWifiOnlyModeBeforeDial, dialInternal, disableDnsCheck, enableEnhancedVoicePrivacy, getActionAttached, getActionDetached, getActiveApnHost, getActiveApnTypes, getAllowedCarriers, getCarrierSignalAgent, getCdmaEriIconIndex, getCdmaEriIconMode, getCdmaEriText, getCdmaMin, getCdmaPrlVersion, getContext, getCurrentUiccAppType, getEnhancedVoicePrivacy, getFullIccSerialNumber, getHandler, getIccRecords, getIccSmsInterfaceManager, getImsPhone, getIsimRecords, getLceStatus, getLocaleFromSimAndCarrierPrefs, getLteOnCdmaMode, getModemActivityInfo, getModemUuId, getMsisdn, getNai, getNetworkCapabilities, getNetworkSelectionMode, getPcscfAddress, getPhoneName, getPostDialHandler, getPreferredNetworkType, getRadioAccessFamily, getRadioCapability, getServiceStateTracker, getSimulatedRadioControl, getSmscAddress, getStoredVoiceMessageCount, getSystemProperty, getUiccCard, getUnitTestMode, getUsimServiceTable, getVoiceMessageCount, getVoicePhoneServiceState, hasMatchedTetherApnSetting, invokeOemRilRequestRaw, invokeOemRilRequestStrings, isCspPlmnEnabled, isDataConnectivityPossible, isDnsCheckDisabled, isImsUseEnabled, isMatchGid, isMccMncMarkedAsNonRoaming, isMccMncMarkedAsRoaming, isMinInfoReady, isOtaSpNumber, isRadioAvailable, isRadioOn, isShuttingDown, isSidMarkedAsNonRoaming, isSidMarkedAsRoaming, isVideoCallPresent, migrate, notifyCellInfo, notifyDataActivity, notifyDataConnection, notifyDataConnection, notifyDataConnection, notifyDataConnectionFailed, notifyDisconnectP, notifyHandoverStateChanged, notifyNewRingingConnectionP, notifyOtaspChanged, notifyPreciseCallStateChangedP, notifyPreciseDataConnectionFailed, notifyServiceStateChangedP, notifySignalStrength, notifyUnknownConnectionP, notifyVoLteServiceStateChanged, nvReadItem, nvResetConfig, nvWriteCdmaPrl, nvWriteItem, queryAvailableBandMode, queryCdmaRoamingPreference, queryTTYMode, radioCapabilityUpdated, registerForAllDataDisconnected, registerForCallWaiting, registerForCdmaOtaStatusChange, registerForDataEnabledChanged, registerForDisconnect, registerForDisplayInfo, registerForEcmTimerReset, registerForEmergencyCallToggle, registerForHandoverStateChanged, registerForInCallVoicePrivacyOff, registerForInCallVoicePrivacyOn, registerForIncomingRing, registerForLineControlInfo, registerForMmiComplete, registerForMmiInitiate, registerForNewRingingConnection, registerForNumberInfo, registerForPreciseCallStateChanged, registerForRadioCapabilityChanged, registerForRadioOffOrNotAvailable, registerForRedirectedNumberInfo, registerForResendIncallMute, registerForServiceStateChanged, registerForSignalInfo, registerForSimRecordsLoaded, registerForSubscriptionInfoReady, registerForSuppServiceFailed, registerForT53AudioControlInfo, registerForUnknownConnection, registerForVideoCapabilityChanged, registerFoT53ClirlInfo, sendBurstDtmf, sendSubscriptionSettings, setAllowedCarriers, setBandMode, setCdmaRoamingPreference, setCdmaSubscription, setCellInfoListRate, setEchoSuppressionEnabled, setImsRegistrationState, setInternalDataEnabled, setIsInEmergencyCall, setOnPostDialCharacter, setOperatorBrandOverride, setPhoneName, setPolicyDataEnabled, setPreferredNetworkType, setPreferredNetworkTypeIfSimLoaded, setRadioCapability, setRoamingOverride, setSmscAddress, setSystemProperty, setTTYMode, setVoiceCallForwardingFlag, setVoiceCallForwardingFlag, setVoiceMessageCount, setVoiceMessageWaiting, shutdownRadio, startLceAfterRadioIsAvailable, startMonitoringImsService, unregisterForAllDataDisconnected, unregisterForCallWaiting, unregisterForCdmaOtaStatusChange, unregisterForDataEnabledChanged, unregisterForDisconnect, unregisterForDisplayInfo, unregisterForEcmTimerReset, unregisterForEmergencyCallToggle, unregisterForHandoverStateChanged, unregisterForInCallVoicePrivacyOff, unregisterForInCallVoicePrivacyOn, unregisterForIncomingRing, unregisterForLineControlInfo, unregisterForMmiComplete, unregisterForMmiInitiate, unregisterForNewRingingConnection, unregisterForNumberInfo, unregisterForPreciseCallStateChanged, unregisterForRadioCapabilityChanged, unregisterForRadioOffOrNotAvailable, unregisterForRedirectedNumberInfo, unregisterForResendIncallMute, unregisterForServiceStateChanged, unregisterForSignalInfo, unregisterForSimRecordsLoaded, unregisterForSubscriptionInfoReady, unregisterForSuppServiceFailed, unregisterForT53AudioControlInfo, unregisterForT53ClirInfo, unregisterForUnknownConnection, unregisterForVideoCapabilityChanged, updateCurrentCarrierInProvider, updateDataConnectionTracker, updatePhoneObject, updateVoiceMail
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 ImsPhone(Context context, PhoneNotifier notifier, Phone defaultPhone)
public ImsPhone(Context context, PhoneNotifier notifier, Phone defaultPhone, boolean unitTestMode)
protected void setCurrentSubscriberUris(Uri[] currentSubscriberUris)
public Uri[] getCurrentSubscriberUris()
Phone
getCurrentSubscriberUris
in class Phone
public ServiceState getServiceState()
PhoneInternalInterface
registerForServiceStateChanged
to be informed of
updates.getServiceState
in interface PhoneInternalInterface
public CallTracker getCallTracker()
Phone
getCallTracker
in class Phone
public ImsExternalCallTracker getExternalCallTracker()
public List<? extends ImsPhoneMmiCode> getPendingMmiCodes()
PhoneInternalInterface
registerForMmiInitiate
and registerForMmiComplete
for change notification.getPendingMmiCodes
in interface PhoneInternalInterface
public void acceptCall(int videoState) throws CallStateException
PhoneInternalInterface
registerForPreciseCallStateChanged()
.videoState
- The video state in which to answer the call.CallStateException
- when no call is ringing or waitingpublic void rejectCall() throws CallStateException
PhoneInternalInterface
registerForPreciseCallStateChanged()
.CallStateException
- when no call is ringing or waitingpublic void switchHoldingAndActive() throws CallStateException
PhoneInternalInterface
registerForPreciseCallStateChanged()
.CallStateException
- if a call is ringing, waiting, or
dialing/alerting. In these cases, this operation may not be performed.public boolean canConference()
PhoneInternalInterface
public boolean canDial()
public void conference()
PhoneInternalInterface
registerForPreciseCallStateChanged()
.public void clearDisconnected()
PhoneInternalInterface
public boolean canTransfer()
PhoneInternalInterface
public void explicitCallTransfer()
PhoneInternalInterface
registerForPreciseCallStateChanged()
.public ImsPhoneCall getForegroundCall()
PhoneInternalInterface
The foreground call is a singleton object. It is constant for the life of this phone. It is never null.
The foreground call will only ever be in one of these states:
IDLE, ACTIVE, DIALING, ALERTING, or DISCONNECTED.
State change notification is available via
registerForPreciseCallStateChanged()
.
public ImsPhoneCall getBackgroundCall()
PhoneInternalInterface
The background call is a singleton object. It is constant for the life of this phone object . It is never null.
The background call will only ever be in one of these states:
IDLE, HOLDING or DISCONNECTED.
State change notification is available via
registerForPreciseCallStateChanged()
.
public ImsPhoneCall getRingingCall()
PhoneInternalInterface
The ringing call is a singleton object. It is constant for the life of this phone. It is never null.
The ringing call will only ever be in one of these states:
IDLE, INCOMING, WAITING or DISCONNECTED.
State change notification is available via
registerForPreciseCallStateChanged()
.
public void notifySuppSvcNotification(SuppServiceNotification suppSvc)
public boolean handleInCallMmiCommands(String dialString)
PhoneInternalInterface
handleInCallMmiCommands
in interface PhoneInternalInterface
dialString
- the MMI command to be executed.public void notifyNewRingingConnection(Connection c)
public void notifyForVideoCapabilityChanged(boolean isVideoCapable)
Phone
notifyForVideoCapabilityChanged
in class Phone
public Connection dial(String dialString, int videoState) throws CallStateException
PhoneInternalInterface
dialString
- The dial string.videoState
- The desired video state for the connection.CallStateException
- if a new outgoing call is not currently
possible because no more call slots exist or a call exists that is
dialing, alerting, ringing, or waiting. Other errors are
handled asynchronously.public Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras) throws CallStateException
PhoneInternalInterface
dialString
- The dial string.uusInfo
- The UUSInfo.videoState
- The desired video state for the connection.intentExtras
- The extras from the original CALL intent.CallStateException
- if a new outgoing call is not currently
possible because no more call slots exist or a call exists
that is dialing, alerting, ringing, or waiting. Other
errors are handled asynchronously.public void sendDtmf(char c)
PhoneInternalInterface
c
- should be one of 0-9, '*' or '#'. Other values will be
silently ignored.public void startDtmf(char c)
PhoneInternalInterface
c
- should be one of 0-9, '*' or '#'. Other values will be
silently ignored.public void stopDtmf()
PhoneInternalInterface
public void notifyIncomingRing()
public void setMute(boolean muted)
PhoneInternalInterface
muted
- true to mute the microphone,
false to activate the microphone.public void setUiTTYMode(int uiTtyMode, Message onComplete)
Phone
setUiTTYMode
in class Phone
onComplete
- a callback message when the action is completedpublic boolean getMute()
PhoneInternalInterface
registerForPreciseCallStateChanged()
as a change notifcation, although presently phone state changed is not
fired when setMute() is called.public PhoneConstants.State getState()
Phone
registerForPreciseCallStateChanged()
for change notification. If the phone has an active call and call waiting occurs, then the phone state is RINGING not OFFHOOK Note: This registration point provides notification of finer-grained changes.
public void getOutgoingCallerIdDisplay(Message onComplete)
PhoneInternalInterface
getOutgoingCallerIdDisplay
in interface PhoneInternalInterface
onComplete
- a callback message when the action is completed.for details.
public void setOutgoingCallerIdDisplay(int clirMode, Message onComplete)
PhoneInternalInterface
setOutgoingCallerIdDisplay
in interface PhoneInternalInterface
clirMode
- is one of the valid call CLIR
modes, as defined in
com.android.internal.telephony.CommandsInterface./code>
onComplete
- a callback message when the action is completed.public void getCallForwardingOption(int commandInterfaceCFReason, Message onComplete)
PhoneInternalInterface
getCallForwardingOption
in interface PhoneInternalInterface
commandInterfaceCFReason
- is one of the valid call forwarding
CF_REASONS, as defined in
com.android.internal.telephony.CommandsInterface.
onComplete
- a callback message when the action is completed.for details.
public void setCallForwardingOption(int commandInterfaceCFAction, int commandInterfaceCFReason, String dialingNumber, int timerSeconds, Message onComplete)
PhoneInternalInterface
setCallForwardingOption
in interface PhoneInternalInterface
commandInterfaceCFAction
- is one of the valid call forwarding
CF_REASONS, as defined in
com.android.internal.telephony.CommandsInterface.
commandInterfaceCFReason
- is one of the valid call forwarding
CF_ACTIONS, as defined in
com.android.internal.telephony.CommandsInterface.
dialingNumber
- is the target phone number to forward calls totimerSeconds
- is used by CFNRy to indicate the timeout before
forwarding is attempted.onComplete
- a callback message when the action is completed.public void setCallForwardingOption(int commandInterfaceCFAction, int commandInterfaceCFReason, String dialingNumber, int serviceClass, int timerSeconds, Message onComplete)
public void getCallWaiting(Message onComplete)
PhoneInternalInterface
getCallWaiting
in interface PhoneInternalInterface
onComplete
- a callback message when the action is completed.for details.
public void setCallWaiting(boolean enable, Message onComplete)
PhoneInternalInterface
setCallWaiting
in interface PhoneInternalInterface
enable
- is a boolean representing the state that you are
requesting, true for enabled, false for disabled.onComplete
- a callback message when the action is completed.public void setCallWaiting(boolean enable, int serviceClass, Message onComplete)
public void setCallBarring(String facility, boolean lockState, String password, Message onComplete)
public void sendUssdResponse(String ussdMessge)
PhoneInternalInterface
sendUssdResponse
in interface PhoneInternalInterface
ussdMessge
- Message to send in the response.public void cancelUSSD()
cancelUSSD
in class Phone
public void onMMIDone(ImsPhoneMmiCode mmi)
mmi
- MMI that is donepublic ArrayList<Connection> getHandoverConnection()
getHandoverConnection
in class Phone
public void notifySrvccState(Call.SrvccState state)
notifySrvccState
in class Phone
public void registerForSilentRedial(Handler h, int what, Object obj)
registerForSilentRedial
in class Phone
public void unregisterForSilentRedial(Handler h)
unregisterForSilentRedial
in class Phone
public void registerForSuppServiceNotification(Handler h, int what, Object obj)
PhoneInternalInterface
registerForSuppServiceNotification
in interface PhoneInternalInterface
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForSuppServiceNotification(Handler h)
PhoneInternalInterface
unregisterForSuppServiceNotification
in interface PhoneInternalInterface
h
- Handler to be removed from the registrant list.public int getPhoneId()
Phone
getPhoneId
in class Phone
public void handleMessage(Message msg)
Phone
handleMessage
in class Phone
public ImsEcbmStateListener getImsEcbmStateListener()
public boolean isInEmergencyCall()
isInEmergencyCall
in class Phone
public boolean isInEcm()
public void exitEmergencyCallbackMode()
Phone
exitEmergencyCallbackMode
in class Phone
public void setOnEcbModeExitResponse(Handler h, int what, Object obj)
Phone
setOnEcbModeExitResponse
in class Phone
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unsetOnEcbModeExitResponse(Handler h)
Phone
unsetOnEcbModeExitResponse
in class Phone
h
- Handler to be removed from the registrant list.public void onFeatureCapabilityChanged()
public boolean isVolteEnabled()
Phone
isVolteEnabled
in class Phone
public boolean isWifiCallingEnabled()
Phone
isWifiCallingEnabled
in class Phone
public boolean isVideoEnabled()
Phone
isVideoEnabled
in class Phone
true
if video calling is enabled, false
otherwise.public Phone getDefaultPhone()
Phone
getDefaultPhone
in class Phone
public boolean isImsRegistered()
Phone
isImsRegistered
in class Phone
public void setImsRegistered(boolean value)
public void callEndCleanupHandOverCallIfAny()
callEndCleanupHandOverCallIfAny
in class Phone
public void processDisconnectReason(ImsReasonInfo imsReasonInfo)
public boolean isUtEnabled()
Phone
isUtEnabled
in class Phone
public void sendEmergencyCallStateChange(boolean callActive)
sendEmergencyCallStateChange
in class Phone
public void setBroadcastEmergencyCallStateChanges(boolean broadcast)
Phone
setBroadcastEmergencyCallStateChanges
in class Phone
public PowerManager.WakeLock getWakeLock()
public long getVtDataUsage()
getVtDataUsage
in class Phone
public void dump(FileDescriptor fd, PrintWriter pw, String[] args)
public void migrateFrom(Phone from)
migrateFrom
in class Phone
public void registerForRingbackTone(Handler h, int what, Object obj)
Phone
Messages received from this: Message.obj will be an AsyncResult AsyncResult.userObj = obj AsyncResult.result = boolean, true to start play ringback tone and false to stop.
registerForRingbackTone
in class Phone
public void unregisterForRingbackTone(Handler h)
Phone
unregisterForRingbackTone
in class Phone
public void startRingbackTone()
startRingbackTone
in class Phone
public void stopRingbackTone()
stopRingbackTone
in class Phone
public void registerForOnHoldTone(Handler h, int what, Object obj)
Phone
Messages received from this: Message.obj will be an AsyncResult AsyncResult.userObj = obj AsyncResult.result = boolean, true to start play on-hold tone and false to stop.
registerForOnHoldTone
in class Phone
public void unregisterForOnHoldTone(Handler h)
Phone
unregisterForOnHoldTone
in class Phone
protected void startOnHoldTone(Connection cn)
cn
- The connection.protected void stopOnHoldTone(Connection cn)
cn
- The connection.public void registerForTtyModeReceived(Handler h, int what, Object obj)
Phone
registerForTtyModeReceived
in class Phone
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForTtyModeReceived(Handler h)
Phone
unregisterForTtyModeReceived
in class Phone
h
- Handler to be removed from the registrant list.public void onTtyModeReceived(int mode)
public List<CellInfo> getAllCellInfo()
getAllCellInfo
in class Phone
public CellLocation getCellLocation()
PhoneInternalInterface
public int getPhoneType()
Phone
getPhoneType
in class Phone
public SignalStrength getSignalStrength()
Phone
PhoneStateNotifier
or an equivalent.
An ASU is 0-31 or -1 if unknown (for GSM, dBm = -113 - 2 * asu).
The following special values are defined:
getSignalStrength
in class Phone
public boolean getMessageWaitingIndicator()
Phone
getMessageWaitingIndicator
in class Phone
public boolean getCallForwardingIndicator()
Phone
getCallForwardingIndicator
in class Phone
public PhoneConstants.DataState getDataConnectionState()
Phone
PhoneStateListener
instead.getDataConnectionState
in class Phone
public PhoneConstants.DataState getDataConnectionState(String apnType)
PhoneInternalInterface
PhoneStateListener
instead.apnType
- specify for which apn to get connection state info.public PhoneInternalInterface.DataActivityState getDataActivityState()
PhoneInternalInterface
TelephonyManager
instead.public void notifyPhoneStateChanged()
PhoneConstants.State
public void notifyPreciseCallStateChanged()
Call.State
. Use this when changes
in the precise call state are needed, else use notifyPhoneStateChanged.public void notifyDisconnect(Connection cn)
public void notifyCallForwardingIndicator()
notifyCallForwardingIndicator
in class Phone
public boolean handlePinMmi(String dialString)
PhoneInternalInterface
dial
is not appropriate).dialString
- the MMI command to be executed.public void setRadioPower(boolean power)
PhoneInternalInterface
PhoneInternalInterface.getServiceState()
.getState()
.
Note: This request is asynchronous.
getServiceState().getState() will not change immediately after this call.
registerForServiceStateChanged() to find out when the
request is complete.power
- true means "on", false means "off".public String getVoiceMailNumber()
PhoneInternalInterface
public String getVoiceMailAlphaTag()
PhoneInternalInterface
Please use this value instead of some other localized string when showing a name for this number in the UI. For example, call log entries should show this alpha tag.
Usage of this alpha tag in the UI is a common carrier requirement.
public String getDeviceId()
PhoneInternalInterface
public String getDeviceSvn()
PhoneInternalInterface
public String getImei()
PhoneInternalInterface
public String getEsn()
PhoneInternalInterface
public String getMeid()
PhoneInternalInterface
public String getSubscriberId()
PhoneInternalInterface
public String getGroupIdLevel1()
PhoneInternalInterface
public String getGroupIdLevel2()
PhoneInternalInterface
public String getIccSerialNumber()
Phone
getIccSerialNumber
in class Phone
public String getLine1Number()
PhoneInternalInterface
#getMsisdn()
will return the MSISDN on CDMA/LTE phones.public String getLine1AlphaTag()
PhoneInternalInterface
public boolean setLine1Number(String alphaTag, String number, Message onComplete)
PhoneInternalInterface
alphaTag
- the alpha tag associated with the MSISDN phone number
(see getMsisdnAlphaTag)number
- the new MSISDN phone number to be set on the SIM.onComplete
- a callback message when the action is completed.public void setVoiceMailNumber(String alphaTag, String voiceMailNumber, Message onComplete)
PhoneInternalInterface
alphaTag
- the alpha tag associated with the voice mail number
(see getVoiceMailAlphaTag)voiceMailNumber
- the new voicemail number to be set on the SIM.onComplete
- a callback message when the action is completed.public boolean getIccRecordsLoaded()
Phone
getSimCard().registerForReady()
for change notification.getIccRecordsLoaded
in class Phone
public IccCard getIccCard()
Phone
getIccCard
in class Phone
public void getAvailableNetworks(Message response)
PhoneInternalInterface
response.obj
is set to an AsyncResult with
one of the following members:.
response.obj.result
will be a List
of
OperatorInfo
objects, orresponse.obj.exception
will be set with an exception
on failure.public void setNetworkSelectionModeAutomatic(Message response)
Phone
setNetworkSelectionModeAutomatic
in class Phone
response
- The message to dispatch when the network selection
is complete.Phone.selectNetworkManually(OperatorInfo, boolean, android.os.Message)
public void selectNetworkManually(OperatorInfo network, boolean persistSelection, Message response)
Phone
response
is
dispatched when this is complete. response.obj
will be
an AsyncResult, and response.obj.exception
will be non-null
on failure.selectNetworkManually
in class Phone
Phone.setNetworkSelectionModeAutomatic(Message)
public void getNeighboringCids(Message response)
PhoneInternalInterface
response
is dispatched when
this is complete. response.obj
will be an AsyncResult,
and response.obj.exception
will be non-null on failure.
On success, AsyncResult.result
will be a String[]
containing the neighboring cell IDs. Index 0 will contain the count
of available cell IDs. Cell IDs are in hexadecimal format.response
- callback message that is dispatched when the query
completes.public void getDataCallList(Message response)
PhoneInternalInterface
response
- On success, "response" bytes is
made available as:
(String[])(((AsyncResult)response.obj).result).
On failure,
(((AsyncResult)response.obj).result) == null and
(((AsyncResult)response.obj).exception) being an instance of
com.android.internal.telephony.gsm.CommandExceptionpublic List<DataConnection> getCurrentDataConnectionList()
public void updateServiceLocation()
PhoneInternalInterface
public void enableLocationUpdates()
PhoneInternalInterface
public void disableLocationUpdates()
PhoneInternalInterface
public boolean getDataRoamingEnabled()
public void setDataRoamingEnabled(boolean enable)
enable
- set true if enable data connection on roamingpublic boolean getDataEnabled()
public void setDataEnabled(boolean enable)
public boolean enableDataConnectivity()
public boolean disableDataConnectivity()
public boolean isDataConnectivityPossible()
Phone
isDataConnectivityPossible
in class Phone
public void saveClirSetting(int commandInterfaceCLIRMode)
Phone
saveClirSetting
in class Phone
public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager()
PhoneInternalInterface
public IccFileHandler getIccFileHandler()
Phone
getIccFileHandler
in class Phone
public void activateCellBroadcastSms(int activate, Message response)
PhoneInternalInterface
activate
- 0 = activate, 1 = deactivateresponse
- Callback message is empty on completionpublic void getCellBroadcastSmsConfig(Message response)
PhoneInternalInterface
response
- Callback message is empty on completionpublic void setCellBroadcastSmsConfig(int[] configValuesArray, Message response)
PhoneInternalInterface
response
- Callback message is empty on completionpublic boolean needsOtaServiceProvisioning()
Phone
needsOtaServiceProvisioning
in class Phone
public LinkProperties getLinkProperties(String apnType)
Phone
getLinkProperties
in class Phone
protected void onUpdateIccAvailability()
onUpdateIccAvailability
in class Phone