public class GsmCdmaPhone extends Phone
Handler.Callback
PhoneInternalInterface.DataActivityState, PhoneInternalInterface.SuppService
Modifier and Type | Field and Description |
---|---|
static int |
CANCEL_ECM_TIMER |
static String |
LOG_TAG |
int |
mCdmaSubscriptionSource |
GsmCdmaCallTracker |
mCT |
EriManager |
mEriManager |
ServiceStateTracker |
mSST |
static String |
PROPERTY_CDMA_HOME_OPERATOR_NUMERIC |
static int |
RESTART_ECM_TIMER |
CF_ID, CF_STATUS, CLIR_KEY, CS_FALLBACK, DATA_DISABLED_ON_BOOT_KEY, EVENT_CALL_RING, EVENT_CARRIER_CONFIG_CHANGED, EVENT_CDMA_SUBSCRIPTION_SOURCE_CHANGED, EVENT_EMERGENCY_CALLBACK_MODE_ENTER, EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE, EVENT_GET_BASEBAND_VERSION_DONE, EVENT_GET_CALL_FORWARD_DONE, EVENT_GET_DEVICE_IDENTITY_DONE, EVENT_GET_IMEI_DONE, EVENT_GET_IMEISV_DONE, EVENT_GET_RADIO_CAPABILITY, EVENT_ICC_RECORD_EVENTS, EVENT_LAST, EVENT_NV_READY, EVENT_RADIO_AVAILABLE, EVENT_RADIO_OFF_OR_NOT_AVAILABLE, EVENT_RADIO_ON, EVENT_REGISTERED_TO_NETWORK, EVENT_REQUEST_VOICE_RADIO_TECH_DONE, EVENT_RIL_CONNECTED, EVENT_RUIM_RECORDS_LOADED, EVENT_SET_CALL_FORWARD_DONE, EVENT_SET_CLIR_COMPLETE, EVENT_SET_NETWORK_AUTOMATIC, EVENT_SET_ROAMING_PREFERENCE_DONE, EVENT_SET_VM_NUMBER_DONE, EVENT_SIM_RECORDS_LOADED, EVENT_SS, EVENT_SSN, EVENT_UPDATE_PHONE_OBJECT, EVENT_USSD, EVENT_VOICE_RADIO_TECH_CHANGED, EXTRA_KEY_ALERT_MESSAGE, EXTRA_KEY_ALERT_SHOW, EXTRA_KEY_ALERT_TITLE, EXTRA_KEY_NOTIFICATION_MESSAGE, lockForRadioTechnologyChange, mCi, mContext, mDcTracker, mDisconnectRegistrants, mEmergencyCallToggledRegistrants, mIccRecords, mImsPhone, mIsVideoCapable, mMmiCompleteRegistrants, mMmiRegistrants, mNotifier, mPhoneId, mPostDialHandler, mRadioOffOrNotAvailableRegistrants, mSimRecordsLoadedRegistrants, mSimulatedRadioControl, mSmsStorageMonitor, mSmsUsageMonitor, mSuppServiceFailedRegistrants, mTelephonyComponentFactory, mUiccApplication, mUiccController, mUnknownConnectionRegistrants, mVmCount, NETWORK_SELECTION_KEY, NETWORK_SELECTION_NAME_KEY, NETWORK_SELECTION_SHORT_KEY
BM_10_800M_2, BM_4_450M, BM_7_700M2, BM_8_1800M, BM_9_900M, BM_AUS_BAND, BM_AUS2_BAND, BM_AWS, BM_CELL_800, BM_EURO_BAND, BM_EURO_PAMR, BM_IMT2000, BM_JPN_BAND, BM_JTACS, BM_KOREA_PCS, BM_NUM_BAND_MODES, BM_PCS, BM_UNSPECIFIED, BM_US_2500M, BM_US_BAND, CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED, CDMA_OTA_PROVISION_STATUS_COMMITTED, CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED, CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED, CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED, CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED, CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED, CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED, CDMA_OTA_PROVISION_STATUS_SSD_UPDATED, CDMA_RM_AFFILIATED, CDMA_RM_ANY, CDMA_RM_HOME, CDMA_SUBSCRIPTION_NV, CDMA_SUBSCRIPTION_RUIM_SIM, CDMA_SUBSCRIPTION_UNKNOWN, DEBUG_PHONE, FEATURE_ENABLE_CBS, FEATURE_ENABLE_DUN, FEATURE_ENABLE_DUN_ALWAYS, FEATURE_ENABLE_EMERGENCY, FEATURE_ENABLE_FOTA, FEATURE_ENABLE_HIPRI, FEATURE_ENABLE_IMS, FEATURE_ENABLE_MMS, FEATURE_ENABLE_SUPL, NT_MODE_CDMA, NT_MODE_CDMA_NO_EVDO, NT_MODE_EVDO_NO_CDMA, NT_MODE_GLOBAL, NT_MODE_GSM_ONLY, NT_MODE_GSM_UMTS, NT_MODE_LTE_CDMA_AND_EVDO, NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA, NT_MODE_LTE_GSM_WCDMA, NT_MODE_LTE_ONLY, NT_MODE_LTE_TDSCDMA, NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA, NT_MODE_LTE_TDSCDMA_GSM, NT_MODE_LTE_TDSCDMA_GSM_WCDMA, NT_MODE_LTE_TDSCDMA_WCDMA, NT_MODE_LTE_WCDMA, NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA, NT_MODE_TDSCDMA_GSM, NT_MODE_TDSCDMA_GSM_WCDMA, NT_MODE_TDSCDMA_ONLY, NT_MODE_TDSCDMA_WCDMA, NT_MODE_WCDMA_ONLY, NT_MODE_WCDMA_PREF, PREFERRED_CDMA_SUBSCRIPTION, PREFERRED_NT_MODE, REASON_APN_CHANGED, REASON_APN_FAILED, REASON_APN_SWITCHED, REASON_CARRIER_ACTION_DISABLE_METERED_APN, REASON_CARRIER_CHANGE, REASON_CDMA_DATA_ATTACHED, REASON_CDMA_DATA_DETACHED, REASON_CONNECTED, REASON_DATA_ATTACHED, REASON_DATA_DEPENDENCY_MET, REASON_DATA_DEPENDENCY_UNMET, REASON_DATA_DETACHED, REASON_DATA_DISABLED, REASON_DATA_ENABLED, REASON_DATA_SPECIFIC_DISABLED, REASON_IWLAN_AVAILABLE, REASON_LOST_DATA_CONNECTION, REASON_NW_TYPE_CHANGED, REASON_PDP_RESET, REASON_PS_RESTRICT_DISABLED, REASON_PS_RESTRICT_ENABLED, REASON_RADIO_TURNED_OFF, REASON_RESTORE_DEFAULT_APN, REASON_ROAMING_OFF, REASON_ROAMING_ON, REASON_SIM_LOADED, REASON_SIM_NOT_READY, REASON_SINGLE_PDN_ARBITRATION, REASON_VOICE_CALL_ENDED, REASON_VOICE_CALL_STARTED, TTY_MODE_FULL, TTY_MODE_HCO, TTY_MODE_OFF, TTY_MODE_VCO
Constructor and Description |
---|
GsmCdmaPhone(Context context,
CommandsInterface ci,
PhoneNotifier notifier,
boolean unitTestMode,
int phoneId,
int precisePhoneType,
TelephonyComponentFactory telephonyComponentFactory) |
GsmCdmaPhone(Context context,
CommandsInterface ci,
PhoneNotifier notifier,
int phoneId,
int precisePhoneType,
TelephonyComponentFactory telephonyComponentFactory) |
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.
|
protected Connection |
dialInternal(String dialString,
UUSInfo uusInfo,
int videoState,
Bundle intentExtras)
Dials a number.
|
void |
disableLocationUpdates()
Disable location update notifications.
|
void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
void |
enableEnhancedVoicePrivacy(boolean enable,
Message onComplete)
Enable or disable enhanced Voice Privacy (VP).
|
void |
enableLocationUpdates()
Enable location update notifications.
|
void |
exitEmergencyCallbackMode()
request to exit emergency call back mode
the caller should use setOnECMModeExitResponse
to receive the emergency callback mode exit response
|
void |
explicitCallTransfer()
Connects the two calls and disconnects the subscriber from both calls
Explicit Call Transfer occurs asynchronously
and may fail.
|
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
void |
getAvailableNetworks(Message response)
Scan available networks.
|
GsmCdmaCall |
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.
|
CallTracker |
getCallTracker()
Get call tracker
|
void |
getCallWaiting(Message onComplete)
getCallWaiting
gets call waiting activation state.
|
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
|
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 |
getDtmfToneDelayKey() |
void |
getEnhancedVoicePrivacy(Message onComplete)
Get the currently set Voice Privacy (VP) mode.
|
String |
getEsn()
Retrieves the ESN for CDMA phones.
|
GsmCdmaCall |
getForegroundCall()
Gets the foreground call object, which represents all connections that
are dialing or active (all connections
that have their audio path connected).
|
String |
getFullIccSerialNumber()
Retrieves the full serial number of the ICC (including hex digits), if applicable.
|
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.
|
IccPhoneBookInterfaceManager |
getIccPhoneBookInterfaceManager()
Retrieves the IccPhoneBookInterfaceManager of the GsmCdmaPhone
|
boolean |
getIccRecordsLoaded()
Returns SIM record load state.
|
String |
getIccSerialNumber()
Retrieves the serial number of the ICC, if applicable.
|
IccSmsInterfaceManager |
getIccSmsInterfaceManager() |
String |
getImei()
Retrieves IMEI for phones.
|
IsimRecords |
getIsimRecords()
Return an interface to retrieve the ISIM records for IMS, if available.
|
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.
|
String |
getMsisdn()
Retrieves the MSISDN from the UICC.
|
boolean |
getMute()
Gets current mute status.
|
String |
getNai()
Retrieves Nai for phones.
|
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.
|
ServiceStateTracker |
getServiceStateTracker()
Retrieves the ServiceStateTracker of the phone instance.
|
PhoneConstants.State |
getState()
Get current coarse-grained voice call state.
|
String |
getSubscriberId()
Retrieves the unique subscriber ID, e.g., IMSI for GSM phones.
|
String |
getSystemProperty(String property,
String defValue)
Set a system property, unless we're in unit test mode
|
UiccCardApplication |
getUiccCardApplication() |
String |
getVoiceMailAlphaTag()
Returns the alpha tag associated with the voice mail number.
|
String |
getVoiceMailNumber()
Get the voice mail access phone number.
|
PowerManager.WakeLock |
getWakeLock() |
boolean |
handleInCallMmiCommands(String dialString)
Handles in-call MMI commands.
|
void |
handleMessage(Message msg)
When overridden the derived class needs to call
super.handleMessage(msg) so this method has a
a chance to process the message.
|
boolean |
handlePinMmi(String dialString)
Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
without SEND (so
dial is not appropriate). |
void |
handleTimerInEmergencyCallbackMode(int action)
Handle to cancel or restart Ecm timer in emergency call back mode
if action is CANCEL_ECM_TIMER, cancel Ecm timer and notify apps the timer is canceled;
otherwise, restart Ecm timer and notify apps the timer is restarted.
|
boolean |
isCspPlmnEnabled()
TODO: Adding a function for each property is not good.
|
boolean |
isEriFileLoaded() |
boolean |
isInCall() |
boolean |
isInEcm() |
boolean |
isInEmergencyCall() |
boolean |
isManualNetSelAllowed() |
boolean |
isMinInfoReady()
Check if subscription data has been assigned to mMin
return true if MIN info is ready; false otherwise.
|
boolean |
isOtaSpNumber(String dialStr)
isOTASPNumber: checks a given number against the IS-683A OTASP dial string and carrier
OTASP dial string.
|
boolean |
isPhoneTypeCdma() |
boolean |
isPhoneTypeCdmaLte() |
boolean |
isPhoneTypeGsm() |
boolean |
isUtEnabled()
Return if UT capability of ImsPhone is enabled or not
|
boolean |
needsOtaServiceProvisioning()
Returns true if OTA Service Provisioning needs to be performed.
|
void |
notifyCallForwardingIndicator() |
void |
notifyDisconnect(Connection cn) |
void |
notifyEcbmTimerReset(Boolean flag) |
void |
notifyEmergencyCallRegistrants(boolean started) |
void |
notifyLocationChanged() |
void |
notifyNewRingingConnection(Connection c) |
void |
notifyPhoneStateChanged()
Notify any interested party of a Phone state change
PhoneConstants.State |
void |
notifyPreciseCallStateChanged()
Notify registrants of a change in the call state.
|
void |
notifyServiceStateChanged(ServiceState ss) |
void |
notifySuppServiceFailed(PhoneInternalInterface.SuppService code) |
void |
notifyUnknownConnection(Connection cn) |
void |
onMMIDone(MmiCode mmi)
Removes the given MMI from the pending list and notifies
registrants that it is complete.
|
protected void |
onUpdateIccAvailability() |
void |
prepareEri() |
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 |
registerForEcmTimerReset(Handler h,
int what,
Object obj)
Registration point for Ecm timer reset
|
void |
registerForEriFileLoaded(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 |
registerForSuppServiceNotification(Handler h,
int what,
Object obj)
Register for Supplementary Service notifications from the network.
|
void |
rejectCall()
Reject (ignore) a ringing call.
|
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.
|
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 cdma cell broadcast SMS.
|
void |
setDataEnabled(boolean enable) |
void |
setDataRoamingEnabled(boolean enable) |
void |
setImsRegistrationState(boolean registered)
Set IMS registration state
|
protected void |
setIsInEmergencyCall() |
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 |
setOnEcbModeExitResponse(Handler h,
int what,
Object obj)
registers for exit emergency call back mode request response
|
boolean |
setOperatorBrandOverride(String brand)
Override the service provider name and the operator name for the current ICCID.
|
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 |
setSystemProperty(String property,
String value)
Set a system property, unless we're in unit test mode
|
void |
setUiTTYMode(int uiTtyMode,
Message onComplete)
setUiTTYMode
sets a TTY mode option.
|
void |
setVoiceMailNumber(String alphaTag,
String voiceMailNumber,
Message onComplete)
setVoiceMailNumber
sets the voicemail number in the SIM card.
|
void |
setVoiceMessageWaiting(int line,
int countWaiting)
Sets the SIM voice message waiting indicator records.
|
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 |
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 |
unregisterForEcmTimerReset(Handler h)
Unregister for notification for Ecm timer reset
|
void |
unregisterForEriFileLoaded(Handler h) |
void |
unregisterForSimRecordsLoaded(Handler h)
Unregister for notifications for Sim records loaded
|
void |
unregisterForSubscriptionInfoReady(Handler h)
Unregister for notifications for subscription info
|
void |
unregisterForSuppServiceNotification(Handler h)
Unregisters for Supplementary Service notifications.
|
void |
unsetOnEcbModeExitResponse(Handler h)
Unregisters for exit emergency call back mode request response
|
boolean |
updateCurrentCarrierInProvider()
Sets the "current" field in the telephony provider according to the SIM's operator
|
void |
updatePhoneObject(int voiceRadioTech)
Update the phone object if the voice radio technology has changed
|
void |
updateServiceLocation()
Update the ServiceState CellLocation for current network registration.
|
void |
updateVoiceMail()
Update voice mail count related fields and notify listeners
|
callEndCleanupHandOverCallIfAny, cancelUSSD, carrierActionSetMeteredApnsEnabled, carrierActionSetRadioEnabled, checkWfcWifiOnlyModeBeforeDial, disableDnsCheck, dispose, getActionAttached, getActionDetached, getActiveApnHost, getActiveApnTypes, getAllCellInfo, getAllowedCarriers, getCallForwardingIndicator, getCarrierSignalAgent, getContext, getCurrentSubscriberUris, getCurrentUiccAppType, getDataConnectionState, getDefaultPhone, getHandler, getHandoverConnection, getIccFileHandler, getIccRecords, getImsPhone, getLceStatus, getLinkProperties, getLocaleFromSimAndCarrierPrefs, getLteOnCdmaMode, getMessageWaitingIndicator, getModemActivityInfo, getModemUuId, getNetworkCapabilities, getNetworkSelectionMode, getPcscfAddress, getPhoneId, getPhoneName, getPostDialHandler, getPreferredNetworkType, getRadioAccessFamily, getRadioCapability, getSignalStrength, getSimulatedRadioControl, getSmscAddress, getStoredVoiceMessageCount, getSubId, getUiccCard, getUnitTestMode, getUsimServiceTable, getVoiceMessageCount, getVoicePhoneServiceState, getVtDataUsage, hasMatchedTetherApnSetting, invokeOemRilRequestRaw, invokeOemRilRequestStrings, isDataConnectivityPossible, isDataConnectivityPossible, isDnsCheckDisabled, isImsRegistered, isImsUseEnabled, isMatchGid, isMccMncMarkedAsNonRoaming, isMccMncMarkedAsRoaming, isRadioAvailable, isRadioOn, isShuttingDown, isSidMarkedAsNonRoaming, isSidMarkedAsRoaming, isVideoCallPresent, isVideoEnabled, 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, registerForDataEnabledChanged, registerForDisconnect, registerForDisplayInfo, registerForEmergencyCallToggle, registerForHandoverStateChanged, registerForInCallVoicePrivacyOff, registerForInCallVoicePrivacyOn, registerForIncomingRing, registerForLineControlInfo, registerForMmiComplete, registerForMmiInitiate, registerForNewRingingConnection, registerForNumberInfo, registerForOnHoldTone, registerForPreciseCallStateChanged, registerForRadioCapabilityChanged, registerForRadioOffOrNotAvailable, registerForRedirectedNumberInfo, registerForResendIncallMute, registerForRingbackTone, registerForServiceStateChanged, registerForSignalInfo, registerForSilentRedial, registerForSuppServiceFailed, registerForT53AudioControlInfo, registerForTtyModeReceived, registerForUnknownConnection, registerForVideoCapabilityChanged, registerFoT53ClirlInfo, saveClirSetting, selectNetworkManually, sendSubscriptionSettings, setAllowedCarriers, setBandMode, setCdmaRoamingPreference, setCdmaSubscription, setCellInfoListRate, setEchoSuppressionEnabled, setInternalDataEnabled, setNetworkSelectionModeAutomatic, setOnPostDialCharacter, setPhoneName, setPolicyDataEnabled, setPreferredNetworkType, setPreferredNetworkTypeIfSimLoaded, setRadioCapability, setRoamingOverride, setSmscAddress, setTTYMode, setVoiceCallForwardingFlag, setVoiceCallForwardingFlag, setVoiceMessageCount, shutdownRadio, startLceAfterRadioIsAvailable, startMonitoringImsService, startRingbackTone, stopRingbackTone, unregisterForAllDataDisconnected, unregisterForDataEnabledChanged, unregisterForDisconnect, unregisterForDisplayInfo, unregisterForEmergencyCallToggle, unregisterForHandoverStateChanged, unregisterForInCallVoicePrivacyOff, unregisterForInCallVoicePrivacyOn, unregisterForIncomingRing, unregisterForLineControlInfo, unregisterForMmiComplete, unregisterForMmiInitiate, unregisterForNewRingingConnection, unregisterForNumberInfo, unregisterForOnHoldTone, unregisterForPreciseCallStateChanged, unregisterForRadioCapabilityChanged, unregisterForRadioOffOrNotAvailable, unregisterForRedirectedNumberInfo, unregisterForResendIncallMute, unregisterForRingbackTone, unregisterForServiceStateChanged, unregisterForSignalInfo, unregisterForSilentRedial, unregisterForSuppServiceFailed, unregisterForT53AudioControlInfo, unregisterForT53ClirInfo, unregisterForTtyModeReceived, unregisterForUnknownConnection, unregisterForVideoCapabilityChanged, updateDataConnectionTracker
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 static final String LOG_TAG
public static final int RESTART_ECM_TIMER
public static final int CANCEL_ECM_TIMER
public int mCdmaSubscriptionSource
public EriManager mEriManager
public static final String PROPERTY_CDMA_HOME_OPERATOR_NUMERIC
public GsmCdmaCallTracker mCT
public ServiceStateTracker mSST
public GsmCdmaPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, int phoneId, int precisePhoneType, TelephonyComponentFactory telephonyComponentFactory)
public GsmCdmaPhone(Context context, CommandsInterface ci, PhoneNotifier notifier, boolean unitTestMode, int phoneId, int precisePhoneType, TelephonyComponentFactory telephonyComponentFactory)
public boolean isPhoneTypeGsm()
public boolean isPhoneTypeCdma()
public boolean isPhoneTypeCdmaLte()
protected void finalize()
Object
finalize
method to dispose of
system resources or to perform other cleanup.
The general contract of finalize
is that it is invoked
if and when the JavaTM virtual
machine has determined that there is no longer any
means by which this object can be accessed by any thread that has
not yet died, except as a result of an action taken by the
finalization of some other object or class which is ready to be
finalized. The finalize
method may take any action, including
making this object available again to other threads; the usual purpose
of finalize
, however, is to perform cleanup actions before
the object is irrevocably discarded. For example, the finalize method
for an object that represents an input/output connection might perform
explicit I/O transactions to break the connection before the object is
permanently discarded.
The finalize
method of class Object
performs no
special action; it simply returns normally. Subclasses of
Object
may override this definition.
The Java programming language does not guarantee which thread will
invoke the finalize
method for any given object. It is
guaranteed, however, that the thread that invokes finalize will not
be holding any user-visible synchronization locks when finalize is
invoked. If an uncaught exception is thrown by the finalize method,
the exception is ignored and finalization of that object terminates.
After the finalize
method has been invoked for an object, no
further action is taken until the Java virtual machine has again
determined that there is no longer any means by which this object can
be accessed by any thread that has not yet died, including possible
actions by other objects or classes which are ready to be finalized,
at which point the object may be discarded.
The finalize
method is never invoked more than once by a Java
virtual machine for any given object.
Any exception thrown by the finalize
method causes
the finalization of this object to be halted, but is otherwise
ignored.
public ServiceState getServiceState()
PhoneInternalInterface
registerForServiceStateChanged
to be informed of
updates.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 ServiceStateTracker getServiceStateTracker()
Phone
getServiceStateTracker
in class Phone
public CallTracker getCallTracker()
Phone
getCallTracker
in class Phone
public void updateVoiceMail()
Phone
updateVoiceMail
in class Phone
public List<? extends MmiCode> getPendingMmiCodes()
PhoneInternalInterface
registerForMmiInitiate
and registerForMmiComplete
for change notification.public PhoneConstants.DataState getDataConnectionState(String apnType)
PhoneInternalInterface
PhoneStateListener
instead.apnType
- specify for which apn to get connection state info.public PhoneInternalInterface.DataActivityState getDataActivityState()
PhoneInternalInterface
TelephonyManager
instead.public void notifyPhoneStateChanged()
PhoneConstants.State
public void notifyPreciseCallStateChanged()
Call.State
. Use this when changes
in the precise call state are needed, else use notifyPhoneStateChanged.public void notifyNewRingingConnection(Connection c)
public void notifyDisconnect(Connection cn)
public void notifyUnknownConnection(Connection cn)
public boolean isInEmergencyCall()
isInEmergencyCall
in class Phone
protected void setIsInEmergencyCall()
setIsInEmergencyCall
in class Phone
public boolean isInEcm()
public void sendEmergencyCallStateChange(boolean callActive)
sendEmergencyCallStateChange
in class Phone
public void setBroadcastEmergencyCallStateChanges(boolean broadcast)
Phone
setBroadcastEmergencyCallStateChanges
in class Phone
public void notifySuppServiceFailed(PhoneInternalInterface.SuppService code)
public void notifyServiceStateChanged(ServiceState ss)
public void notifyLocationChanged()
public void notifyCallForwardingIndicator()
notifyCallForwardingIndicator
in class Phone
public void setSystemProperty(String property, String value)
setSystemProperty
in class Phone
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 registerForSimRecordsLoaded(Handler h, int what, Object obj)
Phone
registerForSimRecordsLoaded
in class Phone
h
- handler to notifywhat
- what code of message when deliveredobj
- placed in Message.objpublic void unregisterForSimRecordsLoaded(Handler h)
Phone
unregisterForSimRecordsLoaded
in class Phone
h
- Handler to be removed from the registrant list.public void acceptCall(int videoState) throws CallStateException
PhoneInternalInterface
registerForPreciseCallStateChanged()
.videoState
- The video state in which to answer the call.CallStateException
- when no call is ringing or waitingpublic void rejectCall() throws CallStateException
PhoneInternalInterface
registerForPreciseCallStateChanged()
.CallStateException
- when no call is ringing or waitingpublic void switchHoldingAndActive() throws CallStateException
PhoneInternalInterface
registerForPreciseCallStateChanged()
.CallStateException
- if a call is ringing, waiting, or
dialing/alerting. In these cases, this operation may not be performed.public String getIccSerialNumber()
Phone
getIccSerialNumber
in class Phone
public String getFullIccSerialNumber()
Phone
getFullIccSerialNumber
in class Phone
public boolean canConference()
PhoneInternalInterface
public void conference()
PhoneInternalInterface
registerForPreciseCallStateChanged()
.public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete)
Phone
enableEnhancedVoicePrivacy
in class Phone
enable
- whether true or false to enable or disable.onComplete
- a callback message when the action is completed.public void getEnhancedVoicePrivacy(Message onComplete)
Phone
getEnhancedVoicePrivacy
in class Phone
onComplete
- a callback message when the action is completed.public void clearDisconnected()
PhoneInternalInterface
public boolean canTransfer()
PhoneInternalInterface
public void explicitCallTransfer()
PhoneInternalInterface
registerForPreciseCallStateChanged()
.public GsmCdmaCall getForegroundCall()
PhoneInternalInterface
The foreground call is a singleton object. It is constant for the life of this phone. It is never null.
The foreground call will only ever be in one of these states:
IDLE, ACTIVE, DIALING, ALERTING, or DISCONNECTED.
State change notification is available via
registerForPreciseCallStateChanged()
.
public GsmCdmaCall getBackgroundCall()
PhoneInternalInterface
The background call is a singleton object. It is constant for the life of this phone object . It is never null.
The background call will only ever be in one of these states:
IDLE, HOLDING or DISCONNECTED.
State change notification is available via
registerForPreciseCallStateChanged()
.
public 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()
.
public boolean handleInCallMmiCommands(String dialString) throws CallStateException
PhoneInternalInterface
dialString
- the MMI command to be executed.CallStateException
public boolean isInCall()
public Connection dial(String dialString, int videoState) throws CallStateException
PhoneInternalInterface
dialString
- The dial string.videoState
- The desired video state for the connection.CallStateException
- if a new outgoing call is not currently
possible because no more call slots exist or a call exists that is
dialing, alerting, ringing, or waiting. Other errors are
handled asynchronously.public Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras) throws CallStateException
PhoneInternalInterface
dialString
- The dial string.uusInfo
- The UUSInfo.videoState
- The desired video state for the connection.intentExtras
- The extras from the original CALL intent.CallStateException
- if a new outgoing call is not currently
possible because no more call slots exist or a call exists
that is dialing, alerting, ringing, or waiting. Other
errors are handled asynchronously.protected Connection dialInternal(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras) throws CallStateException
Phone
dialInternal
in class Phone
dialString
- The number to dial.uusInfo
- The UUSInfo.videoState
- The video state for the call.intentExtras
- Extras from the original CALL intent.CallStateException
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 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, int on, int off, Message onComplete)
Phone
sendBurstDtmf
in class Phone
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 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 IsimRecords getIsimRecords()
Phone
getIsimRecords
in class Phone
public String getImei()
PhoneInternalInterface
public String getEsn()
PhoneInternalInterface
public String getMeid()
PhoneInternalInterface
public String getNai()
Phone
public String getSubscriberId()
PhoneInternalInterface
public String getGroupIdLevel1()
PhoneInternalInterface
public String getGroupIdLevel2()
PhoneInternalInterface
public String getLine1Number()
PhoneInternalInterface
#getMsisdn()
will return the MSISDN on CDMA/LTE phones.public String getCdmaPrlVersion()
Phone
getCdmaPrlVersion
in class Phone
public String getCdmaMin()
Phone
getCdmaMin
in class Phone
public boolean isMinInfoReady()
Phone
isMinInfoReady
in class Phone
public String getMsisdn()
Phone
PhoneInternalInterface.getLine1Number()
. For CDMA phones, PhoneInternalInterface.getLine1Number()
returns
the MDN, so this method is provided to 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 String getSystemProperty(String property, String defValue)
Phone
getSystemProperty
in class Phone
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 void getOutgoingCallerIdDisplay(Message onComplete)
PhoneInternalInterface
onComplete
- a callback message when the action is completed.for details.
public void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, Message onComplete)
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
onComplete
- a callback message when the action is completed.for details.
public void setCallWaiting(boolean enable, Message onComplete)
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 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 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 setUiTTYMode(int uiTtyMode, Message onComplete)
Phone
setUiTTYMode
in class Phone
onComplete
- a callback message when the action is completedpublic 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 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 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 void registerForCdmaOtaStatusChange(Handler h, int what, Object obj)
Phone
registerForCdmaOtaStatusChange
in class Phone
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForCdmaOtaStatusChange(Handler h)
Phone
unregisterForCdmaOtaStatusChange
in class Phone
h
- Handler to be removed from the registrant list.public void registerForSubscriptionInfoReady(Handler h, int what, Object obj)
Phone
registerForSubscriptionInfoReady
in class Phone
h
- handler to notifywhat
- what code of message when deliveredobj
- placed in Message.objpublic void unregisterForSubscriptionInfoReady(Handler h)
Phone
unregisterForSubscriptionInfoReady
in class Phone
h
- Handler to be removed from the registrant list.public void setOnEcbModeExitResponse(Handler h, int what, Object obj)
Phone
setOnEcbModeExitResponse
in class Phone
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unsetOnEcbModeExitResponse(Handler h)
Phone
unsetOnEcbModeExitResponse
in class Phone
h
- Handler to be removed from the registrant list.public void registerForCallWaiting(Handler h, int what, Object obj)
Phone
registerForCallWaiting
in class Phone
h
- Handler that receives the notification message.what
- User-defined message code.obj
- User object.public void unregisterForCallWaiting(Handler h)
Phone
unregisterForCallWaiting
in class Phone
h
- Handler to be removed from the registrant list.public boolean getDataEnabled()
public void setDataEnabled(boolean enable)
public void onMMIDone(MmiCode mmi)
mmi
- MMI that is donepublic void handleMessage(Message msg)
Phone
handleMessage
in class Phone
public UiccCardApplication getUiccCardApplication()
protected void onUpdateIccAvailability()
onUpdateIccAvailability
in class Phone
public boolean updateCurrentCarrierInProvider()
updateCurrentCarrierInProvider
in class Phone
public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager()
public void unregisterForEriFileLoaded(Handler h)
public void prepareEri()
public boolean isEriFileLoaded()
public void activateCellBroadcastSms(int activate, Message response)
activate
- 0 = activate, 1 = deactivateresponse
- Callback message is empty on completionpublic void getCellBroadcastSmsConfig(Message response)
response
- Callback message is empty on completionpublic void setCellBroadcastSmsConfig(int[] configValuesArray, Message response)
response
- Callback message is empty on completionpublic boolean needsOtaServiceProvisioning()
needsOtaServiceProvisioning
in class Phone
public boolean isCspPlmnEnabled()
Phone
isCspPlmnEnabled
in class Phone
public boolean isManualNetSelAllowed()
public void exitEmergencyCallbackMode()
Phone
exitEmergencyCallbackMode
in class Phone
public void notifyEmergencyCallRegistrants(boolean started)
public void handleTimerInEmergencyCallbackMode(int action)
public boolean isOtaSpNumber(String dialStr)
isOtaSpNumber
in class Phone
dialStr
- the number to look up.public int getCdmaEriIconIndex()
Phone
getCdmaEriIconIndex
in class Phone
public int getCdmaEriIconMode()
getCdmaEriIconMode
in class Phone
public String getCdmaEriText()
getCdmaEriText
in class Phone
public IccSmsInterfaceManager getIccSmsInterfaceManager()
getIccSmsInterfaceManager
in class Phone
public void updatePhoneObject(int voiceRadioTech)
Phone
updatePhoneObject
in class Phone
voiceRadioTech
- The new voice radio technologypublic void setImsRegistrationState(boolean registered)
Phone
setImsRegistrationState
in class Phone
public boolean getIccRecordsLoaded()
Phone
getSimCard().registerForReady()
for change notification.getIccRecordsLoaded
in class Phone
public IccCard getIccCard()
Phone
getIccCard
in class Phone
public void dump(FileDescriptor fd, PrintWriter pw, String[] args)
public boolean setOperatorBrandOverride(String brand)
Phone
setOperatorBrandOverride
in class Phone
public void notifyEcbmTimerReset(Boolean flag)
public void registerForEcmTimerReset(Handler h, int what, Object obj)
registerForEcmTimerReset
in class Phone
h
- handler to notifywhat
- User-defined message codeobj
- placed in Message.objpublic void unregisterForEcmTimerReset(Handler h)
Phone
unregisterForEcmTimerReset
in class Phone
h
- Handler to be removed from the registrant list.public void setVoiceMessageWaiting(int line, int countWaiting)
setVoiceMessageWaiting
in class Phone
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 boolean isUtEnabled()
Phone
isUtEnabled
in class Phone
public String getDtmfToneDelayKey()
public PowerManager.WakeLock getWakeLock()