11a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu/* 21a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Copyright (C) 2007 The Android Open Source Project 31a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 41a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Licensed under the Apache License, Version 2.0 (the "License"); 51a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * you may not use this file except in compliance with the License. 61a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * You may obtain a copy of the License at 71a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 81a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * http://www.apache.org/licenses/LICENSE-2.0 91a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Unless required by applicable law or agreed to in writing, software 111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * distributed under the License is distributed on an "AS IS" BASIS, 121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * See the License for the specific language governing permissions and 141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * limitations under the License. 151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yupackage com.android.internal.telephony; 181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.content.Context; 201a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.net.LinkProperties; 211a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.net.NetworkCapabilities; 221a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.os.Bundle; 231a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.os.Handler; 241a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.os.Message; 251a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.telephony.CellInfo; 261a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.telephony.CellLocation; 279d3f7e2198479ede7009c53aea1499d73016de7cqingxiimport android.telephony.CarrierConfigManager; 281a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.telephony.PhoneStateListener; 291a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.telephony.ServiceState; 301a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport android.telephony.SignalStrength; 311a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 321a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport com.android.internal.telephony.imsphone.ImsPhone; 331a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport com.android.internal.telephony.RadioCapability; 341a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport com.android.internal.telephony.test.SimulatedRadioControl; 351a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport com.android.internal.telephony.uicc.IsimRecords; 361a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport com.android.internal.telephony.uicc.UiccCard; 371a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport com.android.internal.telephony.uicc.UsimServiceTable; 381a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 391a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport com.android.internal.telephony.PhoneConstants.*; // ???? 401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport java.util.List; 421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yuimport java.util.Locale; 431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu/** 451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Internal interface used to control the phone; SDK developers cannot 461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * obtain this interface. 471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@hide} 491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yupublic interface PhoneInternalInterface { 521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** used to enable additional debug messages */ 541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final boolean DEBUG_PHONE = true; 551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public enum DataActivityState { 571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * The state of a data activity. 591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <ul> 601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <li>NONE = No traffic</li> 611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <li>DATAIN = Receiving IP ppp traffic</li> 621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <li>DATAOUT = Sending IP ppp traffic</li> 631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <li>DATAINANDOUT = Both receiving and sending IP ppp traffic</li> 641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <li>DORMANT = The data connection is still active, 651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu but physical link is down</li> 661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * </ul> 671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu NONE, DATAIN, DATAOUT, DATAINANDOUT, DORMANT; 691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu } 701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu enum SuppService { 725326ba5f8e9488416fd7160680dc6b6319c6b00eAnju Mathapati UNKNOWN, SWITCH, SEPARATE, TRANSFER, CONFERENCE, REJECT, HANGUP, RESUME, HOLD; 731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu } 741a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 751a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu // "Features" accessible through the connectivity manager 761a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_MMS = "enableMMS"; 771a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_SUPL = "enableSUPL"; 781a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_DUN = "enableDUN"; 791a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_HIPRI = "enableHIPRI"; 801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_DUN_ALWAYS = "enableDUNAlways"; 811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_FOTA = "enableFOTA"; 821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_IMS = "enableIMS"; 831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_CBS = "enableCBS"; 841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String FEATURE_ENABLE_EMERGENCY = "enableEmergency"; 851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Optional reasons for disconnect and connect 881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_ROAMING_ON = "roamingOn"; 901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_ROAMING_OFF = "roamingOff"; 911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_DATA_DISABLED = "dataDisabled"; 921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_DATA_ENABLED = "dataEnabled"; 931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_DATA_ATTACHED = "dataAttached"; 941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_DATA_DETACHED = "dataDetached"; 951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_CDMA_DATA_ATTACHED = "cdmaDataAttached"; 961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_CDMA_DATA_DETACHED = "cdmaDataDetached"; 971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_APN_CHANGED = "apnChanged"; 981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_APN_SWITCHED = "apnSwitched"; 991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_APN_FAILED = "apnFailed"; 1001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_RESTORE_DEFAULT_APN = "restoreDefaultApn"; 1011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_RADIO_TURNED_OFF = "radioTurnedOff"; 1021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_PDP_RESET = "pdpReset"; 1031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_VOICE_CALL_ENDED = "2GVoiceCallEnded"; 1041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_VOICE_CALL_STARTED = "2GVoiceCallStarted"; 1051a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_PS_RESTRICT_ENABLED = "psRestrictEnabled"; 1061a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_PS_RESTRICT_DISABLED = "psRestrictDisabled"; 1071a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_SIM_LOADED = "simLoaded"; 1081a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_NW_TYPE_CHANGED = "nwTypeChanged"; 1091a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_DATA_DEPENDENCY_MET = "dependencyMet"; 1101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_DATA_DEPENDENCY_UNMET = "dependencyUnmet"; 1111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_LOST_DATA_CONNECTION = "lostDataConnection"; 1121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_CONNECTED = "connected"; 1131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_SINGLE_PDN_ARBITRATION = "SinglePdnArbitration"; 1141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_DATA_SPECIFIC_DISABLED = "specificDisabled"; 1151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_SIM_NOT_READY = "simNotReady"; 1161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_IWLAN_AVAILABLE = "iwlanAvailable"; 1171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final String REASON_CARRIER_CHANGE = "carrierChange"; 1181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu // Used for band mode selection methods 12035b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_UNSPECIFIED = RILConstants.BAND_MODE_UNSPECIFIED; // automatic 12135b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_EURO_BAND = RILConstants.BAND_MODE_EURO; 12235b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_US_BAND = RILConstants.BAND_MODE_USA; 12335b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_JPN_BAND = RILConstants.BAND_MODE_JPN; 12435b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_AUS_BAND = RILConstants.BAND_MODE_AUS; 12535b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_AUS2_BAND = RILConstants.BAND_MODE_AUS_2; 12635b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_CELL_800 = RILConstants.BAND_MODE_CELL_800; 12735b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_PCS = RILConstants.BAND_MODE_PCS; 12835b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_JTACS = RILConstants.BAND_MODE_JTACS; 12935b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_KOREA_PCS = RILConstants.BAND_MODE_KOREA_PCS; 13035b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_4_450M = RILConstants.BAND_MODE_5_450M; 13135b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_IMT2000 = RILConstants.BAND_MODE_IMT2000; 13235b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_7_700M2 = RILConstants.BAND_MODE_7_700M_2; 13335b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_8_1800M = RILConstants.BAND_MODE_8_1800M; 13435b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_9_900M = RILConstants.BAND_MODE_9_900M; 13535b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_10_800M_2 = RILConstants.BAND_MODE_10_800M_2; 13635b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_EURO_PAMR = RILConstants.BAND_MODE_EURO_PAMR_400M; 13735b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_AWS = RILConstants.BAND_MODE_AWS; 13835b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_US_2500M = RILConstants.BAND_MODE_USA_2500M; 13935b0a8a40df77125a319d52fb25b0114d922be30Nathan Harold static final int BM_NUM_BAND_MODES = 19; //Total number of band modes 1401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu // Used for preferred network type 1421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu // Note NT_* substitute RILConstants.NETWORK_MODE_* above the Phone 1431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_WCDMA_PREF = RILConstants.NETWORK_MODE_WCDMA_PREF; 1441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_GSM_ONLY = RILConstants.NETWORK_MODE_GSM_ONLY; 1451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_WCDMA_ONLY = RILConstants.NETWORK_MODE_WCDMA_ONLY; 1461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_GSM_UMTS = RILConstants.NETWORK_MODE_GSM_UMTS; 1471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_CDMA = RILConstants.NETWORK_MODE_CDMA; 1491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_CDMA_NO_EVDO = RILConstants.NETWORK_MODE_CDMA_NO_EVDO; 1511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_EVDO_NO_CDMA = RILConstants.NETWORK_MODE_EVDO_NO_CDMA; 1521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_GLOBAL = RILConstants.NETWORK_MODE_GLOBAL; 1531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_CDMA_AND_EVDO = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO; 1551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_GSM_WCDMA = RILConstants.NETWORK_MODE_LTE_GSM_WCDMA; 1561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA; 1571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_ONLY = RILConstants.NETWORK_MODE_LTE_ONLY; 1581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_WCDMA = RILConstants.NETWORK_MODE_LTE_WCDMA; 1591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_TDSCDMA_ONLY = RILConstants.NETWORK_MODE_TDSCDMA_ONLY; 1611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_TDSCDMA_WCDMA = RILConstants.NETWORK_MODE_TDSCDMA_WCDMA; 1621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_TDSCDMA = RILConstants.NETWORK_MODE_LTE_TDSCDMA; 1631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_TDSCDMA_GSM = RILConstants.NETWORK_MODE_TDSCDMA_GSM; 1641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_TDSCDMA_GSM = RILConstants.NETWORK_MODE_LTE_TDSCDMA_GSM; 1651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_TDSCDMA_GSM_WCDMA = RILConstants.NETWORK_MODE_TDSCDMA_GSM_WCDMA; 1661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_TDSCDMA_WCDMA = RILConstants.NETWORK_MODE_LTE_TDSCDMA_WCDMA; 1671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_TDSCDMA_GSM_WCDMA = RILConstants.NETWORK_MODE_LTE_TDSCDMA_GSM_WCDMA; 1681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = RILConstants.NETWORK_MODE_TDSCDMA_CDMA_EVDO_GSM_WCDMA; 1691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int NT_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA = RILConstants.NETWORK_MODE_LTE_TDSCDMA_CDMA_EVDO_GSM_WCDMA; 1701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int PREFERRED_NT_MODE = RILConstants.PREFERRED_NETWORK_MODE; 1721a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu // Used for CDMA roaming mode 1749d3f7e2198479ede7009c53aea1499d73016de7cqingxi // Home Networks only, as defined in PRL 1759d3f7e2198479ede7009c53aea1499d73016de7cqingxi static final int CDMA_RM_HOME = CarrierConfigManager.CDMA_ROAMING_MODE_HOME; 1769d3f7e2198479ede7009c53aea1499d73016de7cqingxi // Roaming an Affiliated networks, as defined in PRL 1779d3f7e2198479ede7009c53aea1499d73016de7cqingxi static final int CDMA_RM_AFFILIATED = CarrierConfigManager.CDMA_ROAMING_MODE_AFFILIATED; 1789d3f7e2198479ede7009c53aea1499d73016de7cqingxi // Roaming on Any Network, as defined in PRL 1799d3f7e2198479ede7009c53aea1499d73016de7cqingxi static final int CDMA_RM_ANY = CarrierConfigManager.CDMA_ROAMING_MODE_ANY; 1801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu // Used for CDMA subscription mode 1821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int CDMA_SUBSCRIPTION_UNKNOWN =-1; // Unknown 1831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int CDMA_SUBSCRIPTION_RUIM_SIM = 0; // RUIM/SIM (default) 1841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int CDMA_SUBSCRIPTION_NV = 1; // NV -> non-volatile memory 1851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int PREFERRED_CDMA_SUBSCRIPTION = CDMA_SUBSCRIPTION_NV; 1871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int TTY_MODE_OFF = 0; 1891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int TTY_MODE_FULL = 1; 1901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int TTY_MODE_HCO = 2; 1911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu static final int TTY_MODE_VCO = 3; 1921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 1941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * CDMA OTA PROVISION STATUS, the same as RIL_CDMA_OTA_Status in ril.h 1951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 1961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 1971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED = 0; 1981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED = 1; 1991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED = 2; 2001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_SSD_UPDATED = 3; 2011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED = 4; 2021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED = 5; 2031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED = 6; 2041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED = 7; 2051a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_COMMITTED = 8; 2061a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED = 9; 2071a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED = 10; 2081a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public static final int CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED = 11; 2091a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Get the current ServiceState. Use 2131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <code>registerForServiceStateChanged</code> to be informed of 2141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * updates. 2151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu ServiceState getServiceState(); 2171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Get the current CellLocation. 2201a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2211a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu CellLocation getCellLocation(); 2221a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2231a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2241a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Get the current DataState. No change notification exists at this 2251a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * interface -- use 2261a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link android.telephony.PhoneStateListener} instead. 2271a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param apnType specify for which apn to get connection state info. 2281a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2291a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu DataState getDataConnectionState(String apnType); 2301a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2311a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2321a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Get the current DataActivityState. No change notification exists at this 2331a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * interface -- use 2341a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link android.telephony.TelephonyManager} instead. 2351a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2361a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu DataActivityState getDataActivityState(); 2371a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2381a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2391a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Returns a list of MMI codes that are pending. (They have initiated 2401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * but have not yet completed). 2411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Presently there is only ever one. 2421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Use <code>registerForMmiInitiate</code> 2431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * and <code>registerForMmiComplete</code> for change notification. 2441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public List<? extends MmiCode> getPendingMmiCodes(); 2461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Sends user response to a USSD REQUEST message. An MmiCode instance 2491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * representing this response is sent to handlers registered with 2501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * registerForMmiInitiate. 2511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 2521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param ussdMessge Message to send in the response. 2531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public void sendUssdResponse(String ussdMessge); 2551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Register for Supplementary Service notifications from the network. 2581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Message.obj will contain an AsyncResult. 2591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * AsyncResult.result will be a SuppServiceNotification instance. 2601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 2611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param h Handler that receives the notification message. 2621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param what User-defined message code. 2631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param obj User object. 2641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void registerForSuppServiceNotification(Handler h, int what, Object obj); 2661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Unregisters for Supplementary Service notifications. 2691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Extraneous calls are tolerated silently 2701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 2711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param h Handler to be removed from the registrant list. 2721a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void unregisterForSuppServiceNotification(Handler h); 2741a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2751a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2761a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Answers a ringing or waiting call. Active calls, if any, go on hold. 2771a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Answering occurs asynchronously, and final notification occurs via 2781a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 2791a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 2801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 2811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param videoState The video state in which to answer the call. 2821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @exception CallStateException when no call is ringing or waiting 2831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void acceptCall(int videoState) throws CallStateException; 2851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Reject (ignore) a ringing call. In GSM, this means UDUB 2881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * (User Determined User Busy). Reject occurs asynchronously, 2891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * and final notification occurs via 2901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 2911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 2921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 2931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @exception CallStateException when no call is ringing or waiting 2941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 2951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void rejectCall() throws CallStateException; 2961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 2971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 2981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Places any active calls on hold, and makes any held calls 2991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * active. Switch occurs asynchronously and may fail. 3001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Final notification occurs via 3011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 3021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 3031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @exception CallStateException if a call is ringing, waiting, or 3051a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * dialing/alerting. In these cases, this operation may not be performed. 3061a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3071a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void switchHoldingAndActive() throws CallStateException; 3081a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3091a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Whether or not the phone can conference in the current phone 3111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * state--that is, one call holding and one call active. 3121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true if the phone can conference; false otherwise. 3131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean canConference(); 3151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Conferences holding and active. Conference occurs asynchronously 3181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * and may fail. Final notification occurs via 3191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 3201a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 3211a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3221a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @exception CallStateException if canConference() would return false. 3231a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * In these cases, this operation may not be performed. 3241a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3251a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void conference() throws CallStateException; 3261a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3271a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3281a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Whether or not the phone can do explicit call transfer in the current 3291a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * phone state--that is, one call holding and one call active. 3301a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true if the phone can do explicit call transfer; false otherwise. 3311a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3321a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean canTransfer(); 3331a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3341a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3351a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Connects the two calls and disconnects the subscriber from both calls 3361a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Explicit Call Transfer occurs asynchronously 3371a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * and may fail. Final notification occurs via 3381a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 3391a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 3401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @exception CallStateException if canTransfer() would return false. 3421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * In these cases, this operation may not be performed. 3431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void explicitCallTransfer() throws CallStateException; 3451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Clears all DISCONNECTED connections from Call connection lists. 3481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Calls that were in the DISCONNECTED state become idle. This occurs 3491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * synchronously. 3501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void clearDisconnected(); 3521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Gets the foreground call object, which represents all connections that 3551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * are dialing or active (all connections 3561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * that have their audio path connected).<p> 3571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * The foreground call is a singleton object. It is constant for the life 3591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * of this phone. It is never null.<p> 3601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * The foreground call will only ever be in one of these states: 3621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * IDLE, ACTIVE, DIALING, ALERTING, or DISCONNECTED. 3631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * State change notification is available via 3651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 3661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 3671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Call getForegroundCall(); 3691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Gets the background call object, which represents all connections that 3721a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * are holding (all connections that have been accepted or connected, but 3731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * do not have their audio path connected). <p> 3741a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3751a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * The background call is a singleton object. It is constant for the life 3761a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * of this phone object . It is never null.<p> 3771a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3781a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * The background call will only ever be in one of these states: 3791a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * IDLE, HOLDING or DISCONNECTED. 3801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * State change notification is available via 3821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 3831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 3841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 3851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Call getBackgroundCall(); 3861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 3881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Gets the ringing call object, which represents an incoming 3891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * connection (if present) that is pending answer/accept. (This connection 3901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * may be RINGING or WAITING, and there may be only one.)<p> 3911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 3921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * The ringing call is a singleton object. It is constant for the life 3931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * of this phone. It is never null.<p> 3941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * The ringing call will only ever be in one of these states: 3961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * IDLE, INCOMING, WAITING or DISCONNECTED. 3971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 3981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * State change notification is available via 3991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 4001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()}. 4011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Call getRingingCall(); 4031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4051a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Initiate a new voice connection. This happens asynchronously, so you 4061a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * cannot assume the audio path is connected (or a call index has been 4071a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * assigned) until PhoneStateChanged notification has occurred. 4081a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 4091a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param dialString The dial string. 4101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param videoState The desired video state for the connection. 4111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @exception CallStateException if a new outgoing call is not currently 4121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * possible because no more call slots exist or a call exists that is 4131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * dialing, alerting, ringing, or waiting. Other errors are 4141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * handled asynchronously. 4151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Connection dial(String dialString, int videoState) throws CallStateException; 4171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Initiate a new voice connection with supplementary User to User 4201a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Information. This happens asynchronously, so you cannot assume the audio 4211a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * path is connected (or a call index has been assigned) until 4221a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * PhoneStateChanged notification has occurred. 4231a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 4241a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * NOTE: If adding another parameter, consider creating a DialArgs parameter instead to 4251a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * encapsulate all dial arguments and decrease scaffolding headache. 4261a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 4271a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param dialString The dial string. 4281a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param uusInfo The UUSInfo. 4291a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param videoState The desired video state for the connection. 4301a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param intentExtras The extras from the original CALL intent. 4311a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @exception CallStateException if a new outgoing call is not currently 4321a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * possible because no more call slots exist or a call exists 4331a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * that is dialing, alerting, ringing, or waiting. Other 4341a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * errors are handled asynchronously. 4351a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4361a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras) 4371a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu throws CallStateException; 4381a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4391a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 4411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * without SEND (so <code>dial</code> is not appropriate). 4421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 4431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param dialString the MMI command to be executed. 4441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true if MMI command is executed. 4451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean handlePinMmi(String dialString); 4471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Handles in-call MMI commands. While in a call, or while receiving a 4501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * call, use this to execute MMI commands. 4511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * see 3GPP 20.030, section 6.5.5.1 for specs on the allowed MMI commands. 4521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 4531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param command the MMI command to be executed. 4541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true if the MMI command is executed. 4551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @throws CallStateException 4561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean handleInCallMmiCommands(String command) throws CallStateException; 4581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Play a DTMF tone on the active call. Ignored if there is no active call. 4611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param c should be one of 0-9, '*' or '#'. Other values will be 4621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * silently ignored. 4631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void sendDtmf(char c); 4651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Start to paly a DTMF tone on the active call. Ignored if there is no active call 4681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * or there is a playing DTMF tone. 4691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param c should be one of 0-9, '*' or '#'. Other values will be 4701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * silently ignored. 4711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4721a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void startDtmf(char c); 4731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4741a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4751a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Stop the playing DTMF tone. Ignored if there is no playing DTMF 4761a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * tone or no active call. 4771a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4781a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void stopDtmf(); 4791a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Sets the radio power on/off state (off is sometimes 4821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * called "airplane mode"). Current state can be gotten via 4831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #getServiceState()}.{@link 4841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * android.telephony.ServiceState#getState() getState()}. 4851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <strong>Note: </strong>This request is asynchronous. 4861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * getServiceState().getState() will not change immediately after this call. 4871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * registerForServiceStateChanged() to find out when the 4881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * request is complete. 4891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 4901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param power true means "on", false means "off". 4911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 4921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setRadioPower(boolean power); 4931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 4941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 4951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Get the line 1 phone number (MSISDN). For CDMA phones, the MDN is returned 4961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * and {@link #getMsisdn()} will return the MSISDN on CDMA/LTE phones.<p> 4971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 4981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return phone number. May return null if not 4991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * available or the SIM is not ready 5001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getLine1Number(); 5021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Returns the alpha tag associated with the msisdn number. 5051a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * If there is no alpha tag associated or the record is not yet available, 5061a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * returns a default localized string. <p> 5071a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5081a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getLine1AlphaTag(); 5091a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Sets the MSISDN phone number in the SIM card. 5121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param alphaTag the alpha tag associated with the MSISDN phone number 5141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * (see getMsisdnAlphaTag) 5151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param number the new MSISDN phone number to be set on the SIM. 5161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 5171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true if req is sent, false otherwise. If req is not sent there will be no response, 5191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * that is, onComplete will never be sent. 5201a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5211a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean setLine1Number(String alphaTag, String number, Message onComplete); 5221a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5231a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5241a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Get the voice mail access phone number. Typically dialed when the 5251a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * user holds the "1" key in the phone app. May return null if not 5261a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * available or the SIM is not ready.<p> 5271a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5281a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getVoiceMailNumber(); 5291a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5301a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5311a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Returns the alpha tag associated with the voice mail number. 5321a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * If there is no alpha tag associated or the record is not yet available, 5331a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * returns a default localized string. <p> 5341a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5351a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Please use this value instead of some other localized string when 5361a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * showing a name for this number in the UI. For example, call log 5371a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * entries should show this alpha tag. <p> 5381a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5391a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Usage of this alpha tag in the UI is a common carrier requirement. 5401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getVoiceMailAlphaTag(); 5421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * setVoiceMailNumber 5451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * sets the voicemail number in the SIM card. 5461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param alphaTag the alpha tag associated with the voice mail number 5481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * (see getVoiceMailAlphaTag) 5491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param voiceMailNumber the new voicemail number to be set on the SIM. 5501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 5511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setVoiceMailNumber(String alphaTag, 5531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String voiceMailNumber, 5541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Message onComplete); 5551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * getCallForwardingOptions 5581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * gets a call forwarding option. The return value of 5591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * ((AsyncResult)onComplete.obj) is an array of CallForwardInfo. 5601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param commandInterfaceCFReason is one of the valid call forwarding 5621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * CF_REASONS, as defined in 5631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <code>com.android.internal.telephony.CommandsInterface.</code> 5641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 5651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @see com.android.internal.telephony.CallForwardInfo for details. 5661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void getCallForwardingOption(int commandInterfaceCFReason, 5681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Message onComplete); 5691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * setCallForwardingOptions 5721a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * sets a call forwarding option. 5731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5741a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param commandInterfaceCFReason is one of the valid call forwarding 5751a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * CF_REASONS, as defined in 5761a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <code>com.android.internal.telephony.CommandsInterface.</code> 5771a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param commandInterfaceCFAction is one of the valid call forwarding 5781a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * CF_ACTIONS, as defined in 5791a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <code>com.android.internal.telephony.CommandsInterface.</code> 5801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param dialingNumber is the target phone number to forward calls to 5811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param timerSeconds is used by CFNRy to indicate the timeout before 5821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * forwarding is attempted. 5831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 5841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setCallForwardingOption(int commandInterfaceCFReason, 5861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int commandInterfaceCFAction, 5871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String dialingNumber, 5881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu int timerSeconds, 5891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Message onComplete); 5901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 5911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 5921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * getOutgoingCallerIdDisplay 5931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * gets outgoing caller id display. The return value of 5941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * ((AsyncResult)onComplete.obj) is an array of int, with a length of 2. 5951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 5961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 5971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @see com.android.internal.telephony.CommandsInterface#getCLIR for details. 5981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 5991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void getOutgoingCallerIdDisplay(Message onComplete); 6001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * setOutgoingCallerIdDisplay 6031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * sets a call forwarding option. 6041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 6051a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param commandInterfaceCLIRMode is one of the valid call CLIR 6061a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * modes, as defined in 6071a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <code>com.android.internal.telephony.CommandsInterface./code> 6081a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 6091a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, 6111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu Message onComplete); 6121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * getCallWaiting 6151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * gets call waiting activation state. The return value of 6161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * ((AsyncResult)onComplete.obj) is an array of int, with a length of 1. 6171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 6181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 6191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @see com.android.internal.telephony.CommandsInterface#queryCallWaiting for details. 6201a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6211a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void getCallWaiting(Message onComplete); 6221a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6231a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6241a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * setCallWaiting 6251a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * sets a call forwarding option. 6261a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 6271a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param enable is a boolean representing the state that you are 6281a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * requesting, true for enabled, false for disabled. 6291a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param onComplete a callback message when the action is completed. 6301a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6311a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setCallWaiting(boolean enable, Message onComplete); 6321a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6331a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6341a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Scan available networks. This method is asynchronous; . 6351a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * On completion, <code>response.obj</code> is set to an AsyncResult with 6361a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * one of the following members:.<p> 6371a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu *<ul> 6381a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <li><code>response.obj.result</code> will be a <code>List</code> of 6391a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <code>OperatorInfo</code> objects, or</li> 6401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <li><code>response.obj.exception</code> will be set with an exception 6411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * on failure.</li> 6421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * </ul> 6431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void getAvailableNetworks(Message response); 6451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Query neighboring cell IDs. <code>response</code> is dispatched when 6481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * this is complete. <code>response.obj</code> will be an AsyncResult, 6491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * and <code>response.obj.exception</code> will be non-null on failure. 6501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * On success, <code>AsyncResult.result</code> will be a <code>String[]</code> 6511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * containing the neighboring cell IDs. Index 0 will contain the count 6521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * of available cell IDs. Cell IDs are in hexadecimal format. 6531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 6541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param response callback message that is dispatched when the query 6551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * completes. 6561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void getNeighboringCids(Message response); 6581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Mutes or unmutes the microphone for the active call. The microphone 6611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * is automatically unmuted if a call is answered, dialed, or resumed 6621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * from a holding state. 6631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 6641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param muted true to mute the microphone, 6651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * false to activate the microphone. 6661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setMute(boolean muted); 6691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Gets current mute status. Use 6721a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 6731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * java.lang.Object) registerForPreciseCallStateChanged()} 6741a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * as a change notifcation, although presently phone state changed is not 6751a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * fired when setMute() is called. 6761a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 6771a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true is muting, false is unmuting 6781a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6791a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean getMute(); 6801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Get the current active Data Call list 6831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 6841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param response <strong>On success</strong>, "response" bytes is 6851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * made available as: 6861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * (String[])(((AsyncResult)response.obj).result). 6871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * <strong>On failure</strong>, 6881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * (((AsyncResult)response.obj).result) == null and 6891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * (((AsyncResult)response.obj).exception) being an instance of 6901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * com.android.internal.telephony.gsm.CommandException 6911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void getDataCallList(Message response); 6931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 6951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Update the ServiceState CellLocation for current network registration. 6961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 6971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void updateServiceLocation(); 6981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 6991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Enable location update notifications. 7011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void enableLocationUpdates(); 7031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7051a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Disable location update notifications. 7061a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7071a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void disableLocationUpdates(); 7081a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7091a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7101a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true if enable data connection on roaming 7111a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7121a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean getDataRoamingEnabled(); 7131a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7141a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7151a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param enable set true if enable data connection on roaming 7161a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7171a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setDataRoamingEnabled(boolean enable); 7181a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7191a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7201a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @return true if user has enabled data 7211a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7221a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu boolean getDataEnabled(); 7231a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7241a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7251a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param @enable set {@code true} if enable data connection 7261a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7271a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void setDataEnabled(boolean enable); 7281a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7291a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7301a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves the unique device ID, e.g., IMEI for GSM phones and MEID for CDMA phones. 7311a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7321a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getDeviceId(); 7331a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7341a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7351a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves the software version number for the device, e.g., IMEI/SV 7361a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * for GSM phones. 7371a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7381a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getDeviceSvn(); 7391a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7401a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7411a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones. 7421a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7431a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getSubscriberId(); 7441a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7451a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7461a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves the Group Identifier Level1 for GSM phones. 7471a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7481a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getGroupIdLevel1(); 7491a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7501a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7511a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves the Group Identifier Level2 for phones. 7521a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7531a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getGroupIdLevel2(); 7541a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7551a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /* CDMA support methods */ 7561a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7571a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7581a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves the ESN for CDMA phones. 7591a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7601a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getEsn(); 7611a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7621a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7631a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves MEID for CDMA phones. 7641a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7651a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getMeid(); 7661a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7671a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7681a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves IMEI for phones. Returns null if IMEI is not set. 7691a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7701a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu String getImei(); 7711a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7721a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7731a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Retrieves the IccPhoneBookInterfaceManager of the Phone 7741a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7751a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager(); 7761a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7771a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7781a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Activate or deactivate cell broadcast SMS. 7791a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 7801a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param activate 7811a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 0 = activate, 1 = deactivate 7821a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param response 7831a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Callback message is empty on completion 7841a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7851a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void activateCellBroadcastSms(int activate, Message response); 7861a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7871a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7881a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Query the current configuration of cdma cell broadcast SMS. 7891a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 7901a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param response 7911a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Callback message is empty on completion 7921a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 7931a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu void getCellBroadcastSmsConfig(Message response); 7941a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu 7951a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu /** 7961a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Configure cell broadcast SMS. 7971a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 7981a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * TODO: Change the configValuesArray to a RIL_BroadcastSMSConfig 7991a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * 8001a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * @param response 8011a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu * Callback message is empty on completion 8021a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu */ 8031a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu public void setCellBroadcastSmsConfig(int[] configValuesArray, Message response); 8041a87ab3d7170d618f048c4f5af8c7504a587aaa5Jack Yu} 805