public class SipPhone 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
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.
|
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.
|
void |
conference(Call that) |
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.
|
boolean |
enableDataConnectivity() |
void |
enableLocationUpdates()
Enable location update notifications.
|
boolean |
equals(Object o)
Indicates whether some other object is "equal to" this one.
|
boolean |
equals(SipPhone phone) |
void |
explicitCallTransfer()
Connects the two calls and disconnects the subscriber from both calls
Explicit Call Transfer occurs asynchronously
and may fail.
|
void |
getAvailableNetworks(Message response)
Scan available networks.
|
Call |
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).
|
boolean |
getCallForwardingIndicator()
Get voice call forwarding indicator status.
|
void |
getCallForwardingOption(int commandInterfaceCFReason,
Message onComplete)
getCallForwardingOptions
gets a call forwarding option.
|
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() |
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() |
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.
|
Call |
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.
|
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.
|
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 MmiCode> |
getPendingMmiCodes()
Returns a list of MMI codes that are pending.
|
int |
getPhoneType()
Return a numerical identifier for the phone radio interface.
|
Call |
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.
|
String |
getSipUri() |
PhoneConstants.State |
getState()
Get current coarse-grained voice call state.
|
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.
|
boolean |
handleInCallMmiCommands(String dialString)
Handles in-call MMI commands.
|
boolean |
handlePinMmi(String dialString)
Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
without SEND (so
dial is not appropriate). |
static String |
hidePii(String s) |
boolean |
isDataConnectivityPossible()
Report on whether data connectivity is allowed.
|
boolean |
isVideoEnabled()
Determines if video calling is enabled.
|
boolean |
needsOtaServiceProvisioning()
Returns true if OTA Service Provisioning needs to be performed.
|
void |
notifyCallForwardingIndicator() |
protected void |
onUpdateIccAvailability() |
void |
registerForRingbackTone(Handler h,
int what,
Object obj)
Notifies when out-band ringback tone is needed.
|
void |
registerForSuppServiceNotification(Handler h,
int what,
Object obj)
Register for Supplementary Service 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 |
sendBurstDtmf(String dtmfString) |
void |
sendDtmf(char c)
Play a DTMF tone on the active call.
|
void |
sendEmergencyCallStateChange(boolean callActive) |
void |
sendUssdResponse(String ussdMessge)
Sends user response to a USSD REQUEST message.
|
void |
setBroadcastEmergencyCallStateChanges(boolean broadcast)
Set boolean broadcastEmergencyCallStateChanges
|
void |
setCallForwardingOption(int commandInterfaceCFAction,
int commandInterfaceCFReason,
String dialingNumber,
int timerSeconds,
Message onComplete)
setCallForwardingOptions
sets a call forwarding option.
|
void |
setCallWaiting(boolean enable,
Message onComplete)
setCallWaiting
sets a call forwarding option.
|
void |
setCellBroadcastSmsConfig(int[] configValuesArray,
Message response)
Configure cell broadcast SMS.
|
void |
setDataEnabled(boolean enable) |
void |
setDataRoamingEnabled(boolean enable) |
void |
setEchoSuppressionEnabled()
Enables or disables echo suppression.
|
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 |
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.
|
void |
setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode,
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 |
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.
|
void |
startRingbackTone() |
void |
stopDtmf()
Stop the playing DTMF tone.
|
void |
stopRingbackTone() |
void |
switchHoldingAndActive()
Places any active calls on hold, and makes any held calls
active.
|
Connection |
takeIncomingCall(Object incomingCall) |
void |
unregisterForRingbackTone(Handler h)
Unregisters for ringback tone notification.
|
void |
unregisterForSuppServiceNotification(Handler h)
Unregisters for Supplementary Service notifications.
|
void |
updateServiceLocation()
Update the ServiceState CellLocation for current network registration.
|
callEndCleanupHandOverCallIfAny, cancelUSSD, carrierActionSetMeteredApnsEnabled, carrierActionSetRadioEnabled, checkWfcWifiOnlyModeBeforeDial, dialInternal, disableDnsCheck, dispose, dump, enableEnhancedVoicePrivacy, exitEmergencyCallbackMode, getActionAttached, getActionDetached, getActiveApnHost, getActiveApnTypes, getAllCellInfo, getAllowedCarriers, getCallTracker, getCarrierSignalAgent, getCdmaEriIconIndex, getCdmaEriIconMode, getCdmaEriText, getCdmaMin, getCdmaPrlVersion, getContext, getCurrentSubscriberUris, getCurrentUiccAppType, getDefaultPhone, getEnhancedVoicePrivacy, getFullIccSerialNumber, getHandler, getHandoverConnection, getIccRecords, getIccSmsInterfaceManager, getImsPhone, getIsimRecords, getLceStatus, getLocaleFromSimAndCarrierPrefs, getLteOnCdmaMode, getModemActivityInfo, getModemUuId, getMsisdn, getNai, getNetworkCapabilities, getNetworkSelectionMode, getPcscfAddress, getPhoneId, getPhoneName, getPostDialHandler, getPreferredNetworkType, getRadioAccessFamily, getRadioCapability, getServiceStateTracker, getSimulatedRadioControl, getSmscAddress, getStoredVoiceMessageCount, getSubId, getSystemProperty, getUiccCard, getUnitTestMode, getUsimServiceTable, getVoiceMessageCount, getVoicePhoneServiceState, getVtDataUsage, handleMessage, hasMatchedTetherApnSetting, invokeOemRilRequestRaw, invokeOemRilRequestStrings, isCspPlmnEnabled, isDataConnectivityPossible, isDnsCheckDisabled, isImsRegistered, isImsUseEnabled, isInEcm, isInEmergencyCall, isMatchGid, isMccMncMarkedAsNonRoaming, isMccMncMarkedAsRoaming, isMinInfoReady, isOtaSpNumber, isRadioAvailable, isRadioOn, isShuttingDown, isSidMarkedAsNonRoaming, isSidMarkedAsRoaming, isUtEnabled, isVideoCallPresent, isVolteEnabled, isWifiCallingEnabled, migrate, migrateFrom, notifyCellInfo, notifyDataActivity, notifyDataConnection, notifyDataConnection, notifyDataConnection, notifyDataConnectionFailed, notifyDisconnectP, notifyForVideoCapabilityChanged, notifyHandoverStateChanged, notifyNewRingingConnectionP, notifyOtaspChanged, notifyPreciseCallStateChangedP, notifyPreciseDataConnectionFailed, notifyServiceStateChangedP, notifySignalStrength, notifySrvccState, 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, registerForOnHoldTone, registerForPreciseCallStateChanged, registerForRadioCapabilityChanged, registerForRadioOffOrNotAvailable, registerForRedirectedNumberInfo, registerForResendIncallMute, registerForServiceStateChanged, registerForSignalInfo, registerForSilentRedial, registerForSimRecordsLoaded, registerForSubscriptionInfoReady, registerForSuppServiceFailed, registerForT53AudioControlInfo, registerForTtyModeReceived, registerForUnknownConnection, registerForVideoCapabilityChanged, registerFoT53ClirlInfo, sendBurstDtmf, sendSubscriptionSettings, setAllowedCarriers, setBandMode, setCdmaRoamingPreference, setCdmaSubscription, setCellInfoListRate, setImsRegistrationState, setInternalDataEnabled, setIsInEmergencyCall, setOnEcbModeExitResponse, setOperatorBrandOverride, setPhoneName, setPolicyDataEnabled, setPreferredNetworkType, setPreferredNetworkTypeIfSimLoaded, setRadioCapability, setRoamingOverride, setSmscAddress, setSystemProperty, setTTYMode, setUiTTYMode, setVoiceCallForwardingFlag, setVoiceCallForwardingFlag, setVoiceMessageCount, setVoiceMessageWaiting, shutdownRadio, startLceAfterRadioIsAvailable, startMonitoringImsService, unregisterForAllDataDisconnected, unregisterForCallWaiting, unregisterForCdmaOtaStatusChange, unregisterForDataEnabledChanged, unregisterForDisconnect, unregisterForDisplayInfo, unregisterForEcmTimerReset, unregisterForEmergencyCallToggle, unregisterForHandoverStateChanged, unregisterForInCallVoicePrivacyOff, unregisterForInCallVoicePrivacyOn, unregisterForIncomingRing, unregisterForLineControlInfo, unregisterForMmiComplete, unregisterForMmiInitiate, unregisterForNewRingingConnection, unregisterForNumberInfo, unregisterForOnHoldTone, unregisterForPreciseCallStateChanged, unregisterForRadioCapabilityChanged, unregisterForRadioOffOrNotAvailable, unregisterForRedirectedNumberInfo, unregisterForResendIncallMute, unregisterForServiceStateChanged, unregisterForSignalInfo, unregisterForSilentRedial, unregisterForSimRecordsLoaded, unregisterForSubscriptionInfoReady, unregisterForSuppServiceFailed, unregisterForT53AudioControlInfo, unregisterForT53ClirInfo, unregisterForTtyModeReceived, unregisterForUnknownConnection, unregisterForVideoCapabilityChanged, unsetOnEcbModeExitResponse, 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 boolean equals(Object o)
Object
The equals
method implements an equivalence relation
on non-null object references:
x
, x.equals(x)
should return
true
.
x
and y
, x.equals(y)
should return true
if and only if
y.equals(x)
returns true
.
x
, y
, and z
, if
x.equals(y)
returns true
and
y.equals(z)
returns true
, then
x.equals(z)
should return true
.
x
and y
, multiple invocations of
x.equals(y)
consistently return true
or consistently return false
, provided no
information used in equals
comparisons on the
objects is modified.
x
,
x.equals(null)
should return false
.
The equals
method for class Object
implements
the most discriminating possible equivalence relation on objects;
that is, for any non-null reference values x
and
y
, this method returns true
if and only
if x
and y
refer to the same object
(x == y
has the value true
).
Note that it is generally necessary to override the hashCode
method whenever this method is overridden, so as to maintain the
general contract for the hashCode
method, which states
that equal objects must have equal hash codes.
equals
in class Object
o
- the reference object with which to compare.true
if this object is the same as the obj
argument; false
otherwise.Object.hashCode()
,
HashMap
public String getSipUri()
public boolean equals(SipPhone phone)
public Connection takeIncomingCall(Object incomingCall)
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 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 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 void conference() throws CallStateException
PhoneInternalInterface
registerForPreciseCallStateChanged()
.CallStateException
- if canConference() would return false.
In these cases, this operation may not be performed.public void conference(Call that) throws CallStateException
CallStateException
public boolean canTransfer()
PhoneInternalInterface
public void explicitCallTransfer()
PhoneInternalInterface
registerForPreciseCallStateChanged()
.public void clearDisconnected()
PhoneInternalInterface
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 sendBurstDtmf(String dtmfString)
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 commandInterfaceCLIRMode, Message onComplete)
PhoneInternalInterface
setOutgoingCallerIdDisplay
in interface PhoneInternalInterface
commandInterfaceCLIRMode
- 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 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 setEchoSuppressionEnabled()
Phone
setEchoSuppressionEnabled
in class Phone
public void setMute(boolean muted)
PhoneInternalInterface
muted
- true to mute the microphone,
false to activate the microphone.public boolean getMute()
PhoneInternalInterface
registerForPreciseCallStateChanged()
as a change notifcation, although presently phone state changed is not
fired when setMute() is called.public Call 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()
.
getForegroundCall
in interface PhoneInternalInterface
public Call 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()
.
getBackgroundCall
in interface PhoneInternalInterface
public Call 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()
.
getRingingCall
in interface PhoneInternalInterface
public ServiceState getServiceState()
PhoneInternalInterface
registerForServiceStateChanged
to be informed of
updates.getServiceState
in interface PhoneInternalInterface
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 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 CellLocation getCellLocation()
PhoneInternalInterface
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 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 List<? extends MmiCode> getPendingMmiCodes()
PhoneInternalInterface
registerForMmiInitiate
and registerForMmiComplete
for change notification.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 notifyCallForwardingIndicator()
notifyCallForwardingIndicator
in class Phone
public boolean canDial()
public boolean handleInCallMmiCommands(String dialString)
PhoneInternalInterface
dialString
- the MMI command to be executed.public boolean handlePinMmi(String dialString)
PhoneInternalInterface
dial
is not appropriate).dialString
- the MMI command to be executed.public void sendUssdResponse(String ussdMessge)
PhoneInternalInterface
ussdMessge
- Message to send in the response.public void registerForSuppServiceNotification(Handler h, int what, Object obj)
PhoneInternalInterface
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForSuppServiceNotification(Handler h)
PhoneInternalInterface
h
- Handler to be removed from the registrant list.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 void getCallForwardingOption(int commandInterfaceCFReason, Message onComplete)
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
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 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 setOnPostDialCharacter(Handler h, int what, Object obj)
Phone
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.
setOnPostDialCharacter
in class Phone
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
public boolean isVideoEnabled()
false
for SIP.isVideoEnabled
in class Phone
false
since SIP does not support video calling.protected void onUpdateIccAvailability()
onUpdateIccAvailability
in class Phone
public void sendEmergencyCallStateChange(boolean callActive)
sendEmergencyCallStateChange
in class Phone
public void setBroadcastEmergencyCallStateChanges(boolean broadcast)
Phone
setBroadcastEmergencyCallStateChanges
in class Phone