public interface PhoneInternalInterface
Modifier and Type | Interface and Description |
---|---|
static class |
PhoneInternalInterface.DataActivityState |
static class |
PhoneInternalInterface.SuppService |
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 |
canTransfer()
Whether or not the phone can do explicit call transfer in the current
phone state--that is, one call holding and one call active.
|
void |
clearDisconnected()
Clears all DISCONNECTED connections from Call connection lists.
|
void |
conference()
Conferences holding and active.
|
Connection |
dial(String dialString,
int videoState)
Initiate a new voice connection.
|
Connection |
dial(String dialString,
UUSInfo uusInfo,
int videoState,
Bundle intentExtras)
Initiate a new voice connection with supplementary User to User
Information.
|
void |
disableLocationUpdates()
Disable location update notifications.
|
void |
enableLocationUpdates()
Enable location update notifications.
|
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).
|
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.
|
PhoneInternalInterface.DataActivityState |
getDataActivityState()
Get the current DataActivityState.
|
void |
getDataCallList(Message response)
Get the current active Data Call list
|
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.
|
IccPhoneBookInterfaceManager |
getIccPhoneBookInterfaceManager()
Retrieves the IccPhoneBookInterfaceManager of the Phone
|
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).
|
String |
getMeid()
Retrieves MEID for CDMA phones.
|
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.
|
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.
|
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 command)
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). |
void |
registerForSuppServiceNotification(Handler h,
int what,
Object obj)
Register for Supplementary Service notifications from the network.
|
void |
rejectCall()
Reject (ignore) a ringing call.
|
void |
sendDtmf(char c)
Play a DTMF tone on the active call.
|
void |
sendUssdResponse(String ussdMessge)
Sends user response to a USSD REQUEST message.
|
void |
setCallForwardingOption(int commandInterfaceCFReason,
int commandInterfaceCFAction,
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) |
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 |
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 |
stopDtmf()
Stop the playing DTMF tone.
|
void |
switchHoldingAndActive()
Places any active calls on hold, and makes any held calls
active.
|
void |
unregisterForSuppServiceNotification(Handler h)
Unregisters for Supplementary Service notifications.
|
void |
updateServiceLocation()
Update the ServiceState CellLocation for current network registration.
|
static final boolean DEBUG_PHONE
static final String FEATURE_ENABLE_MMS
static final String FEATURE_ENABLE_SUPL
static final String FEATURE_ENABLE_DUN
static final String FEATURE_ENABLE_HIPRI
static final String FEATURE_ENABLE_DUN_ALWAYS
static final String FEATURE_ENABLE_FOTA
static final String FEATURE_ENABLE_IMS
static final String FEATURE_ENABLE_CBS
static final String FEATURE_ENABLE_EMERGENCY
static final String REASON_ROAMING_ON
static final String REASON_ROAMING_OFF
static final String REASON_DATA_DISABLED
static final String REASON_DATA_ENABLED
static final String REASON_DATA_ATTACHED
static final String REASON_DATA_DETACHED
static final String REASON_CDMA_DATA_ATTACHED
static final String REASON_CDMA_DATA_DETACHED
static final String REASON_APN_CHANGED
static final String REASON_APN_SWITCHED
static final String REASON_APN_FAILED
static final String REASON_RESTORE_DEFAULT_APN
static final String REASON_RADIO_TURNED_OFF
static final String REASON_PDP_RESET
static final String REASON_VOICE_CALL_ENDED
static final String REASON_VOICE_CALL_STARTED
static final String REASON_PS_RESTRICT_ENABLED
static final String REASON_PS_RESTRICT_DISABLED
static final String REASON_SIM_LOADED
static final String REASON_NW_TYPE_CHANGED
static final String REASON_DATA_DEPENDENCY_MET
static final String REASON_DATA_DEPENDENCY_UNMET
static final String REASON_LOST_DATA_CONNECTION
static final String REASON_CONNECTED
static final String REASON_SINGLE_PDN_ARBITRATION
static final String REASON_DATA_SPECIFIC_DISABLED
static final String REASON_SIM_NOT_READY
static final String REASON_IWLAN_AVAILABLE
static final String REASON_CARRIER_CHANGE
static final String REASON_CARRIER_ACTION_DISABLE_METERED_APN
static final int BM_UNSPECIFIED
static final int BM_EURO_BAND
static final int BM_US_BAND
static final int BM_JPN_BAND
static final int BM_AUS_BAND
static final int BM_AUS2_BAND
static final int BM_CELL_800
static final int BM_PCS
static final int BM_JTACS
static final int BM_KOREA_PCS
static final int BM_4_450M
static final int BM_IMT2000
static final int BM_7_700M2
static final int BM_8_1800M
static final int BM_9_900M
static final int BM_10_800M_2
static final int BM_EURO_PAMR
static final int BM_AWS
static final int BM_US_2500M
static final int BM_NUM_BAND_MODES
static final int NT_MODE_WCDMA_PREF
static final int NT_MODE_GSM_ONLY
static final int NT_MODE_WCDMA_ONLY
static final int NT_MODE_GSM_UMTS
static final int NT_MODE_CDMA
static final int NT_MODE_CDMA_NO_EVDO
static final int NT_MODE_EVDO_NO_CDMA
static final int NT_MODE_GLOBAL
static final int NT_MODE_LTE_CDMA_AND_EVDO
static final int NT_MODE_LTE_GSM_WCDMA
static final int NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA
static final int NT_MODE_LTE_ONLY
static final int NT_MODE_LTE_WCDMA
static final int NT_MODE_TDSCDMA_ONLY
static final int NT_MODE_TDSCDMA_WCDMA
static final int NT_MODE_LTE_TDSCDMA
static final int NT_MODE_TDSCDMA_GSM
static final int NT_MODE_LTE_TDSCDMA_GSM
static final int NT_MODE_TDSCDMA_GSM_WCDMA
static final int NT_MODE_LTE_TDSCDMA_WCDMA
static final int NT_MODE_LTE_TDSCDMA_GSM_WCDMA
static final int NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA
static final int NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA
static final int PREFERRED_NT_MODE
static final int CDMA_RM_HOME
static final int CDMA_RM_AFFILIATED
static final int CDMA_RM_ANY
static final int CDMA_SUBSCRIPTION_UNKNOWN
static final int CDMA_SUBSCRIPTION_RUIM_SIM
static final int CDMA_SUBSCRIPTION_NV
static final int PREFERRED_CDMA_SUBSCRIPTION
static final int TTY_MODE_OFF
static final int TTY_MODE_FULL
static final int TTY_MODE_HCO
static final int TTY_MODE_VCO
static final int CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED
static final int CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED
static final int CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED
static final int CDMA_OTA_PROVISION_STATUS_SSD_UPDATED
static final int CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED
static final int CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED
static final int CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED
static final int CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED
static final int CDMA_OTA_PROVISION_STATUS_COMMITTED
static final int CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED
static final int CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED
static final int CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED
ServiceState getServiceState()
registerForServiceStateChanged
to be informed of
updates.CellLocation getCellLocation()
PhoneConstants.DataState getDataConnectionState(String apnType)
PhoneStateListener
instead.apnType
- specify for which apn to get connection state info.PhoneInternalInterface.DataActivityState getDataActivityState()
TelephonyManager
instead.List<? extends MmiCode> getPendingMmiCodes()
registerForMmiInitiate
and registerForMmiComplete
for change notification.void sendUssdResponse(String ussdMessge)
ussdMessge
- Message to send in the response.void registerForSuppServiceNotification(Handler h, int what, Object obj)
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.void unregisterForSuppServiceNotification(Handler h)
h
- Handler to be removed from the registrant list.void acceptCall(int videoState) throws CallStateException
registerForPreciseCallStateChanged()
.videoState
- The video state in which to answer the call.CallStateException
- when no call is ringing or waitingvoid rejectCall() throws CallStateException
registerForPreciseCallStateChanged()
.CallStateException
- when no call is ringing or waitingvoid switchHoldingAndActive() throws CallStateException
registerForPreciseCallStateChanged()
.CallStateException
- if a call is ringing, waiting, or
dialing/alerting. In these cases, this operation may not be performed.boolean canConference()
void conference() throws CallStateException
registerForPreciseCallStateChanged()
.CallStateException
- if canConference() would return false.
In these cases, this operation may not be performed.boolean canTransfer()
void explicitCallTransfer() throws CallStateException
registerForPreciseCallStateChanged()
.CallStateException
- if canTransfer() would return false.
In these cases, this operation may not be performed.void clearDisconnected()
Call getForegroundCall()
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()
.
Call getBackgroundCall()
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()
.
Call getRingingCall()
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()
.
Connection dial(String dialString, int videoState) throws CallStateException
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.Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras) throws CallStateException
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.boolean handlePinMmi(String dialString)
dial
is not appropriate).dialString
- the MMI command to be executed.boolean handleInCallMmiCommands(String command) throws CallStateException
command
- the MMI command to be executed.CallStateException
void sendDtmf(char c)
c
- should be one of 0-9, '*' or '#'. Other values will be
silently ignored.void startDtmf(char c)
c
- should be one of 0-9, '*' or '#'. Other values will be
silently ignored.void stopDtmf()
void setRadioPower(boolean power)
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".String getLine1Number()
#getMsisdn()
will return the MSISDN on CDMA/LTE phones.String getLine1AlphaTag()
boolean setLine1Number(String alphaTag, String number, Message onComplete)
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.String getVoiceMailNumber()
String getVoiceMailAlphaTag()
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.
void setVoiceMailNumber(String alphaTag, String voiceMailNumber, Message onComplete)
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.void getCallForwardingOption(int commandInterfaceCFReason, Message onComplete)
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.
void setCallForwardingOption(int commandInterfaceCFReason, int commandInterfaceCFAction, String dialingNumber, int timerSeconds, Message onComplete)
commandInterfaceCFReason
- is one of the valid call forwarding
CF_REASONS, as defined in
com.android.internal.telephony.CommandsInterface.
commandInterfaceCFAction
- 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.void getOutgoingCallerIdDisplay(Message onComplete)
onComplete
- a callback message when the action is completed.for details.
void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, Message onComplete)
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.void getCallWaiting(Message onComplete)
onComplete
- a callback message when the action is completed.for details.
void setCallWaiting(boolean enable, Message onComplete)
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.void getAvailableNetworks(Message response)
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.void getNeighboringCids(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.
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.void setMute(boolean muted)
muted
- true to mute the microphone,
false to activate the microphone.boolean getMute()
registerForPreciseCallStateChanged()
as a change notifcation, although presently phone state changed is not
fired when setMute() is called.void getDataCallList(Message response)
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.CommandExceptionvoid updateServiceLocation()
void enableLocationUpdates()
void disableLocationUpdates()
boolean getDataRoamingEnabled()
void setDataRoamingEnabled(boolean enable)
enable
- set true if enable data connection on roamingboolean getDataEnabled()
void setDataEnabled(boolean enable)
@enable
- set true
if enable data connectionString getDeviceId()
String getDeviceSvn()
String getSubscriberId()
String getGroupIdLevel1()
String getGroupIdLevel2()
String getEsn()
String getMeid()
String getImei()
IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager()
void activateCellBroadcastSms(int activate, Message response)
activate
- 0 = activate, 1 = deactivateresponse
- Callback message is empty on completionvoid getCellBroadcastSmsConfig(Message response)
response
- Callback message is empty on completionvoid setCellBroadcastSmsConfig(int[] configValuesArray, Message response)
response
- Callback message is empty on completion