public abstract class Phone extends Handler implements PhoneInternalInterface
Handler.Callback
PhoneInternalInterface.DataActivityState, PhoneInternalInterface.SuppService
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
Modifier | Constructor and Description |
---|---|
protected |
Phone(String name,
PhoneNotifier notifier,
Context context,
CommandsInterface ci,
boolean unitTestMode)
Constructs a Phone in normal (non-unit test) mode.
|
protected |
Phone(String name,
PhoneNotifier notifier,
Context context,
CommandsInterface ci,
boolean unitTestMode,
int phoneId,
TelephonyComponentFactory telephonyComponentFactory)
Constructs a Phone in normal (non-unit test) mode.
|
Modifier and Type | Method and Description |
---|---|
void |
callEndCleanupHandOverCallIfAny() |
void |
cancelUSSD() |
void |
carrierActionSetMeteredApnsEnabled(boolean enabled)
Action set from carrier signalling broadcast receivers to enable/disable metered apns.
|
void |
carrierActionSetRadioEnabled(boolean enabled)
Action set from carrier signalling broadcast receivers to enable/disable radio
|
static void |
checkWfcWifiOnlyModeBeforeDial(Phone imsPhone,
Context context) |
protected Connection |
dialInternal(String dialString,
UUSInfo uusInfo,
int videoState,
Bundle intentExtras)
Dials a number.
|
void |
disableDnsCheck(boolean b)
Disables the DNS check (i.e., allows "0.0.0.0").
|
void |
dispose() |
void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
void |
enableEnhancedVoicePrivacy(boolean enable,
Message onComplete)
Enable or disable enhanced Voice Privacy (VP).
|
void |
exitEmergencyCallbackMode()
request to exit emergency call back mode
the caller should use setOnECMModeExitResponse
to receive the emergency callback mode exit response
|
String |
getActionAttached()
Return the ActionAttached string.
|
String |
getActionDetached()
Return the ActionDetached string.
|
String |
getActiveApnHost(String apnType)
Returns string for the active APN host.
|
String[] |
getActiveApnTypes()
Returns an array of string identifiers for the APN types serviced by the
currently active.
|
List<CellInfo> |
getAllCellInfo() |
void |
getAllowedCarriers(Message response)
Get allowed carriers
|
boolean |
getCallForwardingIndicator()
Get voice call forwarding indicator status.
|
CallTracker |
getCallTracker()
Get call tracker
|
CarrierSignalAgent |
getCarrierSignalAgent() |
int |
getCdmaEriIconIndex()
Returns the CDMA ERI icon index to display
|
int |
getCdmaEriIconMode()
Returns the CDMA ERI icon mode,
0 - ON
1 - FLASHING
|
String |
getCdmaEriText()
Returns the CDMA ERI text,
|
String |
getCdmaMin()
Retrieves the MIN for CDMA phones.
|
String |
getCdmaPrlVersion()
Retrieves PRL Version for CDMA phones
|
Context |
getContext()
Gets the context for the phone, as set at initialization time.
|
Uri[] |
getCurrentSubscriberUris()
SIP URIs aliased to the current subscriber given by the IMS implementation.
|
IccCardApplicationStatus.AppType |
getCurrentUiccAppType() |
PhoneConstants.DataState |
getDataConnectionState()
Get the current for the default apn DataState.
|
Phone |
getDefaultPhone()
This function returns the parent phone of the current phone.
|
void |
getEnhancedVoicePrivacy(Message onComplete)
Get the currently set Voice Privacy (VP) mode.
|
String |
getFullIccSerialNumber()
Retrieves the full serial number of the ICC (including hex digits), if applicable.
|
Handler |
getHandler() |
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
|
IccRecords |
getIccRecords() |
boolean |
getIccRecordsLoaded()
Returns SIM record load state.
|
String |
getIccSerialNumber()
Retrieves the serial number of the ICC, if applicable.
|
IccSmsInterfaceManager |
getIccSmsInterfaceManager() |
Phone |
getImsPhone()
Return an instance of a IMS phone
|
IsimRecords |
getIsimRecords()
Return an interface to retrieve the ISIM records for IMS, if available.
|
int |
getLceStatus()
Returns the status of Link Capacity Estimation (LCE) service.
|
LinkProperties |
getLinkProperties(String apnType)
Return the LinkProperties for the named apn or null if not available
|
Locale |
getLocaleFromSimAndCarrierPrefs()
Returns the locale based on the carrier properties (such as
ro.carrier ) and
SIM preferences. |
int |
getLteOnCdmaMode()
Return if the current radio is LTE on CDMA.
|
boolean |
getMessageWaitingIndicator()
Get voice message waiting indicator status.
|
void |
getModemActivityInfo(Message response)
Returns the modem activity information
|
String |
getModemUuId()
Get the associated data modems Id.
|
String |
getMsisdn()
Retrieves the MSISDN from the UICC.
|
String |
getNai()
Retrieves Nai for phones.
|
NetworkCapabilities |
getNetworkCapabilities(String apnType)
Return the NetworkCapabilities
|
void |
getNetworkSelectionMode(Message message)
Query the radio for the current network selection mode.
|
String[] |
getPcscfAddress(String apnType)
Get P-CSCF address from PCO after data connection is established or modified.
|
int |
getPhoneId()
Returns the phone id.
|
String |
getPhoneName()
Returns a string identifier for this phone interface for parties
outside the phone app process.
|
abstract int |
getPhoneType()
Return a numerical identifier for the phone radio interface.
|
Registrant |
getPostDialHandler() |
void |
getPreferredNetworkType(Message response)
Query the preferred network type setting
|
int |
getRadioAccessFamily()
Get phone radio access family
|
RadioCapability |
getRadioCapability()
Get phone radio capability
|
ServiceStateTracker |
getServiceStateTracker()
Retrieves the ServiceStateTracker of the phone instance.
|
SignalStrength |
getSignalStrength()
Get current signal strength.
|
SimulatedRadioControl |
getSimulatedRadioControl()
If this is a simulated phone interface, returns a SimulatedRadioControl.
|
void |
getSmscAddress(Message result)
Gets the default SMSC address.
|
abstract PhoneConstants.State |
getState()
Get current coarse-grained voice call state.
|
protected int |
getStoredVoiceMessageCount()
gets the voice mail count from preferences
|
int |
getSubId() |
String |
getSystemProperty(String property,
String defValue)
Set a system property, unless we're in unit test mode
|
UiccCard |
getUiccCard()
Gets the Uicc card corresponding to this phone.
|
boolean |
getUnitTestMode() |
UsimServiceTable |
getUsimServiceTable()
Gets the USIM service table from the UICC, if present and available.
|
int |
getVoiceMessageCount()
Returns unread voicemail count.
|
int |
getVoicePhoneServiceState()
Return the service state of mImsPhone if it is STATE_IN_SERVICE
otherwise return the current voice service state
|
long |
getVtDataUsage() |
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 |
hasMatchedTetherApnSetting()
Check if TETHER_DUN_APN setting or config_tether_apndata includes APN that matches
current operator.
|
void |
invokeOemRilRequestRaw(byte[] data,
Message response)
Invokes RIL_REQUEST_OEM_HOOK_RAW on RIL implementation.
|
void |
invokeOemRilRequestStrings(String[] strings,
Message response)
Invokes RIL_REQUEST_OEM_HOOK_Strings on RIL implementation.
|
boolean |
isCspPlmnEnabled()
TODO: Adding a function for each property is not good.
|
boolean |
isDataConnectivityPossible()
Report on whether data connectivity is allowed.
|
boolean |
isDataConnectivityPossible(String apnType)
Report on whether data connectivity is allowed for an APN.
|
boolean |
isDnsCheckDisabled()
Returns true if the DNS check is currently disabled.
|
boolean |
isImsRegistered()
Query the IMS Registration Status.
|
boolean |
isImsUseEnabled()
Determines if IMS is enabled for call.
|
boolean |
isInEcm() |
boolean |
isInEmergencyCall() |
protected boolean |
isMatchGid(String gid) |
boolean |
isMccMncMarkedAsNonRoaming(String mccMnc) |
boolean |
isMccMncMarkedAsRoaming(String mccMnc) |
boolean |
isMinInfoReady()
Check if subscription data has been assigned to mMin
return true if MIN info is ready; false otherwise.
|
boolean |
isOtaSpNumber(String dialStr)
this decides if the dial number is OTA(Over the air provision) number or not
|
boolean |
isRadioAvailable()
Is Radio Present on the device and is it accessible
|
boolean |
isRadioOn()
Is Radio turned on
|
boolean |
isShuttingDown()
Return true if the device is shutting down.
|
boolean |
isSidMarkedAsNonRoaming(int SID) |
boolean |
isSidMarkedAsRoaming(int SID) |
boolean |
isUtEnabled()
Return if UT capability of ImsPhone is enabled or not
|
boolean |
isVideoCallPresent() |
boolean |
isVideoEnabled()
Determines if video calling is enabled for the phone.
|
boolean |
isVolteEnabled()
Get Volte Feature Availability
|
boolean |
isWifiCallingEnabled()
Get Wifi Calling Feature Availability
|
protected void |
migrate(RegistrantList to,
RegistrantList from) |
protected void |
migrateFrom(Phone from) |
boolean |
needsOtaServiceProvisioning()
Returns true if OTA Service Provisioning needs to be performed.
|
void |
notifyCallForwardingIndicator() |
void |
notifyCellInfo(List<CellInfo> cellInfo) |
void |
notifyDataActivity() |
void |
notifyDataConnection(String reason) |
void |
notifyDataConnection(String reason,
String apnType) |
void |
notifyDataConnection(String reason,
String apnType,
PhoneConstants.DataState state) |
void |
notifyDataConnectionFailed(String reason,
String apnType) |
protected void |
notifyDisconnectP(Connection cn)
To be invoked when a voice call Connection disconnects.
|
void |
notifyForVideoCapabilityChanged(boolean isVideoCallCapable)
Notify registrants if phone is video capable.
|
void |
notifyHandoverStateChanged(Connection cn)
Subclasses of Phone probably want to replace this with a
version scoped to their packages
|
void |
notifyNewRingingConnectionP(Connection cn)
Notify registrants of a new ringing Connection.
|
void |
notifyOtaspChanged(int otaspMode) |
protected void |
notifyPreciseCallStateChangedP()
Subclasses of Phone probably want to replace this with a
version scoped to their packages
|
void |
notifyPreciseDataConnectionFailed(String reason,
String apnType,
String apn,
String failCause) |
protected void |
notifyServiceStateChangedP(ServiceState ss)
Subclasses of Phone probably want to replace this with a
version scoped to their packages
|
void |
notifySignalStrength() |
void |
notifySrvccState(Call.SrvccState state) |
void |
notifyUnknownConnectionP(Connection cn)
Notify registrants of a new unknown connection.
|
void |
notifyVoLteServiceStateChanged(VoLteServiceState lteState) |
void |
nvReadItem(int itemID,
Message response)
Read one of the NV items defined in
RadioNVItems / ril_nv_items.h . |
void |
nvResetConfig(int resetType,
Message response)
Perform the specified type of NV config reset.
|
void |
nvWriteCdmaPrl(byte[] preferredRoamingList,
Message response)
Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
|
void |
nvWriteItem(int itemID,
String itemValue,
Message response)
Write one of the NV items defined in
RadioNVItems / ril_nv_items.h . |
protected abstract void |
onUpdateIccAvailability() |
void |
queryAvailableBandMode(Message response)
Query the list of band mode supported by RF.
|
void |
queryCdmaRoamingPreference(Message response)
Query the CDMA roaming preference setting
|
void |
queryTTYMode(Message onComplete)
queryTTYMode
query the status of the TTY mode
|
void |
radioCapabilityUpdated(RadioCapability rc)
The RadioCapability has changed.
|
void |
registerForAllDataDisconnected(Handler h,
int what,
Object obj) |
void |
registerForCallWaiting(Handler h,
int what,
Object obj)
Register for notifications when CDMA call waiting comes
|
void |
registerForCdmaOtaStatusChange(Handler h,
int what,
Object obj)
Register for notifications when CDMA OTA Provision status change
|
void |
registerForDataEnabledChanged(Handler h,
int what,
Object obj) |
void |
registerForDisconnect(Handler h,
int what,
Object obj)
Notifies when a voice connection has disconnected, either due to local
or remote hangup or error.
|
void |
registerForDisplayInfo(Handler h,
int what,
Object obj)
Register for display information notifications from the network.
|
void |
registerForEcmTimerReset(Handler h,
int what,
Object obj)
Registration point for Ecm timer reset
|
void |
registerForEmergencyCallToggle(Handler h,
int what,
Object obj)
Registration point for emergency call/callback mode start.
|
void |
registerForHandoverStateChanged(Handler h,
int what,
Object obj)
Notifies when a Handover happens due to SRVCC or Silent Redial
|
void |
registerForInCallVoicePrivacyOff(Handler h,
int what,
Object obj)
Register for notifications when a sInCall VoicePrivacy is disabled
|
void |
registerForInCallVoicePrivacyOn(Handler h,
int what,
Object obj)
Register for notifications when a sInCall VoicePrivacy is enabled
|
void |
registerForIncomingRing(Handler h,
int what,
Object obj)
Notifies when an incoming call rings.
|
void |
registerForLineControlInfo(Handler h,
int what,
Object obj)
Register for CDMA line control information record notification
from the network.
|
void |
registerForMmiComplete(Handler h,
int what,
Object obj)
Register for notifications that an MMI request has completed
its network activity and is in its final state.
|
void |
registerForMmiInitiate(Handler h,
int what,
Object obj)
Register for notifications of initiation of a new MMI code request.
|
void |
registerForNewRingingConnection(Handler h,
int what,
Object obj)
Notifies when a new ringing or waiting connection has appeared.
|
void |
registerForNumberInfo(Handler h,
int what,
Object obj)
Register for CDMA number information record notification from the network.
|
void |
registerForOnHoldTone(Handler h,
int what,
Object obj)
Notifies when out-band on-hold tone is needed.
|
void |
registerForPreciseCallStateChanged(Handler h,
int what,
Object obj)
Register for getting notifications for change in the Call State
Call.State
This is called PreciseCallState because the call state is more precise than the
PhoneConstants.State which can be obtained using the PhoneStateListener
Resulting events will have an AsyncResult in Message.obj . |
void |
registerForRadioCapabilityChanged(Handler h,
int what,
Object obj)
Registers the handler when phone radio capability is changed.
|
void |
registerForRadioOffOrNotAvailable(Handler h,
int what,
Object obj)
Register for radio off or not available
|
void |
registerForRedirectedNumberInfo(Handler h,
int what,
Object obj)
Register for CDMA redirected number information record notification
from the network.
|
void |
registerForResendIncallMute(Handler h,
int what,
Object obj)
Registers the handler to reset the uplink mute state to get
uplink audio.
|
void |
registerForRingbackTone(Handler h,
int what,
Object obj)
Notifies when out-band ringback tone is needed.
|
void |
registerForServiceStateChanged(Handler h,
int what,
Object obj)
Register for ServiceState changed.
|
void |
registerForSignalInfo(Handler h,
int what,
Object obj)
Register for signal information notifications from the network.
|
void |
registerForSilentRedial(Handler h,
int what,
Object obj) |
void |
registerForSimRecordsLoaded(Handler h,
int what,
Object obj)
Registration point for Sim records loaded
|
void |
registerForSubscriptionInfoReady(Handler h,
int what,
Object obj)
Registration point for subscription info ready
|
void |
registerForSuppServiceFailed(Handler h,
int what,
Object obj)
Register for notifications when a supplementary service attempt fails.
|
void |
registerForT53AudioControlInfo(Handler h,
int what,
Object obj)
Register for CDMA T53 audio control information record notifications
from the network.
|
void |
registerForTtyModeReceived(Handler h,
int what,
Object obj)
Register for TTY mode change notifications from the network.
|
void |
registerForUnknownConnection(Handler h,
int what,
Object obj)
Notifies when a previously untracked non-ringing/waiting connection has appeared.
|
void |
registerForVideoCapabilityChanged(Handler h,
int what,
Object obj)
Notifies when phone's video capabilities changes
Messages received from this:
Message.obj will be an AsyncResult
AsyncResult.userObj = obj
AsyncResult.result = true if phone supports video calling
|
void |
registerFoT53ClirlInfo(Handler h,
int what,
Object obj)
Register for CDMA T53 CLIR information record notifications
from the network.
|
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 |
sendBurstDtmf(String dtmfString,
int on,
int off,
Message onComplete)
send burst DTMF tone, it can send the string as single character or multiple character
ignore if there is no active call or not valid digits string.
|
abstract void |
sendEmergencyCallStateChange(boolean callActive) |
void |
sendSubscriptionSettings(boolean restoreNetworkSelection) |
void |
setAllowedCarriers(List<CarrierIdentifier> carriers,
Message response)
Set allowed carriers
|
void |
setBandMode(int bandMode,
Message response)
Assign a specified band for RF configuration.
|
abstract void |
setBroadcastEmergencyCallStateChanges(boolean broadcast)
Set boolean broadcastEmergencyCallStateChanges
|
void |
setCdmaRoamingPreference(int cdmaRoamingType,
Message response)
Requests to set the CDMA roaming preference
|
void |
setCdmaSubscription(int cdmaSubscriptionType,
Message response)
Requests to set the CDMA subscription mode
|
void |
setCellInfoListRate(int rateInMillis)
Sets the minimum time in milli-seconds between
PhoneStateListener.onCellInfoChanged will be invoked. |
void |
setEchoSuppressionEnabled()
Enables or disables echo suppression.
|
void |
setImsRegistrationState(boolean registered)
Set IMS registration state
|
void |
setInternalDataEnabled(boolean enable,
Message onCompleteMsg) |
protected void |
setIsInEmergencyCall() |
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 |
setOnPostDialCharacter(Handler h,
int what,
Object obj)
Sets an event to be fired when the telephony system processes
a post-dial character on an outgoing call.
|
boolean |
setOperatorBrandOverride(String brand)
Override the service provider name and the operator name for the current ICCID.
|
protected void |
setPhoneName(String name) |
void |
setPolicyDataEnabled(boolean enabled)
Policy control of data connection.
|
void |
setPreferredNetworkType(int networkType,
Message response)
Requests to set the preferred network type for searching and registering
(CS/PS domain, RAT, and operation mode)
|
protected void |
setPreferredNetworkTypeIfSimLoaded() |
void |
setRadioCapability(RadioCapability rc,
Message response)
Set phone radio capability
|
boolean |
setRoamingOverride(List<String> gsmRoamingList,
List<String> gsmNonRoamingList,
List<String> cdmaRoamingList,
List<String> cdmaNonRoamingList)
Override the roaming indicator for the current ICCID.
|
void |
setSmscAddress(String address,
Message result)
Sets the default SMSC address.
|
void |
setSystemProperty(String property,
String value)
Set a system property, unless we're in unit test mode
|
void |
setTTYMode(int ttyMode,
Message onComplete)
setTTYMode
sets a TTY mode option.
|
void |
setUiTTYMode(int uiTtyMode,
Message onComplete)
setUiTTYMode
sets a TTY mode option.
|
protected void |
setVoiceCallForwardingFlag(IccRecords r,
int line,
boolean enable,
String number) |
void |
setVoiceCallForwardingFlag(int line,
boolean enable,
String number) |
void |
setVoiceMessageCount(int countWaiting)
sets the voice mail count of the phone and notifies listeners.
|
void |
setVoiceMessageWaiting(int line,
int countWaiting)
Sets the SIM voice message waiting indicator records.
|
void |
shutdownRadio()
shutdown Radio gracefully
|
void |
startLceAfterRadioIsAvailable()
Starts LCE service after radio becomes available.
|
void |
startMonitoringImsService()
Start listening for IMS service UP/DOWN events.
|
void |
startRingbackTone() |
void |
stopRingbackTone() |
void |
unregisterForAllDataDisconnected(Handler h) |
void |
unregisterForCallWaiting(Handler h)
Unegister for notifications when CDMA Call waiting comes
|
void |
unregisterForCdmaOtaStatusChange(Handler h)
Unregister for notifications when CDMA OTA Provision status change
|
void |
unregisterForDataEnabledChanged(Handler h) |
void |
unregisterForDisconnect(Handler h)
Unregisters for voice disconnection notification.
|
void |
unregisterForDisplayInfo(Handler h)
Unregisters for display information notifications.
|
void |
unregisterForEcmTimerReset(Handler h)
Unregister for notification for Ecm timer reset
|
void |
unregisterForEmergencyCallToggle(Handler h) |
void |
unregisterForHandoverStateChanged(Handler h)
Unregisters for handover state notifications
|
void |
unregisterForInCallVoicePrivacyOff(Handler h)
Unregister for notifications when a sInCall VoicePrivacy is disabled
|
void |
unregisterForInCallVoicePrivacyOn(Handler h)
Unegister for notifications when a sInCall VoicePrivacy is enabled
|
void |
unregisterForIncomingRing(Handler h)
Unregisters for ring notification.
|
void |
unregisterForLineControlInfo(Handler h)
Unregisters for line control information notifications.
|
void |
unregisterForMmiComplete(Handler h)
Unregisters for MMI complete notification.
|
void |
unregisterForMmiInitiate(Handler h)
Unregisters for new MMI initiate notification.
|
void |
unregisterForNewRingingConnection(Handler h)
Unregisters for new ringing connection notification.
|
void |
unregisterForNumberInfo(Handler h)
Unregisters for number information record notifications.
|
void |
unregisterForOnHoldTone(Handler h)
Unregisters for on-hold tone notification.
|
void |
unregisterForPreciseCallStateChanged(Handler h)
Unregisters for voice call state change notifications.
|
void |
unregisterForRadioCapabilityChanged(Handler h)
Unregister for notifications when phone radio type and access technology is changed.
|
void |
unregisterForRadioOffOrNotAvailable(Handler h)
Unregisters for radio off or not available
|
void |
unregisterForRedirectedNumberInfo(Handler h)
Unregisters for redirected number information record notification.
|
void |
unregisterForResendIncallMute(Handler h)
Unregisters for resend incall mute notifications.
|
void |
unregisterForRingbackTone(Handler h)
Unregisters for ringback tone notification.
|
void |
unregisterForServiceStateChanged(Handler h)
Unregisters for ServiceStateChange notification.
|
void |
unregisterForSignalInfo(Handler h)
Unregisters for signal information notifications.
|
void |
unregisterForSilentRedial(Handler h) |
void |
unregisterForSimRecordsLoaded(Handler h)
Unregister for notifications for Sim records loaded
|
void |
unregisterForSubscriptionInfoReady(Handler h)
Unregister for notifications for subscription info
|
void |
unregisterForSuppServiceFailed(Handler h)
Unregister for notifications when a supplementary service attempt fails.
|
void |
unregisterForT53AudioControlInfo(Handler h)
Unregisters for T53 audio control information record notifications.
|
void |
unregisterForT53ClirInfo(Handler h)
Unregisters for T53 CLIR information record notification
Extraneous calls are tolerated silently
|
void |
unregisterForTtyModeReceived(Handler h)
Unregisters for TTY mode change notifications.
|
void |
unregisterForUnknownConnection(Handler h)
Unregisters for unknown connection notifications.
|
void |
unregisterForVideoCapabilityChanged(Handler h)
Unregisters for video capability changed notification.
|
void |
unsetOnEcbModeExitResponse(Handler h)
Unregisters for exit emergency call back mode request response
|
boolean |
updateCurrentCarrierInProvider() |
void |
updateDataConnectionTracker() |
void |
updatePhoneObject(int voiceRadioTech)
Update the phone object if the voice radio technology has changed
|
void |
updateVoiceMail()
Update voice mail count related fields and notify listeners
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
acceptCall, activateCellBroadcastSms, canConference, canTransfer, clearDisconnected, conference, dial, dial, disableLocationUpdates, enableLocationUpdates, explicitCallTransfer, getAvailableNetworks, getBackgroundCall, getCallForwardingOption, getCallWaiting, getCellBroadcastSmsConfig, getCellLocation, getDataActivityState, getDataCallList, getDataConnectionState, getDataEnabled, getDataRoamingEnabled, getDeviceId, getDeviceSvn, getEsn, getForegroundCall, getGroupIdLevel1, getGroupIdLevel2, getIccPhoneBookInterfaceManager, getImei, getLine1AlphaTag, getLine1Number, getMeid, getMute, getNeighboringCids, getOutgoingCallerIdDisplay, getPendingMmiCodes, getRingingCall, getServiceState, getSubscriberId, getVoiceMailAlphaTag, getVoiceMailNumber, handleInCallMmiCommands, handlePinMmi, registerForSuppServiceNotification, rejectCall, sendDtmf, sendUssdResponse, setCallForwardingOption, setCallWaiting, setCellBroadcastSmsConfig, setDataEnabled, setDataRoamingEnabled, setLine1Number, setMute, setOutgoingCallerIdDisplay, setRadioPower, setVoiceMailNumber, startDtmf, stopDtmf, switchHoldingAndActive, unregisterForSuppServiceNotification, updateServiceLocation
protected static final Object lockForRadioTechnologyChange
public static final String NETWORK_SELECTION_KEY
public static final String NETWORK_SELECTION_NAME_KEY
public static final String NETWORK_SELECTION_SHORT_KEY
public static final String DATA_DISABLED_ON_BOOT_KEY
protected static final int EVENT_RADIO_AVAILABLE
protected static final int EVENT_SSN
protected static final int EVENT_SIM_RECORDS_LOADED
protected static final int EVENT_RADIO_ON
protected static final int EVENT_GET_BASEBAND_VERSION_DONE
protected static final int EVENT_USSD
protected static final int EVENT_RADIO_OFF_OR_NOT_AVAILABLE
protected static final int EVENT_GET_IMEI_DONE
protected static final int EVENT_GET_IMEISV_DONE
protected static final int EVENT_SET_CALL_FORWARD_DONE
protected static final int EVENT_GET_CALL_FORWARD_DONE
protected static final int EVENT_CALL_RING
protected static final int EVENT_SET_CLIR_COMPLETE
protected static final int EVENT_REGISTERED_TO_NETWORK
protected static final int EVENT_SET_VM_NUMBER_DONE
protected static final int EVENT_GET_DEVICE_IDENTITY_DONE
protected static final int EVENT_RUIM_RECORDS_LOADED
protected static final int EVENT_NV_READY
protected static final int EVENT_EMERGENCY_CALLBACK_MODE_ENTER
protected static final int EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE
protected static final int EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED
protected static final int EVENT_SET_NETWORK_AUTOMATIC
protected static final int EVENT_ICC_RECORD_EVENTS
protected static final int EVENT_GET_RADIO_CAPABILITY
protected static final int EVENT_SS
protected static final int EVENT_VOICE_RADIO_TECH_CHANGED
protected static final int EVENT_REQUEST_VOICE_RADIO_TECH_DONE
protected static final int EVENT_RIL_CONNECTED
protected static final int EVENT_UPDATE_PHONE_OBJECT
protected static final int EVENT_CARRIER_CONFIG_CHANGED
protected static final int EVENT_SET_ROAMING_PREFERENCE_DONE
protected static final int EVENT_LAST
public static final String CLIR_KEY
public static final String CF_STATUS
public static final String CF_ID
public CommandsInterface mCi
protected int mVmCount
public DcTracker mDcTracker
protected boolean mIsVideoCapable
protected UiccController mUiccController
protected final AtomicReference<IccRecords> mIccRecords
public SmsStorageMonitor mSmsStorageMonitor
public SmsUsageMonitor mSmsUsageMonitor
protected AtomicReference<UiccCardApplication> mUiccApplication
protected int mPhoneId
protected Phone mImsPhone
protected TelephonyComponentFactory mTelephonyComponentFactory
public static final String CS_FALLBACK
public static final String EXTRA_KEY_ALERT_TITLE
public static final String EXTRA_KEY_ALERT_MESSAGE
public static final String EXTRA_KEY_ALERT_SHOW
public static final String EXTRA_KEY_NOTIFICATION_MESSAGE
protected final RegistrantList mDisconnectRegistrants
protected final RegistrantList mMmiCompleteRegistrants
protected final RegistrantList mMmiRegistrants
protected final RegistrantList mUnknownConnectionRegistrants
protected final RegistrantList mSuppServiceFailedRegistrants
protected final RegistrantList mRadioOffOrNotAvailableRegistrants
protected final RegistrantList mSimRecordsLoadedRegistrants
protected final RegistrantList mEmergencyCallToggledRegistrants
protected Registrant mPostDialHandler
protected final Context mContext
protected PhoneNotifier mNotifier
protected SimulatedRadioControl mSimulatedRadioControl
protected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci, boolean unitTestMode)
notifier
- An instance of DefaultPhoneNotifier,context
- Context object from hosting application
unless unit testing.ci
- is CommandsInterfaceunitTestMode
- when true, prevents notifications
of state change eventsprotected Phone(String name, PhoneNotifier notifier, Context context, CommandsInterface ci, boolean unitTestMode, int phoneId, TelephonyComponentFactory telephonyComponentFactory)
notifier
- An instance of DefaultPhoneNotifier,context
- Context object from hosting application
unless unit testing.ci
- is CommandsInterfaceunitTestMode
- when true, prevents notifications
of state change eventsphoneId
- the phone-id of this phone.public IccRecords getIccRecords()
public String getPhoneName()
protected void setPhoneName(String name)
public String getNai()
public String getActionDetached()
public String getActionAttached()
public void setSystemProperty(String property, String value)
public String getSystemProperty(String property, String defValue)
public void startMonitoringImsService()
public void handleMessage(Message msg)
handleMessage
in class Handler
msg
- public ArrayList<Connection> getHandoverConnection()
public void notifySrvccState(Call.SrvccState state)
public void unregisterForSilentRedial(Handler h)
public Context getContext()
protected abstract void onUpdateIccAvailability()
public void disableDnsCheck(boolean b)
b
- true disables the check, false enables.public boolean isDnsCheckDisabled()
public void registerForPreciseCallStateChanged(Handler h, int what, Object obj)
Call.State
This is called PreciseCallState because the call state is more precise than the
PhoneConstants.State
which can be obtained using the PhoneStateListener
Resulting events will have an AsyncResult in Message.obj
.
AsyncResult.userData will be set to the obj argument here.
The h parameter is held only by a weak reference.public void unregisterForPreciseCallStateChanged(Handler h)
protected void notifyPreciseCallStateChangedP()
public void registerForHandoverStateChanged(Handler h, int what, Object obj)
public void unregisterForHandoverStateChanged(Handler h)
public void notifyHandoverStateChanged(Connection cn)
protected void setIsInEmergencyCall()
protected void migrateFrom(Phone from)
protected void migrate(RegistrantList to, RegistrantList from)
public void registerForUnknownConnection(Handler h, int what, Object obj)
public void unregisterForUnknownConnection(Handler h)
public void registerForNewRingingConnection(Handler h, int what, Object obj)
Messages received from this: Message.obj will be an AsyncResult AsyncResult.userObj = obj AsyncResult.result = a Connection.
Please check Connection.isRinging() to make sure the Connection has not dropped since this message was posted. If Connection.isRinging() is true, then Connection.getCall() == Phone.getRingingCall()
public void unregisterForNewRingingConnection(Handler h)
public void registerForVideoCapabilityChanged(Handler h, int what, Object obj)
Messages received from this: Message.obj will be an AsyncResult AsyncResult.userObj = obj AsyncResult.result = true if phone supports video calling
public void unregisterForVideoCapabilityChanged(Handler h)
public void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForInCallVoicePrivacyOn(Handler h)
h
- Handler to be removed from the registrant list.public void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForInCallVoicePrivacyOff(Handler h)
h
- Handler to be removed from the registrant list.public void registerForIncomingRing(Handler h, int what, Object obj)
Messages received from this: Message.obj will be an AsyncResult AsyncResult.userObj = obj AsyncResult.result = a Connection.
public void unregisterForIncomingRing(Handler h)
public void registerForDisconnect(Handler h, int what, Object obj)
public void unregisterForDisconnect(Handler h)
public void registerForSuppServiceFailed(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForSuppServiceFailed(Handler h)
h
- Handler to be removed from the registrant list.public void registerForMmiInitiate(Handler h, int what, Object obj)
Example: If Phone.dial is called with "*#31#", then the app will be notified here.
The returned Message.obj
will contain an AsyncResult.
obj.result
will be an "MmiCode" object.
public void unregisterForMmiInitiate(Handler h)
public void registerForMmiComplete(Handler h, int what, Object obj)
Message.obj
will contain an AsyncResult.
obj.result
will be an "MmiCode" objectpublic void unregisterForMmiComplete(Handler h)
public void registerForSimRecordsLoaded(Handler h, int what, Object obj)
h
- handler to notifywhat
- what code of message when deliveredobj
- placed in Message.objpublic void unregisterForSimRecordsLoaded(Handler h)
h
- Handler to be removed from the registrant list.public void registerForTtyModeReceived(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForTtyModeReceived(Handler h)
h
- Handler to be removed from the registrant list.public void setNetworkSelectionModeAutomatic(Message response)
response
- The message to dispatch when the network selection
is complete.selectNetworkManually(OperatorInfo, boolean, android.os.Message)
public void getNetworkSelectionMode(Message message)
public void selectNetworkManually(OperatorInfo network, boolean persistSelection, Message response)
response
is
dispatched when this is complete. response.obj
will be
an AsyncResult, and response.obj.exception
will be non-null
on failure.public void registerForEmergencyCallToggle(Handler h, int what, Object obj)
h
- handler to notifywhat
- what code of message when deliveredobj
- placed in Message.obj.userObjpublic void unregisterForEmergencyCallToggle(Handler h)
public void saveClirSetting(int commandInterfaceCLIRMode)
public boolean getUnitTestMode()
protected void notifyDisconnectP(Connection cn)
public void registerForServiceStateChanged(Handler h, int what, Object obj)
public void unregisterForServiceStateChanged(Handler h)
public void registerForRingbackTone(Handler h, int what, Object obj)
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.
public void unregisterForRingbackTone(Handler h)
public void registerForOnHoldTone(Handler h, int what, Object obj)
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.
public void unregisterForOnHoldTone(Handler h)
public void registerForResendIncallMute(Handler h, int what, Object obj)
public void unregisterForResendIncallMute(Handler h)
public void setEchoSuppressionEnabled()
protected void notifyServiceStateChangedP(ServiceState ss)
public SimulatedRadioControl getSimulatedRadioControl()
public abstract PhoneConstants.State getState()
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 IccFileHandler getIccFileHandler()
public Handler getHandler()
public void updatePhoneObject(int voiceRadioTech)
voiceRadioTech
- The new voice radio technologypublic ServiceStateTracker getServiceStateTracker()
public CallTracker getCallTracker()
public void updateVoiceMail()
public IccCardApplicationStatus.AppType getCurrentUiccAppType()
public IccCard getIccCard()
public String getIccSerialNumber()
public String getFullIccSerialNumber()
public boolean getIccRecordsLoaded()
getSimCard().registerForReady()
for change notification.public List<CellInfo> getAllCellInfo()
public void setCellInfoListRate(int rateInMillis)
PhoneStateListener.onCellInfoChanged
will be invoked.
The default, 0, means invoke onCellInfoChanged when any of the reported
information changes. Setting the value to INT_MAX(0x7fffffff) means never issue
A onCellInfoChanged.rateInMillis
- the ratepublic boolean getMessageWaitingIndicator()
public void setVoiceCallForwardingFlag(int line, boolean enable, String number)
protected void setVoiceCallForwardingFlag(IccRecords r, int line, boolean enable, String number)
public boolean getCallForwardingIndicator()
public CarrierSignalAgent getCarrierSignalAgent()
public void queryCdmaRoamingPreference(Message response)
response
- is callback message to report one of CDMA_RM_*public SignalStrength getSignalStrength()
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:
public void setCdmaRoamingPreference(int cdmaRoamingType, Message response)
cdmaRoamingType
- one of CDMA_RM_*response
- is callback messagepublic void setCdmaSubscription(int cdmaSubscriptionType, Message response)
cdmaSubscriptionType
- one of CDMA_SUBSCRIPTION_*response
- is callback messagepublic void setPreferredNetworkType(int networkType, Message response)
networkType
- one of NT_*_TYPEresponse
- is callback messagepublic void getPreferredNetworkType(Message response)
response
- is callback message to report one of NT_*_TYPEpublic void getSmscAddress(Message result)
result
- Callback message contains the SMSC address.public void setSmscAddress(String address, Message result)
address
- new SMSC addressresult
- Callback message is empty on completionpublic void setTTYMode(int ttyMode, Message onComplete)
ttyMode
- is a one of the following:
- PhoneInternalInterface.TTY_MODE_OFF
- PhoneInternalInterface.TTY_MODE_FULL
- PhoneInternalInterface.TTY_MODE_HCO
- PhoneInternalInterface.TTY_MODE_VCO
onComplete
- a callback message when the action is completedpublic void setUiTTYMode(int uiTtyMode, Message onComplete)
ttyMode
- is a one of the following:
- PhoneInternalInterface.TTY_MODE_OFF
- PhoneInternalInterface.TTY_MODE_FULL
- PhoneInternalInterface.TTY_MODE_HCO
- PhoneInternalInterface.TTY_MODE_VCO
onComplete
- a callback message when the action is completedpublic void queryTTYMode(Message onComplete)
onComplete
- a callback message when the action is completed.public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete)
enable
- whether true or false to enable or disable.onComplete
- a callback message when the action is completed.public void getEnhancedVoicePrivacy(Message onComplete)
onComplete
- a callback message when the action is completed.public void setBandMode(int bandMode, Message response)
bandMode
- one of BM_*_BANDresponse
- is callback messagepublic void queryAvailableBandMode(Message response)
response
- is callback message
((AsyncResult)response.obj).result is an int[] where int[0] is
the size of the array and the rest of each element representing
one available BM_*_BANDpublic void invokeOemRilRequestRaw(byte[] data, Message response)
data
- The data for the request.response
- On success,
(byte[])(((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.CommandExceptioninvokeOemRilRequestRaw(byte[], android.os.Message)
public void invokeOemRilRequestStrings(String[] strings, Message response)
strings
- The strings to make available as the request data.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.CommandExceptioninvokeOemRilRequestStrings(java.lang.String[], android.os.Message)
public void nvReadItem(int itemID, Message response)
RadioNVItems
/ ril_nv_items.h
.
Used for device configuration by some CDMA operators.itemID
- the ID of the item to readresponse
- callback message with the String response in the obj fieldpublic void nvWriteItem(int itemID, String itemValue, Message response)
RadioNVItems
/ ril_nv_items.h
.
Used for device configuration by some CDMA operators.itemID
- the ID of the item to readitemValue
- the value to write, as a Stringresponse
- Callback message.public void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response)
preferredRoamingList
- byte array containing the new PRLresponse
- Callback message.public void nvResetConfig(int resetType, Message response)
resetType
- reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV resetresponse
- Callback message.public void notifyDataActivity()
public void notifyDataConnection(String reason, String apnType, PhoneConstants.DataState state)
public void notifyDataConnection(String reason)
public void notifyOtaspChanged(int otaspMode)
public void notifySignalStrength()
public void notifyVoLteServiceStateChanged(VoLteServiceState lteState)
public boolean isInEmergencyCall()
public boolean isInEcm()
true
if we are in emergency call back mode. This is a period where the phone
should be using as little power as possible and be ready to receive an incoming call from the
emergency operator.public boolean isVideoCallPresent()
true
if video call is present, false otherwise.public abstract int getPhoneType()
public int getVoiceMessageCount()
public void setVoiceMessageCount(int countWaiting)
protected int getStoredVoiceMessageCount()
public int getCdmaEriIconIndex()
public int getCdmaEriIconMode()
public String getCdmaEriText()
public String getCdmaMin()
public boolean isMinInfoReady()
public String getCdmaPrlVersion()
public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete)
dtmfString
- is string representing the dialing digit(s) in the active callon
- the DTMF ON length in milliseconds, or 0 for defaultoff
- the DTMF OFF length in milliseconds, or 0 for defaultonComplete
- is the callback message when the action is processed by BPpublic void setOnPostDialCharacter(Handler h, int what, Object obj)
Messages of type what
will be sent to h
.
The obj
field of these Message's will be instances of
AsyncResult
. Message.obj.result
will be
a Connection object.
Message.arg1 will be the post dial character being processed, or 0 ('\0') if end of string.
If Connection.getPostDialState() == WAIT,
the application must call
Connection.proceedAfterWaitChar()
or
Connection.cancelPostDial()
for the telephony system to continue playing the post-dial
DTMF sequence.
If Connection.getPostDialState() == WILD,
the application must call
Connection.proceedAfterWildChar()
or
Connection.cancelPostDial()
for the telephony system to continue playing the
post-dial DTMF sequence.
Only one post dial character handler may be set.
Calling this method with "h" equal to null unsets this handler.
public Registrant getPostDialHandler()
public void exitEmergencyCallbackMode()
public void registerForCdmaOtaStatusChange(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForCdmaOtaStatusChange(Handler h)
h
- Handler to be removed from the registrant list.public void registerForSubscriptionInfoReady(Handler h, int what, Object obj)
h
- handler to notifywhat
- what code of message when deliveredobj
- placed in Message.objpublic void unregisterForSubscriptionInfoReady(Handler h)
h
- Handler to be removed from the registrant list.public boolean needsOtaServiceProvisioning()
public boolean isOtaSpNumber(String dialStr)
dialStr
- is string representing the dialing digit(s)public void registerForCallWaiting(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForCallWaiting(Handler h)
h
- Handler to be removed from the registrant list.public void registerForEcmTimerReset(Handler h, int what, Object obj)
h
- handler to notifywhat
- user-defined message codeobj
- placed in Message.objpublic void unregisterForEcmTimerReset(Handler h)
h
- Handler to be removed from the registrant list.public void registerForSignalInfo(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForSignalInfo(Handler h)
h
- Handler to be removed from the registrant list.public void registerForDisplayInfo(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForDisplayInfo(Handler h)
h
- Handler to be removed from the registrant list.public void registerForNumberInfo(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForNumberInfo(Handler h)
h
- Handler to be removed from the registrant list.public void registerForRedirectedNumberInfo(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForRedirectedNumberInfo(Handler h)
h
- Handler to be removed from the registrant list.public void registerForLineControlInfo(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForLineControlInfo(Handler h)
h
- Handler to be removed from the registrant list.public void registerFoT53ClirlInfo(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForT53ClirInfo(Handler h)
h
- Handler to be removed from the registrant list.public void registerForT53AudioControlInfo(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForT53AudioControlInfo(Handler h)
h
- Handler to be removed from the registrant list.public void setOnEcbModeExitResponse(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unsetOnEcbModeExitResponse(Handler h)
h
- Handler to be removed from the registrant list.public void registerForRadioOffOrNotAvailable(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForRadioOffOrNotAvailable(Handler h)
h
- Handler to be removed from the registrant list.public String[] getActiveApnTypes()
public boolean hasMatchedTetherApnSetting()
public String getActiveApnHost(String apnType)
public LinkProperties getLinkProperties(String apnType)
public NetworkCapabilities getNetworkCapabilities(String apnType)
public boolean isDataConnectivityPossible()
public boolean isDataConnectivityPossible(String apnType)
public void carrierActionSetMeteredApnsEnabled(boolean enabled)
public void carrierActionSetRadioEnabled(boolean enabled)
public void notifyNewRingingConnectionP(Connection cn)
public void notifyUnknownConnectionP(Connection cn)
public void notifyForVideoCapabilityChanged(boolean isVideoCallCapable)
public boolean isCspPlmnEnabled()
public IsimRecords getIsimRecords()
public String getMsisdn()
PhoneInternalInterface.getLine1Number()
. For CDMA phones, PhoneInternalInterface.getLine1Number()
returns
the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones.public PhoneConstants.DataState getDataConnectionState()
PhoneStateListener
instead.public void notifyCallForwardingIndicator()
public void notifyPreciseDataConnectionFailed(String reason, String apnType, String apn, String failCause)
public int getLteOnCdmaMode()
public void setVoiceMessageWaiting(int line, int countWaiting)
line
- GSM Subscriber Profile Number, one-based. Only '1' is supportedcountWaiting
- The number of messages waiting, if known. Use
-1 to indicate that an unknown number of
messages are waitingpublic UsimServiceTable getUsimServiceTable()
public UiccCard getUiccCard()
public String[] getPcscfAddress(String apnType)
apnType
- the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APNpublic void setImsRegistrationState(boolean registered)
public Phone getImsPhone()
public boolean isUtEnabled()
public void dispose()
protected Connection dialInternal(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras) throws CallStateException
dialString
- The number to dial.uusInfo
- The UUSInfo.videoState
- The video state for the call.intentExtras
- Extras from the original CALL intent.CallStateException
public int getSubId()
public int getPhoneId()
public int getVoicePhoneServiceState()
public boolean setOperatorBrandOverride(String brand)
public boolean setRoamingOverride(List<String> gsmRoamingList, List<String> gsmNonRoamingList, List<String> cdmaRoamingList, List<String> cdmaNonRoamingList)
public boolean isMccMncMarkedAsRoaming(String mccMnc)
public boolean isMccMncMarkedAsNonRoaming(String mccMnc)
public boolean isSidMarkedAsRoaming(int SID)
public boolean isSidMarkedAsNonRoaming(int SID)
public boolean isImsRegistered()
public boolean isWifiCallingEnabled()
public boolean isVolteEnabled()
public boolean isRadioAvailable()
public boolean isRadioOn()
public void shutdownRadio()
public boolean isShuttingDown()
public void setRadioCapability(RadioCapability rc, Message response)
rc
- the phone radio capability defined in
RadioCapability. It's a input object used to transfer parameter to logic modemresponse
- Callback message.public int getRadioAccessFamily()
public String getModemUuId()
public RadioCapability getRadioCapability()
public void radioCapabilityUpdated(RadioCapability rc)
rc
- the phone radio capability currently in effect for this phone.public void sendSubscriptionSettings(boolean restoreNetworkSelection)
protected void setPreferredNetworkTypeIfSimLoaded()
public void registerForRadioCapabilityChanged(Handler h, int what, Object obj)
h
- Handler for notification message.what
- User-defined message code.obj
- User object.public void unregisterForRadioCapabilityChanged(Handler h)
h
- Handler to be removed from the registrant list.public boolean isImsUseEnabled()
true
if IMS calling is enabled.public boolean isVideoEnabled()
true
if video calling is enabled, false
otherwise.public int getLceStatus()
public void getModemActivityInfo(Message response)
public void startLceAfterRadioIsAvailable()
public void setAllowedCarriers(List<CarrierIdentifier> carriers, Message response)
public void getAllowedCarriers(Message response)
public Locale getLocaleFromSimAndCarrierPrefs()
ro.carrier
) and
SIM preferences.public void updateDataConnectionTracker()
public void setInternalDataEnabled(boolean enable, Message onCompleteMsg)
public boolean updateCurrentCarrierInProvider()
public void registerForAllDataDisconnected(Handler h, int what, Object obj)
public void unregisterForAllDataDisconnected(Handler h)
public void registerForDataEnabledChanged(Handler h, int what, Object obj)
public void unregisterForDataEnabledChanged(Handler h)
public IccSmsInterfaceManager getIccSmsInterfaceManager()
protected boolean isMatchGid(String gid)
public static void checkWfcWifiOnlyModeBeforeDial(Phone imsPhone, Context context) throws CallStateException
CallStateException
public void startRingbackTone()
public void stopRingbackTone()
public void callEndCleanupHandOverCallIfAny()
public void cancelUSSD()
public abstract void setBroadcastEmergencyCallStateChanges(boolean broadcast)
public abstract void sendEmergencyCallStateChange(boolean callActive)
public Phone getDefaultPhone()
public long getVtDataUsage()
public void setPolicyDataEnabled(boolean enabled)
enabled
- True if enabling the data, otherwise disabling.public Uri[] getCurrentSubscriberUris()
public void dump(FileDescriptor fd, PrintWriter pw, String[] args)