Phone.java revision 22ae2cc396de6231f06fbde617d79723092f17a5
1/* 2 * Copyright (C) 2007 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17package com.android.internal.telephony; 18 19import android.content.Context; 20import android.net.LinkProperties; 21import android.net.NetworkCapabilities; 22import android.os.Handler; 23import android.os.Message; 24import android.telephony.CellInfo; 25import android.telephony.CellLocation; 26import android.telephony.PhoneStateListener; 27import android.telephony.ServiceState; 28import android.telephony.SignalStrength; 29 30import com.android.internal.telephony.imsphone.ImsPhone; 31import com.android.internal.telephony.RadioCapability; 32import com.android.internal.telephony.test.SimulatedRadioControl; 33import com.android.internal.telephony.uicc.IsimRecords; 34import com.android.internal.telephony.uicc.UiccCard; 35import com.android.internal.telephony.uicc.UsimServiceTable; 36 37import com.android.internal.telephony.PhoneConstants.*; // ???? 38 39import java.util.List; 40import java.util.Locale; 41 42/** 43 * Internal interface used to control the phone; SDK developers cannot 44 * obtain this interface. 45 * 46 * {@hide} 47 * 48 */ 49public interface Phone { 50 51 /** used to enable additional debug messages */ 52 static final boolean DEBUG_PHONE = true; 53 54 public enum DataActivityState { 55 /** 56 * The state of a data activity. 57 * <ul> 58 * <li>NONE = No traffic</li> 59 * <li>DATAIN = Receiving IP ppp traffic</li> 60 * <li>DATAOUT = Sending IP ppp traffic</li> 61 * <li>DATAINANDOUT = Both receiving and sending IP ppp traffic</li> 62 * <li>DORMANT = The data connection is still active, 63 but physical link is down</li> 64 * </ul> 65 */ 66 NONE, DATAIN, DATAOUT, DATAINANDOUT, DORMANT; 67 } 68 69 enum SuppService { 70 UNKNOWN, SWITCH, SEPARATE, TRANSFER, CONFERENCE, REJECT, HANGUP, RESUME; 71 } 72 73 // "Features" accessible through the connectivity manager 74 static final String FEATURE_ENABLE_MMS = "enableMMS"; 75 static final String FEATURE_ENABLE_SUPL = "enableSUPL"; 76 static final String FEATURE_ENABLE_DUN = "enableDUN"; 77 static final String FEATURE_ENABLE_HIPRI = "enableHIPRI"; 78 static final String FEATURE_ENABLE_DUN_ALWAYS = "enableDUNAlways"; 79 static final String FEATURE_ENABLE_FOTA = "enableFOTA"; 80 static final String FEATURE_ENABLE_IMS = "enableIMS"; 81 static final String FEATURE_ENABLE_CBS = "enableCBS"; 82 static final String FEATURE_ENABLE_EMERGENCY = "enableEmergency"; 83 84 /** 85 * Optional reasons for disconnect and connect 86 */ 87 static final String REASON_ROAMING_ON = "roamingOn"; 88 static final String REASON_ROAMING_OFF = "roamingOff"; 89 static final String REASON_DATA_DISABLED = "dataDisabled"; 90 static final String REASON_DATA_ENABLED = "dataEnabled"; 91 static final String REASON_DATA_ATTACHED = "dataAttached"; 92 static final String REASON_DATA_DETACHED = "dataDetached"; 93 static final String REASON_CDMA_DATA_ATTACHED = "cdmaDataAttached"; 94 static final String REASON_CDMA_DATA_DETACHED = "cdmaDataDetached"; 95 static final String REASON_APN_CHANGED = "apnChanged"; 96 static final String REASON_APN_SWITCHED = "apnSwitched"; 97 static final String REASON_APN_FAILED = "apnFailed"; 98 static final String REASON_RESTORE_DEFAULT_APN = "restoreDefaultApn"; 99 static final String REASON_RADIO_TURNED_OFF = "radioTurnedOff"; 100 static final String REASON_PDP_RESET = "pdpReset"; 101 static final String REASON_VOICE_CALL_ENDED = "2GVoiceCallEnded"; 102 static final String REASON_VOICE_CALL_STARTED = "2GVoiceCallStarted"; 103 static final String REASON_PS_RESTRICT_ENABLED = "psRestrictEnabled"; 104 static final String REASON_PS_RESTRICT_DISABLED = "psRestrictDisabled"; 105 static final String REASON_SIM_LOADED = "simLoaded"; 106 static final String REASON_NW_TYPE_CHANGED = "nwTypeChanged"; 107 static final String REASON_DATA_DEPENDENCY_MET = "dependencyMet"; 108 static final String REASON_DATA_DEPENDENCY_UNMET = "dependencyUnmet"; 109 static final String REASON_LOST_DATA_CONNECTION = "lostDataConnection"; 110 static final String REASON_CONNECTED = "connected"; 111 static final String REASON_SINGLE_PDN_ARBITRATION = "SinglePdnArbitration"; 112 static final String REASON_DATA_SPECIFIC_DISABLED = "specificDisabled"; 113 static final String REASON_SIM_NOT_READY = "simNotReady"; 114 static final String REASON_IWLAN_AVAILABLE = "iwlanAvailable"; 115 static final String REASON_CARRIER_CHANGE = "carrierChange"; 116 117 // Used for band mode selection methods 118 static final int BM_UNSPECIFIED = 0; // selected by baseband automatically 119 static final int BM_EURO_BAND = 1; // GSM-900 / DCS-1800 / WCDMA-IMT-2000 120 static final int BM_US_BAND = 2; // GSM-850 / PCS-1900 / WCDMA-850 / WCDMA-PCS-1900 121 static final int BM_JPN_BAND = 3; // WCDMA-800 / WCDMA-IMT-2000 122 static final int BM_AUS_BAND = 4; // GSM-900 / DCS-1800 / WCDMA-850 / WCDMA-IMT-2000 123 static final int BM_AUS2_BAND = 5; // GSM-900 / DCS-1800 / WCDMA-850 124 static final int BM_BOUNDARY = 6; // upper band boundary 125 126 // Used for preferred network type 127 // Note NT_* substitute RILConstants.NETWORK_MODE_* above the Phone 128 int NT_MODE_WCDMA_PREF = RILConstants.NETWORK_MODE_WCDMA_PREF; 129 int NT_MODE_GSM_ONLY = RILConstants.NETWORK_MODE_GSM_ONLY; 130 int NT_MODE_WCDMA_ONLY = RILConstants.NETWORK_MODE_WCDMA_ONLY; 131 int NT_MODE_GSM_UMTS = RILConstants.NETWORK_MODE_GSM_UMTS; 132 133 int NT_MODE_CDMA = RILConstants.NETWORK_MODE_CDMA; 134 135 int NT_MODE_CDMA_NO_EVDO = RILConstants.NETWORK_MODE_CDMA_NO_EVDO; 136 int NT_MODE_EVDO_NO_CDMA = RILConstants.NETWORK_MODE_EVDO_NO_CDMA; 137 int NT_MODE_GLOBAL = RILConstants.NETWORK_MODE_GLOBAL; 138 139 int NT_MODE_LTE_CDMA_AND_EVDO = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO; 140 int NT_MODE_LTE_GSM_WCDMA = RILConstants.NETWORK_MODE_LTE_GSM_WCDMA; 141 int NT_MODE_LTE_CDMA_EVDO_GSM_WCDMA = RILConstants.NETWORK_MODE_LTE_CDMA_EVDO_GSM_WCDMA; 142 int NT_MODE_LTE_ONLY = RILConstants.NETWORK_MODE_LTE_ONLY; 143 int NT_MODE_LTE_WCDMA = RILConstants.NETWORK_MODE_LTE_WCDMA; 144 int PREFERRED_NT_MODE = RILConstants.PREFERRED_NETWORK_MODE; 145 146 // Used for CDMA roaming mode 147 static final int CDMA_RM_HOME = 0; // Home Networks only, as defined in PRL 148 static final int CDMA_RM_AFFILIATED = 1; // Roaming an Affiliated networks, as defined in PRL 149 static final int CDMA_RM_ANY = 2; // Roaming on Any Network, as defined in PRL 150 151 // Used for CDMA subscription mode 152 static final int CDMA_SUBSCRIPTION_UNKNOWN =-1; // Unknown 153 static final int CDMA_SUBSCRIPTION_RUIM_SIM = 0; // RUIM/SIM (default) 154 static final int CDMA_SUBSCRIPTION_NV = 1; // NV -> non-volatile memory 155 156 static final int PREFERRED_CDMA_SUBSCRIPTION = CDMA_SUBSCRIPTION_NV; 157 158 static final int TTY_MODE_OFF = 0; 159 static final int TTY_MODE_FULL = 1; 160 static final int TTY_MODE_HCO = 2; 161 static final int TTY_MODE_VCO = 3; 162 163 /** 164 * CDMA OTA PROVISION STATUS, the same as RIL_CDMA_OTA_Status in ril.h 165 */ 166 167 public static final int CDMA_OTA_PROVISION_STATUS_SPL_UNLOCKED = 0; 168 public static final int CDMA_OTA_PROVISION_STATUS_SPC_RETRIES_EXCEEDED = 1; 169 public static final int CDMA_OTA_PROVISION_STATUS_A_KEY_EXCHANGED = 2; 170 public static final int CDMA_OTA_PROVISION_STATUS_SSD_UPDATED = 3; 171 public static final int CDMA_OTA_PROVISION_STATUS_NAM_DOWNLOADED = 4; 172 public static final int CDMA_OTA_PROVISION_STATUS_MDN_DOWNLOADED = 5; 173 public static final int CDMA_OTA_PROVISION_STATUS_IMSI_DOWNLOADED = 6; 174 public static final int CDMA_OTA_PROVISION_STATUS_PRL_DOWNLOADED = 7; 175 public static final int CDMA_OTA_PROVISION_STATUS_COMMITTED = 8; 176 public static final int CDMA_OTA_PROVISION_STATUS_OTAPA_STARTED = 9; 177 public static final int CDMA_OTA_PROVISION_STATUS_OTAPA_STOPPED = 10; 178 public static final int CDMA_OTA_PROVISION_STATUS_OTAPA_ABORTED = 11; 179 180 181 /** 182 * Get the current ServiceState. Use 183 * <code>registerForServiceStateChanged</code> to be informed of 184 * updates. 185 */ 186 ServiceState getServiceState(); 187 188 /** 189 * Get the current CellLocation. 190 */ 191 CellLocation getCellLocation(); 192 193 /** 194 * @return all available cell information or null if none. 195 */ 196 public List<CellInfo> getAllCellInfo(); 197 198 /** 199 * Sets the minimum time in milli-seconds between {@link PhoneStateListener#onCellInfoChanged 200 * PhoneStateListener.onCellInfoChanged} will be invoked. 201 * 202 * The default, 0, means invoke onCellInfoChanged when any of the reported 203 * information changes. Setting the value to INT_MAX(0x7fffffff) means never issue 204 * A onCellInfoChanged. 205 * 206 * @param rateInMillis the rate 207 */ 208 public void setCellInfoListRate(int rateInMillis); 209 210 /** 211 * Get the current for the default apn DataState. No change notification 212 * exists at this interface -- use 213 * {@link android.telephony.PhoneStateListener} instead. 214 */ 215 DataState getDataConnectionState(); 216 217 /** 218 * Get the current DataState. No change notification exists at this 219 * interface -- use 220 * {@link android.telephony.PhoneStateListener} instead. 221 * @param apnType specify for which apn to get connection state info. 222 */ 223 DataState getDataConnectionState(String apnType); 224 225 /** 226 * Get the current DataActivityState. No change notification exists at this 227 * interface -- use 228 * {@link android.telephony.TelephonyManager} instead. 229 */ 230 DataActivityState getDataActivityState(); 231 232 /** 233 * Gets the context for the phone, as set at initialization time. 234 */ 235 Context getContext(); 236 237 /** 238 * Disables the DNS check (i.e., allows "0.0.0.0"). 239 * Useful for lab testing environment. 240 * @param b true disables the check, false enables. 241 */ 242 void disableDnsCheck(boolean b); 243 244 /** 245 * Returns true if the DNS check is currently disabled. 246 */ 247 boolean isDnsCheckDisabled(); 248 249 /** 250 * Get current coarse-grained voice call state. 251 * Use {@link #registerForPreciseCallStateChanged(Handler, int, Object) 252 * registerForPreciseCallStateChanged()} for change notification. <p> 253 * If the phone has an active call and call waiting occurs, 254 * then the phone state is RINGING not OFFHOOK 255 * <strong>Note:</strong> 256 * This registration point provides notification of finer-grained 257 * changes.<p> 258 * 259 */ 260 State getState(); 261 262 /** 263 * Returns a string identifier for this phone interface for parties 264 * outside the phone app process. 265 * @return The string name. 266 */ 267 String getPhoneName(); 268 269 /** 270 * Return a numerical identifier for the phone radio interface. 271 * @return PHONE_TYPE_XXX as defined above. 272 */ 273 int getPhoneType(); 274 275 /** 276 * Returns an array of string identifiers for the APN types serviced by the 277 * currently active. 278 * @return The string array will always return at least one entry, Phone.APN_TYPE_DEFAULT. 279 * TODO: Revisit if we always should return at least one entry. 280 */ 281 String[] getActiveApnTypes(); 282 283 /** 284 * Check if TETHER_DUN_APN setting or config_tether_apndata includes APN that matches 285 * current operator. 286 * @return true if there is a matching DUN APN. 287 */ 288 boolean hasMatchedTetherApnSetting(); 289 290 /** 291 * Returns string for the active APN host. 292 * @return type as a string or null if none. 293 */ 294 String getActiveApnHost(String apnType); 295 296 /** 297 * Return the LinkProperties for the named apn or null if not available 298 */ 299 LinkProperties getLinkProperties(String apnType); 300 301 /** 302 * Return the NetworkCapabilities 303 */ 304 NetworkCapabilities getNetworkCapabilities(String apnType); 305 306 /** 307 * Get current signal strength. No change notification available on this 308 * interface. Use <code>PhoneStateNotifier</code> or an equivalent. 309 * An ASU is 0-31 or -1 if unknown (for GSM, dBm = -113 - 2 * asu). 310 * The following special values are defined:</p> 311 * <ul><li>0 means "-113 dBm or less".</li> 312 * <li>31 means "-51 dBm or greater".</li></ul> 313 * 314 * @return Current signal strength as SignalStrength 315 */ 316 SignalStrength getSignalStrength(); 317 318 /** 319 * Notifies when a previously untracked non-ringing/waiting connection has appeared. 320 * This is likely due to some other entity (eg, SIM card application) initiating a call. 321 */ 322 void registerForUnknownConnection(Handler h, int what, Object obj); 323 324 /** 325 * Unregisters for unknown connection notifications. 326 */ 327 void unregisterForUnknownConnection(Handler h); 328 329 /** 330 * Notifies when a Handover happens due to SRVCC or Silent Redial 331 */ 332 void registerForHandoverStateChanged(Handler h, int what, Object obj); 333 334 /** 335 * Unregisters for handover state notifications 336 */ 337 void unregisterForHandoverStateChanged(Handler h); 338 339 /** 340 * Register for getting notifications for change in the Call State {@link Call.State} 341 * This is called PreciseCallState because the call state is more precise than the 342 * {@link PhoneConstants.State} which can be obtained using the {@link PhoneStateListener} 343 * 344 * Resulting events will have an AsyncResult in <code>Message.obj</code>. 345 * AsyncResult.userData will be set to the obj argument here. 346 * The <em>h</em> parameter is held only by a weak reference. 347 */ 348 void registerForPreciseCallStateChanged(Handler h, int what, Object obj); 349 350 /** 351 * Unregisters for voice call state change notifications. 352 * Extraneous calls are tolerated silently. 353 */ 354 void unregisterForPreciseCallStateChanged(Handler h); 355 356 /** 357 * Notifies when a new ringing or waiting connection has appeared.<p> 358 * 359 * Messages received from this: 360 * Message.obj will be an AsyncResult 361 * AsyncResult.userObj = obj 362 * AsyncResult.result = a Connection. <p> 363 * Please check Connection.isRinging() to make sure the Connection 364 * has not dropped since this message was posted. 365 * If Connection.isRinging() is true, then 366 * Connection.getCall() == Phone.getRingingCall() 367 */ 368 void registerForNewRingingConnection(Handler h, int what, Object obj); 369 370 /** 371 * Unregisters for new ringing connection notification. 372 * Extraneous calls are tolerated silently 373 */ 374 375 void unregisterForNewRingingConnection(Handler h); 376 377 /** 378 * Notifies when phone's video capabilities changes <p> 379 * 380 * Messages received from this: 381 * Message.obj will be an AsyncResult 382 * AsyncResult.userObj = obj 383 * AsyncResult.result = true if phone supports video calling <p> 384 */ 385 public void registerForVideoCapabilityChanged(Handler h, int what, Object obj); 386 387 /** 388 * Unregisters for video capability changed notification. 389 * Extraneous calls are tolerated silently 390 */ 391 public void unregisterForVideoCapabilityChanged(Handler h); 392 393 /** 394 * Notifies when an incoming call rings.<p> 395 * 396 * Messages received from this: 397 * Message.obj will be an AsyncResult 398 * AsyncResult.userObj = obj 399 * AsyncResult.result = a Connection. <p> 400 */ 401 void registerForIncomingRing(Handler h, int what, Object obj); 402 403 /** 404 * Unregisters for ring notification. 405 * Extraneous calls are tolerated silently 406 */ 407 408 void unregisterForIncomingRing(Handler h); 409 410 /** 411 * Notifies when out-band ringback tone is needed.<p> 412 * 413 * Messages received from this: 414 * Message.obj will be an AsyncResult 415 * AsyncResult.userObj = obj 416 * AsyncResult.result = boolean, true to start play ringback tone 417 * and false to stop. <p> 418 */ 419 void registerForRingbackTone(Handler h, int what, Object obj); 420 421 /** 422 * Unregisters for ringback tone notification. 423 */ 424 425 void unregisterForRingbackTone(Handler h); 426 427 /** 428 * Notifies when out-band on-hold tone is needed.<p> 429 * 430 * Messages received from this: 431 * Message.obj will be an AsyncResult 432 * AsyncResult.userObj = obj 433 * AsyncResult.result = boolean, true to start play on-hold tone 434 * and false to stop. <p> 435 */ 436 void registerForOnHoldTone(Handler h, int what, Object obj); 437 438 /** 439 * Unregisters for on-hold tone notification. 440 */ 441 442 void unregisterForOnHoldTone(Handler h); 443 444 /** 445 * Registers the handler to reset the uplink mute state to get 446 * uplink audio. 447 */ 448 void registerForResendIncallMute(Handler h, int what, Object obj); 449 450 /** 451 * Unregisters for resend incall mute notifications. 452 */ 453 void unregisterForResendIncallMute(Handler h); 454 455 /** 456 * Notifies when a voice connection has disconnected, either due to local 457 * or remote hangup or error. 458 * 459 * Messages received from this will have the following members:<p> 460 * <ul><li>Message.obj will be an AsyncResult</li> 461 * <li>AsyncResult.userObj = obj</li> 462 * <li>AsyncResult.result = a Connection object that is 463 * no longer connected.</li></ul> 464 */ 465 void registerForDisconnect(Handler h, int what, Object obj); 466 467 /** 468 * Unregisters for voice disconnection notification. 469 * Extraneous calls are tolerated silently 470 */ 471 void unregisterForDisconnect(Handler h); 472 473 474 /** 475 * Register for notifications of initiation of a new MMI code request. 476 * MMI codes for GSM are discussed in 3GPP TS 22.030.<p> 477 * 478 * Example: If Phone.dial is called with "*#31#", then the app will 479 * be notified here.<p> 480 * 481 * The returned <code>Message.obj</code> will contain an AsyncResult. 482 * 483 * <code>obj.result</code> will be an "MmiCode" object. 484 */ 485 void registerForMmiInitiate(Handler h, int what, Object obj); 486 487 /** 488 * Unregisters for new MMI initiate notification. 489 * Extraneous calls are tolerated silently 490 */ 491 void unregisterForMmiInitiate(Handler h); 492 493 /** 494 * Register for notifications that an MMI request has completed 495 * its network activity and is in its final state. This may mean a state 496 * of COMPLETE, FAILED, or CANCELLED. 497 * 498 * <code>Message.obj</code> will contain an AsyncResult. 499 * <code>obj.result</code> will be an "MmiCode" object 500 */ 501 void registerForMmiComplete(Handler h, int what, Object obj); 502 503 /** 504 * Unregisters for MMI complete notification. 505 * Extraneous calls are tolerated silently 506 */ 507 void unregisterForMmiComplete(Handler h); 508 509 /** 510 * Registration point for Ecm timer reset 511 * @param h handler to notify 512 * @param what user-defined message code 513 * @param obj placed in Message.obj 514 */ 515 public void registerForEcmTimerReset(Handler h, int what, Object obj); 516 517 /** 518 * Unregister for notification for Ecm timer reset 519 * @param h Handler to be removed from the registrant list. 520 */ 521 public void unregisterForEcmTimerReset(Handler h); 522 523 /** 524 * Returns a list of MMI codes that are pending. (They have initiated 525 * but have not yet completed). 526 * Presently there is only ever one. 527 * Use <code>registerForMmiInitiate</code> 528 * and <code>registerForMmiComplete</code> for change notification. 529 */ 530 public List<? extends MmiCode> getPendingMmiCodes(); 531 532 /** 533 * Sends user response to a USSD REQUEST message. An MmiCode instance 534 * representing this response is sent to handlers registered with 535 * registerForMmiInitiate. 536 * 537 * @param ussdMessge Message to send in the response. 538 */ 539 public void sendUssdResponse(String ussdMessge); 540 541 /** 542 * Register for ServiceState changed. 543 * Message.obj will contain an AsyncResult. 544 * AsyncResult.result will be a ServiceState instance 545 */ 546 void registerForServiceStateChanged(Handler h, int what, Object obj); 547 548 /** 549 * Unregisters for ServiceStateChange notification. 550 * Extraneous calls are tolerated silently 551 */ 552 void unregisterForServiceStateChanged(Handler h); 553 554 /** 555 * Register for Supplementary Service notifications from the network. 556 * Message.obj will contain an AsyncResult. 557 * AsyncResult.result will be a SuppServiceNotification instance. 558 * 559 * @param h Handler that receives the notification message. 560 * @param what User-defined message code. 561 * @param obj User object. 562 */ 563 void registerForSuppServiceNotification(Handler h, int what, Object obj); 564 565 /** 566 * Unregisters for Supplementary Service notifications. 567 * Extraneous calls are tolerated silently 568 * 569 * @param h Handler to be removed from the registrant list. 570 */ 571 void unregisterForSuppServiceNotification(Handler h); 572 573 /** 574 * Register for notifications when a supplementary service attempt fails. 575 * Message.obj will contain an AsyncResult. 576 * 577 * @param h Handler that receives the notification message. 578 * @param what User-defined message code. 579 * @param obj User object. 580 */ 581 void registerForSuppServiceFailed(Handler h, int what, Object obj); 582 583 /** 584 * Unregister for notifications when a supplementary service attempt fails. 585 * Extraneous calls are tolerated silently 586 * 587 * @param h Handler to be removed from the registrant list. 588 */ 589 void unregisterForSuppServiceFailed(Handler h); 590 591 /** 592 * Register for notifications when a sInCall VoicePrivacy is enabled 593 * 594 * @param h Handler that receives the notification message. 595 * @param what User-defined message code. 596 * @param obj User object. 597 */ 598 void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj); 599 600 /** 601 * Unegister for notifications when a sInCall VoicePrivacy is enabled 602 * 603 * @param h Handler to be removed from the registrant list. 604 */ 605 void unregisterForInCallVoicePrivacyOn(Handler h); 606 607 /** 608 * Register for notifications when a sInCall VoicePrivacy is disabled 609 * 610 * @param h Handler that receives the notification message. 611 * @param what User-defined message code. 612 * @param obj User object. 613 */ 614 void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj); 615 616 /** 617 * Unregister for notifications when a sInCall VoicePrivacy is disabled 618 * 619 * @param h Handler to be removed from the registrant list. 620 */ 621 void unregisterForInCallVoicePrivacyOff(Handler h); 622 623 /** 624 * Register for notifications when CDMA OTA Provision status change 625 * 626 * @param h Handler that receives the notification message. 627 * @param what User-defined message code. 628 * @param obj User object. 629 */ 630 void registerForCdmaOtaStatusChange(Handler h, int what, Object obj); 631 632 /** 633 * Unregister for notifications when CDMA OTA Provision status change 634 * @param h Handler to be removed from the registrant list. 635 */ 636 void unregisterForCdmaOtaStatusChange(Handler h); 637 638 /** 639 * Registration point for subscription info ready 640 * @param h handler to notify 641 * @param what what code of message when delivered 642 * @param obj placed in Message.obj 643 */ 644 public void registerForSubscriptionInfoReady(Handler h, int what, Object obj); 645 646 /** 647 * Unregister for notifications for subscription info 648 * @param h Handler to be removed from the registrant list. 649 */ 650 public void unregisterForSubscriptionInfoReady(Handler h); 651 652 /** 653 * Registration point for Sim records loaded 654 * @param h handler to notify 655 * @param what what code of message when delivered 656 * @param obj placed in Message.obj 657 */ 658 public void registerForSimRecordsLoaded(Handler h, int what, Object obj); 659 660 /** 661 * Unregister for notifications for Sim records loaded 662 * @param h Handler to be removed from the registrant list. 663 */ 664 public void unregisterForSimRecordsLoaded(Handler h); 665 666 /** 667 * Register for TTY mode change notifications from the network. 668 * Message.obj will contain an AsyncResult. 669 * AsyncResult.result will be an Integer containing new mode. 670 * 671 * @param h Handler that receives the notification message. 672 * @param what User-defined message code. 673 * @param obj User object. 674 */ 675 public void registerForTtyModeReceived(Handler h, int what, Object obj); 676 677 /** 678 * Unregisters for TTY mode change notifications. 679 * Extraneous calls are tolerated silently 680 * 681 * @param h Handler to be removed from the registrant list. 682 */ 683 public void unregisterForTtyModeReceived(Handler h); 684 685 /** 686 * Returns SIM record load state. Use 687 * <code>getSimCard().registerForReady()</code> for change notification. 688 * 689 * @return true if records from the SIM have been loaded and are 690 * available (if applicable). If not applicable to the underlying 691 * technology, returns true as well. 692 */ 693 boolean getIccRecordsLoaded(); 694 695 /** 696 * Returns the ICC card interface for this phone, or null 697 * if not applicable to underlying technology. 698 */ 699 IccCard getIccCard(); 700 701 /** 702 * Answers a ringing or waiting call. Active calls, if any, go on hold. 703 * Answering occurs asynchronously, and final notification occurs via 704 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 705 * java.lang.Object) registerForPreciseCallStateChanged()}. 706 * 707 * @param videoState The video state in which to answer the call. 708 * @exception CallStateException when no call is ringing or waiting 709 */ 710 void acceptCall(int videoState) throws CallStateException; 711 712 /** 713 * Reject (ignore) a ringing call. In GSM, this means UDUB 714 * (User Determined User Busy). Reject occurs asynchronously, 715 * and final notification occurs via 716 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 717 * java.lang.Object) registerForPreciseCallStateChanged()}. 718 * 719 * @exception CallStateException when no call is ringing or waiting 720 */ 721 void rejectCall() throws CallStateException; 722 723 /** 724 * Places any active calls on hold, and makes any held calls 725 * active. Switch occurs asynchronously and may fail. 726 * Final notification occurs via 727 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 728 * java.lang.Object) registerForPreciseCallStateChanged()}. 729 * 730 * @exception CallStateException if a call is ringing, waiting, or 731 * dialing/alerting. In these cases, this operation may not be performed. 732 */ 733 void switchHoldingAndActive() throws CallStateException; 734 735 /** 736 * Whether or not the phone can conference in the current phone 737 * state--that is, one call holding and one call active. 738 * @return true if the phone can conference; false otherwise. 739 */ 740 boolean canConference(); 741 742 /** 743 * Conferences holding and active. Conference occurs asynchronously 744 * and may fail. Final notification occurs via 745 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 746 * java.lang.Object) registerForPreciseCallStateChanged()}. 747 * 748 * @exception CallStateException if canConference() would return false. 749 * In these cases, this operation may not be performed. 750 */ 751 void conference() throws CallStateException; 752 753 /** 754 * Enable or disable enhanced Voice Privacy (VP). If enhanced VP is 755 * disabled, normal VP is enabled. 756 * 757 * @param enable whether true or false to enable or disable. 758 * @param onComplete a callback message when the action is completed. 759 */ 760 void enableEnhancedVoicePrivacy(boolean enable, Message onComplete); 761 762 /** 763 * Get the currently set Voice Privacy (VP) mode. 764 * 765 * @param onComplete a callback message when the action is completed. 766 */ 767 void getEnhancedVoicePrivacy(Message onComplete); 768 769 /** 770 * Whether or not the phone can do explicit call transfer in the current 771 * phone state--that is, one call holding and one call active. 772 * @return true if the phone can do explicit call transfer; false otherwise. 773 */ 774 boolean canTransfer(); 775 776 /** 777 * Connects the two calls and disconnects the subscriber from both calls 778 * Explicit Call Transfer occurs asynchronously 779 * and may fail. Final notification occurs via 780 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 781 * java.lang.Object) registerForPreciseCallStateChanged()}. 782 * 783 * @exception CallStateException if canTransfer() would return false. 784 * In these cases, this operation may not be performed. 785 */ 786 void explicitCallTransfer() throws CallStateException; 787 788 /** 789 * Clears all DISCONNECTED connections from Call connection lists. 790 * Calls that were in the DISCONNECTED state become idle. This occurs 791 * synchronously. 792 */ 793 void clearDisconnected(); 794 795 796 /** 797 * Gets the foreground call object, which represents all connections that 798 * are dialing or active (all connections 799 * that have their audio path connected).<p> 800 * 801 * The foreground call is a singleton object. It is constant for the life 802 * of this phone. It is never null.<p> 803 * 804 * The foreground call will only ever be in one of these states: 805 * IDLE, ACTIVE, DIALING, ALERTING, or DISCONNECTED. 806 * 807 * State change notification is available via 808 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 809 * java.lang.Object) registerForPreciseCallStateChanged()}. 810 */ 811 Call getForegroundCall(); 812 813 /** 814 * Gets the background call object, which represents all connections that 815 * are holding (all connections that have been accepted or connected, but 816 * do not have their audio path connected). <p> 817 * 818 * The background call is a singleton object. It is constant for the life 819 * of this phone object . It is never null.<p> 820 * 821 * The background call will only ever be in one of these states: 822 * IDLE, HOLDING or DISCONNECTED. 823 * 824 * State change notification is available via 825 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 826 * java.lang.Object) registerForPreciseCallStateChanged()}. 827 */ 828 Call getBackgroundCall(); 829 830 /** 831 * Gets the ringing call object, which represents an incoming 832 * connection (if present) that is pending answer/accept. (This connection 833 * may be RINGING or WAITING, and there may be only one.)<p> 834 835 * The ringing call is a singleton object. It is constant for the life 836 * of this phone. It is never null.<p> 837 * 838 * The ringing call will only ever be in one of these states: 839 * IDLE, INCOMING, WAITING or DISCONNECTED. 840 * 841 * State change notification is available via 842 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 843 * java.lang.Object) registerForPreciseCallStateChanged()}. 844 */ 845 Call getRingingCall(); 846 847 /** 848 * Initiate a new voice connection. This happens asynchronously, so you 849 * cannot assume the audio path is connected (or a call index has been 850 * assigned) until PhoneStateChanged notification has occurred. 851 * 852 * @param dialString The dial string. 853 * @param videoState The desired video state for the connection. 854 * @exception CallStateException if a new outgoing call is not currently 855 * possible because no more call slots exist or a call exists that is 856 * dialing, alerting, ringing, or waiting. Other errors are 857 * handled asynchronously. 858 */ 859 Connection dial(String dialString, int videoState) throws CallStateException; 860 861 /** 862 * Initiate a new voice connection with supplementary User to User 863 * Information. This happens asynchronously, so you cannot assume the audio 864 * path is connected (or a call index has been assigned) until 865 * PhoneStateChanged notification has occurred. 866 * 867 * @param dialString The dial string. 868 * @param uusInfo The UUSInfo. 869 * @param videoState The desired video state for the connection. 870 * @exception CallStateException if a new outgoing call is not currently 871 * possible because no more call slots exist or a call exists 872 * that is dialing, alerting, ringing, or waiting. Other 873 * errors are handled asynchronously. 874 */ 875 Connection dial(String dialString, UUSInfo uusInfo, int videoState) throws CallStateException; 876 877 /** 878 * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 879 * without SEND (so <code>dial</code> is not appropriate). 880 * 881 * @param dialString the MMI command to be executed. 882 * @return true if MMI command is executed. 883 */ 884 boolean handlePinMmi(String dialString); 885 886 /** 887 * Handles in-call MMI commands. While in a call, or while receiving a 888 * call, use this to execute MMI commands. 889 * see 3GPP 20.030, section 6.5.5.1 for specs on the allowed MMI commands. 890 * 891 * @param command the MMI command to be executed. 892 * @return true if the MMI command is executed. 893 * @throws CallStateException 894 */ 895 boolean handleInCallMmiCommands(String command) throws CallStateException; 896 897 /** 898 * Play a DTMF tone on the active call. Ignored if there is no active call. 899 * @param c should be one of 0-9, '*' or '#'. Other values will be 900 * silently ignored. 901 */ 902 void sendDtmf(char c); 903 904 /** 905 * Start to paly a DTMF tone on the active call. Ignored if there is no active call 906 * or there is a playing DTMF tone. 907 * @param c should be one of 0-9, '*' or '#'. Other values will be 908 * silently ignored. 909 */ 910 void startDtmf(char c); 911 912 /** 913 * Stop the playing DTMF tone. Ignored if there is no playing DTMF 914 * tone or no active call. 915 */ 916 void stopDtmf(); 917 918 /** 919 * send burst DTMF tone, it can send the string as single character or multiple character 920 * ignore if there is no active call or not valid digits string. 921 * Valid digit means only includes characters ISO-LATIN characters 0-9, *, # 922 * The difference between sendDtmf and sendBurstDtmf is sendDtmf only sends one character, 923 * this api can send single character and multiple character, also, this api has response 924 * back to caller. 925 * 926 * @param dtmfString is string representing the dialing digit(s) in the active call 927 * @param on the DTMF ON length in milliseconds, or 0 for default 928 * @param off the DTMF OFF length in milliseconds, or 0 for default 929 * @param onComplete is the callback message when the action is processed by BP 930 * 931 */ 932 void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete); 933 934 /** 935 * Sets the radio power on/off state (off is sometimes 936 * called "airplane mode"). Current state can be gotten via 937 * {@link #getServiceState()}.{@link 938 * android.telephony.ServiceState#getState() getState()}. 939 * <strong>Note: </strong>This request is asynchronous. 940 * getServiceState().getState() will not change immediately after this call. 941 * registerForServiceStateChanged() to find out when the 942 * request is complete. 943 * 944 * @param power true means "on", false means "off". 945 */ 946 void setRadioPower(boolean power); 947 948 /** 949 * Get voice message waiting indicator status. No change notification 950 * available on this interface. Use PhoneStateNotifier or similar instead. 951 * 952 * @return true if there is a voice message waiting 953 */ 954 boolean getMessageWaitingIndicator(); 955 956 /** 957 * Get voice call forwarding indicator status. No change notification 958 * available on this interface. Use PhoneStateNotifier or similar instead. 959 * 960 * @return true if there is a voice call forwarding 961 */ 962 boolean getCallForwardingIndicator(); 963 964 /** 965 * Get the line 1 phone number (MSISDN). For CDMA phones, the MDN is returned 966 * and {@link #getMsisdn()} will return the MSISDN on CDMA/LTE phones.<p> 967 * 968 * @return phone number. May return null if not 969 * available or the SIM is not ready 970 */ 971 String getLine1Number(); 972 973 /** 974 * Returns the alpha tag associated with the msisdn number. 975 * If there is no alpha tag associated or the record is not yet available, 976 * returns a default localized string. <p> 977 */ 978 String getLine1AlphaTag(); 979 980 /** 981 * Sets the MSISDN phone number in the SIM card. 982 * 983 * @param alphaTag the alpha tag associated with the MSISDN phone number 984 * (see getMsisdnAlphaTag) 985 * @param number the new MSISDN phone number to be set on the SIM. 986 * @param onComplete a callback message when the action is completed. 987 * 988 * @return true if req is sent, false otherwise. If req is not sent there will be no response, 989 * that is, onComplete will never be sent. 990 */ 991 boolean setLine1Number(String alphaTag, String number, Message onComplete); 992 993 /** 994 * Get the voice mail access phone number. Typically dialed when the 995 * user holds the "1" key in the phone app. May return null if not 996 * available or the SIM is not ready.<p> 997 */ 998 String getVoiceMailNumber(); 999 1000 /** 1001 * Returns unread voicemail count. This count is shown when the voicemail 1002 * notification is expanded.<p> 1003 */ 1004 int getVoiceMessageCount(); 1005 1006 /** 1007 * Returns the alpha tag associated with the voice mail number. 1008 * If there is no alpha tag associated or the record is not yet available, 1009 * returns a default localized string. <p> 1010 * 1011 * Please use this value instead of some other localized string when 1012 * showing a name for this number in the UI. For example, call log 1013 * entries should show this alpha tag. <p> 1014 * 1015 * Usage of this alpha tag in the UI is a common carrier requirement. 1016 */ 1017 String getVoiceMailAlphaTag(); 1018 1019 /** 1020 * setVoiceMailNumber 1021 * sets the voicemail number in the SIM card. 1022 * 1023 * @param alphaTag the alpha tag associated with the voice mail number 1024 * (see getVoiceMailAlphaTag) 1025 * @param voiceMailNumber the new voicemail number to be set on the SIM. 1026 * @param onComplete a callback message when the action is completed. 1027 */ 1028 void setVoiceMailNumber(String alphaTag, 1029 String voiceMailNumber, 1030 Message onComplete); 1031 1032 /** 1033 * getCallForwardingOptions 1034 * gets a call forwarding option. The return value of 1035 * ((AsyncResult)onComplete.obj) is an array of CallForwardInfo. 1036 * 1037 * @param commandInterfaceCFReason is one of the valid call forwarding 1038 * CF_REASONS, as defined in 1039 * <code>com.android.internal.telephony.CommandsInterface.</code> 1040 * @param onComplete a callback message when the action is completed. 1041 * @see com.android.internal.telephony.CallForwardInfo for details. 1042 */ 1043 void getCallForwardingOption(int commandInterfaceCFReason, 1044 Message onComplete); 1045 1046 /** 1047 * setCallForwardingOptions 1048 * sets a call forwarding option. 1049 * 1050 * @param commandInterfaceCFReason is one of the valid call forwarding 1051 * CF_REASONS, as defined in 1052 * <code>com.android.internal.telephony.CommandsInterface.</code> 1053 * @param commandInterfaceCFAction is one of the valid call forwarding 1054 * CF_ACTIONS, as defined in 1055 * <code>com.android.internal.telephony.CommandsInterface.</code> 1056 * @param dialingNumber is the target phone number to forward calls to 1057 * @param timerSeconds is used by CFNRy to indicate the timeout before 1058 * forwarding is attempted. 1059 * @param onComplete a callback message when the action is completed. 1060 */ 1061 void setCallForwardingOption(int commandInterfaceCFReason, 1062 int commandInterfaceCFAction, 1063 String dialingNumber, 1064 int timerSeconds, 1065 Message onComplete); 1066 1067 /** 1068 * getOutgoingCallerIdDisplay 1069 * gets outgoing caller id display. The return value of 1070 * ((AsyncResult)onComplete.obj) is an array of int, with a length of 2. 1071 * 1072 * @param onComplete a callback message when the action is completed. 1073 * @see com.android.internal.telephony.CommandsInterface#getCLIR for details. 1074 */ 1075 void getOutgoingCallerIdDisplay(Message onComplete); 1076 1077 /** 1078 * setOutgoingCallerIdDisplay 1079 * sets a call forwarding option. 1080 * 1081 * @param commandInterfaceCLIRMode is one of the valid call CLIR 1082 * modes, as defined in 1083 * <code>com.android.internal.telephony.CommandsInterface./code> 1084 * @param onComplete a callback message when the action is completed. 1085 */ 1086 void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, 1087 Message onComplete); 1088 1089 /** 1090 * getCallWaiting 1091 * gets call waiting activation state. The return value of 1092 * ((AsyncResult)onComplete.obj) is an array of int, with a length of 1. 1093 * 1094 * @param onComplete a callback message when the action is completed. 1095 * @see com.android.internal.telephony.CommandsInterface#queryCallWaiting for details. 1096 */ 1097 void getCallWaiting(Message onComplete); 1098 1099 /** 1100 * setCallWaiting 1101 * sets a call forwarding option. 1102 * 1103 * @param enable is a boolean representing the state that you are 1104 * requesting, true for enabled, false for disabled. 1105 * @param onComplete a callback message when the action is completed. 1106 */ 1107 void setCallWaiting(boolean enable, Message onComplete); 1108 1109 /** 1110 * Scan available networks. This method is asynchronous; . 1111 * On completion, <code>response.obj</code> is set to an AsyncResult with 1112 * one of the following members:.<p> 1113 *<ul> 1114 * <li><code>response.obj.result</code> will be a <code>List</code> of 1115 * <code>OperatorInfo</code> objects, or</li> 1116 * <li><code>response.obj.exception</code> will be set with an exception 1117 * on failure.</li> 1118 * </ul> 1119 */ 1120 void getAvailableNetworks(Message response); 1121 1122 /** 1123 * Switches network selection mode to "automatic", re-scanning and 1124 * re-selecting a network if appropriate. 1125 * 1126 * @param response The message to dispatch when the network selection 1127 * is complete. 1128 * 1129 * @see #selectNetworkManually(OperatorInfo, android.os.Message ) 1130 */ 1131 void setNetworkSelectionModeAutomatic(Message response); 1132 1133 /** 1134 * Manually selects a network. <code>response</code> is 1135 * dispatched when this is complete. <code>response.obj</code> will be 1136 * an AsyncResult, and <code>response.obj.exception</code> will be non-null 1137 * on failure. 1138 * 1139 * @see #setNetworkSelectionModeAutomatic(Message) 1140 */ 1141 void selectNetworkManually(OperatorInfo network, 1142 Message response); 1143 1144 /** 1145 * Query the radio for the current network selection mode. 1146 * 1147 * Return values: 1148 * 0 - automatic. 1149 * 1 - manual. 1150 */ 1151 void getNetworkSelectionMode(Message response); 1152 1153 /** 1154 * Requests to set the preferred network type for searching and registering 1155 * (CS/PS domain, RAT, and operation mode) 1156 * @param networkType one of NT_*_TYPE 1157 * @param response is callback message 1158 */ 1159 void setPreferredNetworkType(int networkType, Message response); 1160 1161 /** 1162 * Query the preferred network type setting 1163 * 1164 * @param response is callback message to report one of NT_*_TYPE 1165 */ 1166 void getPreferredNetworkType(Message response); 1167 1168 /** 1169 * Gets the default SMSC address. 1170 * 1171 * @param result Callback message contains the SMSC address. 1172 */ 1173 void getSmscAddress(Message result); 1174 1175 /** 1176 * Sets the default SMSC address. 1177 * 1178 * @param address new SMSC address 1179 * @param result Callback message is empty on completion 1180 */ 1181 void setSmscAddress(String address, Message result); 1182 1183 /** 1184 * Query neighboring cell IDs. <code>response</code> is dispatched when 1185 * this is complete. <code>response.obj</code> will be an AsyncResult, 1186 * and <code>response.obj.exception</code> will be non-null on failure. 1187 * On success, <code>AsyncResult.result</code> will be a <code>String[]</code> 1188 * containing the neighboring cell IDs. Index 0 will contain the count 1189 * of available cell IDs. Cell IDs are in hexadecimal format. 1190 * 1191 * @param response callback message that is dispatched when the query 1192 * completes. 1193 */ 1194 void getNeighboringCids(Message response); 1195 1196 /** 1197 * Sets an event to be fired when the telephony system processes 1198 * a post-dial character on an outgoing call.<p> 1199 * 1200 * Messages of type <code>what</code> will be sent to <code>h</code>. 1201 * The <code>obj</code> field of these Message's will be instances of 1202 * <code>AsyncResult</code>. <code>Message.obj.result</code> will be 1203 * a Connection object.<p> 1204 * 1205 * Message.arg1 will be the post dial character being processed, 1206 * or 0 ('\0') if end of string.<p> 1207 * 1208 * If Connection.getPostDialState() == WAIT, 1209 * the application must call 1210 * {@link com.android.internal.telephony.Connection#proceedAfterWaitChar() 1211 * Connection.proceedAfterWaitChar()} or 1212 * {@link com.android.internal.telephony.Connection#cancelPostDial() 1213 * Connection.cancelPostDial()} 1214 * for the telephony system to continue playing the post-dial 1215 * DTMF sequence.<p> 1216 * 1217 * If Connection.getPostDialState() == WILD, 1218 * the application must call 1219 * {@link com.android.internal.telephony.Connection#proceedAfterWildChar 1220 * Connection.proceedAfterWildChar()} 1221 * or 1222 * {@link com.android.internal.telephony.Connection#cancelPostDial() 1223 * Connection.cancelPostDial()} 1224 * for the telephony system to continue playing the 1225 * post-dial DTMF sequence.<p> 1226 * 1227 * Only one post dial character handler may be set. <p> 1228 * Calling this method with "h" equal to null unsets this handler.<p> 1229 */ 1230 void setOnPostDialCharacter(Handler h, int what, Object obj); 1231 1232 1233 /** 1234 * Mutes or unmutes the microphone for the active call. The microphone 1235 * is automatically unmuted if a call is answered, dialed, or resumed 1236 * from a holding state. 1237 * 1238 * @param muted true to mute the microphone, 1239 * false to activate the microphone. 1240 */ 1241 1242 void setMute(boolean muted); 1243 1244 /** 1245 * Gets current mute status. Use 1246 * {@link #registerForPreciseCallStateChanged(android.os.Handler, int, 1247 * java.lang.Object) registerForPreciseCallStateChanged()} 1248 * as a change notifcation, although presently phone state changed is not 1249 * fired when setMute() is called. 1250 * 1251 * @return true is muting, false is unmuting 1252 */ 1253 boolean getMute(); 1254 1255 /** 1256 * Enables or disables echo suppression. 1257 */ 1258 void setEchoSuppressionEnabled(); 1259 1260 /** 1261 * Invokes RIL_REQUEST_OEM_HOOK_RAW on RIL implementation. 1262 * 1263 * @param data The data for the request. 1264 * @param response <strong>On success</strong>, 1265 * (byte[])(((AsyncResult)response.obj).result) 1266 * <strong>On failure</strong>, 1267 * (((AsyncResult)response.obj).result) == null and 1268 * (((AsyncResult)response.obj).exception) being an instance of 1269 * com.android.internal.telephony.gsm.CommandException 1270 * 1271 * @see #invokeOemRilRequestRaw(byte[], android.os.Message) 1272 */ 1273 void invokeOemRilRequestRaw(byte[] data, Message response); 1274 1275 /** 1276 * Invokes RIL_REQUEST_OEM_HOOK_Strings on RIL implementation. 1277 * 1278 * @param strings The strings to make available as the request data. 1279 * @param response <strong>On success</strong>, "response" bytes is 1280 * made available as: 1281 * (String[])(((AsyncResult)response.obj).result). 1282 * <strong>On failure</strong>, 1283 * (((AsyncResult)response.obj).result) == null and 1284 * (((AsyncResult)response.obj).exception) being an instance of 1285 * com.android.internal.telephony.gsm.CommandException 1286 * 1287 * @see #invokeOemRilRequestStrings(java.lang.String[], android.os.Message) 1288 */ 1289 void invokeOemRilRequestStrings(String[] strings, Message response); 1290 1291 /** 1292 * Get the current active Data Call list 1293 * 1294 * @param response <strong>On success</strong>, "response" bytes is 1295 * made available as: 1296 * (String[])(((AsyncResult)response.obj).result). 1297 * <strong>On failure</strong>, 1298 * (((AsyncResult)response.obj).result) == null and 1299 * (((AsyncResult)response.obj).exception) being an instance of 1300 * com.android.internal.telephony.gsm.CommandException 1301 */ 1302 void getDataCallList(Message response); 1303 1304 /** 1305 * Update the ServiceState CellLocation for current network registration. 1306 */ 1307 void updateServiceLocation(); 1308 1309 /** 1310 * Enable location update notifications. 1311 */ 1312 void enableLocationUpdates(); 1313 1314 /** 1315 * Disable location update notifications. 1316 */ 1317 void disableLocationUpdates(); 1318 1319 /** 1320 * For unit tests; don't send notifications to "Phone" 1321 * mailbox registrants if true. 1322 */ 1323 void setUnitTestMode(boolean f); 1324 1325 /** 1326 * @return true If unit test mode is enabled 1327 */ 1328 boolean getUnitTestMode(); 1329 1330 /** 1331 * Assign a specified band for RF configuration. 1332 * 1333 * @param bandMode one of BM_*_BAND 1334 * @param response is callback message 1335 */ 1336 void setBandMode(int bandMode, Message response); 1337 1338 /** 1339 * Query the list of band mode supported by RF. 1340 * 1341 * @param response is callback message 1342 * ((AsyncResult)response.obj).result is an int[] where int[0] is 1343 * the size of the array and the rest of each element representing 1344 * one available BM_*_BAND 1345 */ 1346 void queryAvailableBandMode(Message response); 1347 1348 /** 1349 * @return true if enable data connection on roaming 1350 */ 1351 boolean getDataRoamingEnabled(); 1352 1353 /** 1354 * @param enable set true if enable data connection on roaming 1355 */ 1356 void setDataRoamingEnabled(boolean enable); 1357 1358 /** 1359 * @return true if user has enabled data 1360 */ 1361 boolean getDataEnabled(); 1362 1363 /** 1364 * @param @enable set {@code true} if enable data connection 1365 */ 1366 void setDataEnabled(boolean enable); 1367 1368 /** 1369 * Query the CDMA roaming preference setting 1370 * 1371 * @param response is callback message to report one of CDMA_RM_* 1372 */ 1373 void queryCdmaRoamingPreference(Message response); 1374 1375 /** 1376 * Requests to set the CDMA roaming preference 1377 * @param cdmaRoamingType one of CDMA_RM_* 1378 * @param response is callback message 1379 */ 1380 void setCdmaRoamingPreference(int cdmaRoamingType, Message response); 1381 1382 /** 1383 * Requests to set the CDMA subscription mode 1384 * @param cdmaSubscriptionType one of CDMA_SUBSCRIPTION_* 1385 * @param response is callback message 1386 */ 1387 void setCdmaSubscription(int cdmaSubscriptionType, Message response); 1388 1389 /** 1390 * If this is a simulated phone interface, returns a SimulatedRadioControl. 1391 * @return SimulatedRadioControl if this is a simulated interface; 1392 * otherwise, null. 1393 */ 1394 SimulatedRadioControl getSimulatedRadioControl(); 1395 1396 /** 1397 * Report on whether data connectivity is allowed. 1398 */ 1399 boolean isDataConnectivityPossible(); 1400 1401 /** 1402 * Report on whether data connectivity is allowed for an APN. 1403 */ 1404 boolean isDataConnectivityPossible(String apnType); 1405 1406 /** 1407 * Retrieves the unique device ID, e.g., IMEI for GSM phones and MEID for CDMA phones. 1408 */ 1409 String getDeviceId(); 1410 1411 /** 1412 * Retrieves the software version number for the device, e.g., IMEI/SV 1413 * for GSM phones. 1414 */ 1415 String getDeviceSvn(); 1416 1417 /** 1418 * Retrieves the unique subscriber ID, e.g., IMSI for GSM phones. 1419 */ 1420 String getSubscriberId(); 1421 1422 /** 1423 * Retrieves the Group Identifier Level1 for GSM phones. 1424 */ 1425 String getGroupIdLevel1(); 1426 1427 /** 1428 * Retrieves the Group Identifier Level2 for phones. 1429 */ 1430 String getGroupIdLevel2(); 1431 1432 /** 1433 * Retrieves the serial number of the ICC, if applicable. 1434 */ 1435 String getIccSerialNumber(); 1436 1437 /* CDMA support methods */ 1438 1439 /** 1440 * Retrieves the MIN for CDMA phones. 1441 */ 1442 String getCdmaMin(); 1443 1444 /** 1445 * Check if subscription data has been assigned to mMin 1446 * 1447 * return true if MIN info is ready; false otherwise. 1448 */ 1449 boolean isMinInfoReady(); 1450 1451 /** 1452 * Retrieves PRL Version for CDMA phones 1453 */ 1454 String getCdmaPrlVersion(); 1455 1456 /** 1457 * Retrieves the ESN for CDMA phones. 1458 */ 1459 String getEsn(); 1460 1461 /** 1462 * Retrieves MEID for CDMA phones. 1463 */ 1464 String getMeid(); 1465 1466 /** 1467 * Retrieves the MSISDN from the UICC. For GSM/UMTS phones, this is equivalent to 1468 * {@link #getLine1Number()}. For CDMA phones, {@link #getLine1Number()} returns 1469 * the MDN, so this method is provided to return the MSISDN on CDMA/LTE phones. 1470 */ 1471 String getMsisdn(); 1472 1473 /** 1474 * Retrieves IMEI for phones. Returns null if IMEI is not set. 1475 */ 1476 String getImei(); 1477 1478 /** 1479 * Retrieves Nai for phones. Returns null if Nai is not set. 1480 */ 1481 String getNai(); 1482 1483 /** 1484 * Retrieves the PhoneSubInfo of the Phone 1485 */ 1486 public PhoneSubInfo getPhoneSubInfo(); 1487 1488 /** 1489 * Retrieves the IccPhoneBookInterfaceManager of the Phone 1490 */ 1491 public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager(); 1492 1493 /** 1494 * setTTYMode 1495 * sets a TTY mode option. 1496 * @param ttyMode is a one of the following: 1497 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1498 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1499 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1500 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1501 * @param onComplete a callback message when the action is completed 1502 */ 1503 void setTTYMode(int ttyMode, Message onComplete); 1504 1505 /** 1506 * setUiTTYMode 1507 * sets a TTY mode option. 1508 * @param ttyMode is a one of the following: 1509 * - {@link com.android.internal.telephony.Phone#TTY_MODE_OFF} 1510 * - {@link com.android.internal.telephony.Phone#TTY_MODE_FULL} 1511 * - {@link com.android.internal.telephony.Phone#TTY_MODE_HCO} 1512 * - {@link com.android.internal.telephony.Phone#TTY_MODE_VCO} 1513 * @param onComplete a callback message when the action is completed 1514 */ 1515 void setUiTTYMode(int uiTtyMode, Message onComplete); 1516 1517 /** 1518 * queryTTYMode 1519 * query the status of the TTY mode 1520 * 1521 * @param onComplete a callback message when the action is completed. 1522 */ 1523 void queryTTYMode(Message onComplete); 1524 1525 /** 1526 * Activate or deactivate cell broadcast SMS. 1527 * 1528 * @param activate 1529 * 0 = activate, 1 = deactivate 1530 * @param response 1531 * Callback message is empty on completion 1532 */ 1533 void activateCellBroadcastSms(int activate, Message response); 1534 1535 /** 1536 * Query the current configuration of cdma cell broadcast SMS. 1537 * 1538 * @param response 1539 * Callback message is empty on completion 1540 */ 1541 void getCellBroadcastSmsConfig(Message response); 1542 1543 /** 1544 * Configure cell broadcast SMS. 1545 * 1546 * TODO: Change the configValuesArray to a RIL_BroadcastSMSConfig 1547 * 1548 * @param response 1549 * Callback message is empty on completion 1550 */ 1551 public void setCellBroadcastSmsConfig(int[] configValuesArray, Message response); 1552 1553 public void notifyDataActivity(); 1554 1555 /** 1556 * Returns the CDMA ERI icon index to display 1557 */ 1558 public int getCdmaEriIconIndex(); 1559 1560 /** 1561 * Returns the CDMA ERI icon mode, 1562 * 0 - ON 1563 * 1 - FLASHING 1564 */ 1565 public int getCdmaEriIconMode(); 1566 1567 /** 1568 * Returns the CDMA ERI text, 1569 */ 1570 public String getCdmaEriText(); 1571 1572 /** 1573 * request to exit emergency call back mode 1574 * the caller should use setOnECMModeExitResponse 1575 * to receive the emergency callback mode exit response 1576 */ 1577 void exitEmergencyCallbackMode(); 1578 1579 /** 1580 * this decides if the dial number is OTA(Over the air provision) number or not 1581 * @param dialStr is string representing the dialing digit(s) 1582 * @return true means the dialStr is OTA number, and false means the dialStr is not OTA number 1583 */ 1584 boolean isOtaSpNumber(String dialStr); 1585 1586 /** 1587 * Returns true if OTA Service Provisioning needs to be performed. 1588 */ 1589 boolean needsOtaServiceProvisioning(); 1590 1591 /** 1592 * Register for notifications when CDMA call waiting comes 1593 * 1594 * @param h Handler that receives the notification message. 1595 * @param what User-defined message code. 1596 * @param obj User object. 1597 */ 1598 void registerForCallWaiting(Handler h, int what, Object obj); 1599 1600 /** 1601 * Unegister for notifications when CDMA Call waiting comes 1602 * @param h Handler to be removed from the registrant list. 1603 */ 1604 void unregisterForCallWaiting(Handler h); 1605 1606 1607 /** 1608 * Register for signal information notifications from the network. 1609 * Message.obj will contain an AsyncResult. 1610 * AsyncResult.result will be a SuppServiceNotification instance. 1611 * 1612 * @param h Handler that receives the notification message. 1613 * @param what User-defined message code. 1614 * @param obj User object. 1615 */ 1616 1617 void registerForSignalInfo(Handler h, int what, Object obj) ; 1618 /** 1619 * Unregisters for signal information notifications. 1620 * Extraneous calls are tolerated silently 1621 * 1622 * @param h Handler to be removed from the registrant list. 1623 */ 1624 void unregisterForSignalInfo(Handler h); 1625 1626 /** 1627 * Register for display information notifications from the network. 1628 * Message.obj will contain an AsyncResult. 1629 * AsyncResult.result will be a SuppServiceNotification instance. 1630 * 1631 * @param h Handler that receives the notification message. 1632 * @param what User-defined message code. 1633 * @param obj User object. 1634 */ 1635 void registerForDisplayInfo(Handler h, int what, Object obj); 1636 1637 /** 1638 * Unregisters for display information notifications. 1639 * Extraneous calls are tolerated silently 1640 * 1641 * @param h Handler to be removed from the registrant list. 1642 */ 1643 void unregisterForDisplayInfo(Handler h) ; 1644 1645 /** 1646 * Register for CDMA number information record notification from the network. 1647 * Message.obj will contain an AsyncResult. 1648 * AsyncResult.result will be a CdmaInformationRecords.CdmaNumberInfoRec 1649 * instance. 1650 * 1651 * @param h Handler that receives the notification message. 1652 * @param what User-defined message code. 1653 * @param obj User object. 1654 */ 1655 void registerForNumberInfo(Handler h, int what, Object obj); 1656 1657 /** 1658 * Unregisters for number information record notifications. 1659 * Extraneous calls are tolerated silently 1660 * 1661 * @param h Handler to be removed from the registrant list. 1662 */ 1663 void unregisterForNumberInfo(Handler h); 1664 1665 /** 1666 * Register for CDMA redirected number information record notification 1667 * from the network. 1668 * Message.obj will contain an AsyncResult. 1669 * AsyncResult.result will be a CdmaInformationRecords.CdmaRedirectingNumberInfoRec 1670 * instance. 1671 * 1672 * @param h Handler that receives the notification message. 1673 * @param what User-defined message code. 1674 * @param obj User object. 1675 */ 1676 void registerForRedirectedNumberInfo(Handler h, int what, Object obj); 1677 1678 /** 1679 * Unregisters for redirected number information record notification. 1680 * Extraneous calls are tolerated silently 1681 * 1682 * @param h Handler to be removed from the registrant list. 1683 */ 1684 void unregisterForRedirectedNumberInfo(Handler h); 1685 1686 /** 1687 * Register for CDMA line control information record notification 1688 * from the network. 1689 * Message.obj will contain an AsyncResult. 1690 * AsyncResult.result will be a CdmaInformationRecords.CdmaLineControlInfoRec 1691 * instance. 1692 * 1693 * @param h Handler that receives the notification message. 1694 * @param what User-defined message code. 1695 * @param obj User object. 1696 */ 1697 void registerForLineControlInfo(Handler h, int what, Object obj); 1698 1699 /** 1700 * Unregisters for line control information notifications. 1701 * Extraneous calls are tolerated silently 1702 * 1703 * @param h Handler to be removed from the registrant list. 1704 */ 1705 void unregisterForLineControlInfo(Handler h); 1706 1707 /** 1708 * Register for CDMA T53 CLIR information record notifications 1709 * from the network. 1710 * Message.obj will contain an AsyncResult. 1711 * AsyncResult.result will be a CdmaInformationRecords.CdmaT53ClirInfoRec 1712 * instance. 1713 * 1714 * @param h Handler that receives the notification message. 1715 * @param what User-defined message code. 1716 * @param obj User object. 1717 */ 1718 void registerFoT53ClirlInfo(Handler h, int what, Object obj); 1719 1720 /** 1721 * Unregisters for T53 CLIR information record notification 1722 * Extraneous calls are tolerated silently 1723 * 1724 * @param h Handler to be removed from the registrant list. 1725 */ 1726 void unregisterForT53ClirInfo(Handler h); 1727 1728 /** 1729 * Register for CDMA T53 audio control information record notifications 1730 * from the network. 1731 * Message.obj will contain an AsyncResult. 1732 * AsyncResult.result will be a CdmaInformationRecords.CdmaT53AudioControlInfoRec 1733 * instance. 1734 * 1735 * @param h Handler that receives the notification message. 1736 * @param what User-defined message code. 1737 * @param obj User object. 1738 */ 1739 void registerForT53AudioControlInfo(Handler h, int what, Object obj); 1740 1741 /** 1742 * Unregisters for T53 audio control information record notifications. 1743 * Extraneous calls are tolerated silently 1744 * 1745 * @param h Handler to be removed from the registrant list. 1746 */ 1747 void unregisterForT53AudioControlInfo(Handler h); 1748 1749 /** 1750 * Register for radio off or not available 1751 * 1752 * @param h Handler that receives the notification message. 1753 * @param what User-defined message code. 1754 * @param obj User object. 1755 */ 1756 public void registerForRadioOffOrNotAvailable(Handler h, int what, Object obj); 1757 1758 /** 1759 * Unregisters for radio off or not available 1760 * 1761 * @param h Handler to be removed from the registrant list. 1762 */ 1763 public void unregisterForRadioOffOrNotAvailable(Handler h); 1764 1765 /** 1766 * registers for exit emergency call back mode request response 1767 * 1768 * @param h Handler that receives the notification message. 1769 * @param what User-defined message code. 1770 * @param obj User object. 1771 */ 1772 1773 void setOnEcbModeExitResponse(Handler h, int what, Object obj); 1774 1775 /** 1776 * Unregisters for exit emergency call back mode request response 1777 * 1778 * @param h Handler to be removed from the registrant list. 1779 */ 1780 void unsetOnEcbModeExitResponse(Handler h); 1781 1782 /** 1783 * Return if the current radio is LTE on CDMA. This 1784 * is a tri-state return value as for a period of time 1785 * the mode may be unknown. 1786 * 1787 * @return {@link PhoneConstants#LTE_ON_CDMA_UNKNOWN}, {@link PhoneConstants#LTE_ON_CDMA_FALSE} 1788 * or {@link PhoneConstants#LTE_ON_CDMA_TRUE} 1789 */ 1790 public int getLteOnCdmaMode(); 1791 1792 /** 1793 * TODO: Adding a function for each property is not good. 1794 * A fucntion of type getPhoneProp(propType) where propType is an 1795 * enum of GSM+CDMA+LTE props would be a better approach. 1796 * 1797 * Get "Restriction of menu options for manual PLMN selection" bit 1798 * status from EF_CSP data, this belongs to "Value Added Services Group". 1799 * @return true if this bit is set or EF_CSP data is unavailable, 1800 * false otherwise 1801 */ 1802 boolean isCspPlmnEnabled(); 1803 1804 /** 1805 * Return an interface to retrieve the ISIM records for IMS, if available. 1806 * @return the interface to retrieve the ISIM records, or null if not supported 1807 */ 1808 IsimRecords getIsimRecords(); 1809 1810 /** 1811 * Sets the SIM voice message waiting indicator records. 1812 * @param line GSM Subscriber Profile Number, one-based. Only '1' is supported 1813 * @param countWaiting The number of messages waiting, if known. Use 1814 * -1 to indicate that an unknown number of 1815 * messages are waiting 1816 */ 1817 void setVoiceMessageWaiting(int line, int countWaiting); 1818 1819 /** 1820 * Gets the USIM service table from the UICC, if present and available. 1821 * @return an interface to the UsimServiceTable record, or null if not available 1822 */ 1823 UsimServiceTable getUsimServiceTable(); 1824 1825 /** 1826 * Gets the Uicc card corresponding to this phone. 1827 * @return the UiccCard object corresponding to the phone ID. 1828 */ 1829 UiccCard getUiccCard(); 1830 1831 /** 1832 * Unregister from all events it registered for and dispose objects 1833 * created by this object. 1834 */ 1835 void dispose(); 1836 1837 /** 1838 * Remove references to external object stored in this object. 1839 */ 1840 void removeReferences(); 1841 1842 /** 1843 * Update the phone object if the voice radio technology has changed 1844 * 1845 * @param voiceRadioTech The new voice radio technology 1846 */ 1847 void updatePhoneObject(int voiceRadioTech); 1848 1849 /** 1850 * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 1851 * Used for device configuration by some CDMA operators. 1852 * 1853 * @param itemID the ID of the item to read 1854 * @param response callback message with the String response in the obj field 1855 */ 1856 void nvReadItem(int itemID, Message response); 1857 1858 /** 1859 * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 1860 * Used for device configuration by some CDMA operators. 1861 * 1862 * @param itemID the ID of the item to read 1863 * @param itemValue the value to write, as a String 1864 * @param response Callback message. 1865 */ 1866 void nvWriteItem(int itemID, String itemValue, Message response); 1867 1868 /** 1869 * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 1870 * Used for device configuration by some CDMA operators. 1871 * 1872 * @param preferredRoamingList byte array containing the new PRL 1873 * @param response Callback message. 1874 */ 1875 void nvWriteCdmaPrl(byte[] preferredRoamingList, Message response); 1876 1877 /** 1878 * Perform the specified type of NV config reset. The radio will be taken offline 1879 * and the device must be rebooted after erasing the NV. Used for device 1880 * configuration by some CDMA operators. 1881 * 1882 * @param resetType reset type: 1: reload NV reset, 2: erase NV reset, 3: factory NV reset 1883 * @param response Callback message. 1884 */ 1885 void nvResetConfig(int resetType, Message response); 1886 1887 /* 1888 * Returns the subscription id. 1889 */ 1890 public int getSubId(); 1891 1892 /* 1893 * Returns the phone id. 1894 */ 1895 public int getPhoneId(); 1896 1897 /** 1898 * Get P-CSCF address from PCO after data connection is established or modified. 1899 * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN 1900 */ 1901 public String[] getPcscfAddress(String apnType); 1902 1903 /** 1904 * Set IMS registration state 1905 */ 1906 public void setImsRegistrationState(boolean registered); 1907 1908 /** 1909 * Return the ImsPhone phone co-managed with this phone 1910 * @return an instance of an ImsPhone phone 1911 */ 1912 public Phone getImsPhone(); 1913 1914 /** 1915 * Start listening for IMS service UP/DOWN events. 1916 */ 1917 public void startMonitoringImsService(); 1918 1919 /** 1920 * Release the local instance of the ImsPhone and disconnect from 1921 * the phone. 1922 * @return the instance of the ImsPhone phone previously owned 1923 */ 1924 public ImsPhone relinquishOwnershipOfImsPhone(); 1925 1926 /** 1927 * Take ownership and wire-up the input ImsPhone 1928 * @param imsPhone ImsPhone to be used. 1929 */ 1930 public void acquireOwnershipOfImsPhone(ImsPhone imsPhone); 1931 1932 /** 1933 * Return the service state of mImsPhone if it is STATE_IN_SERVICE 1934 * otherwise return the current voice service state 1935 */ 1936 int getVoicePhoneServiceState(); 1937 1938 /** 1939 * Override the service provider name and the operator name for the current ICCID. 1940 */ 1941 public boolean setOperatorBrandOverride(String brand); 1942 1943 /** 1944 * Override the roaming indicator for the current ICCID. 1945 */ 1946 public boolean setRoamingOverride(List<String> gsmRoamingList, 1947 List<String> gsmNonRoamingList, List<String> cdmaRoamingList, 1948 List<String> cdmaNonRoamingList); 1949 1950 /** 1951 * Is Radio Present on the device and is it accessible 1952 */ 1953 public boolean isRadioAvailable(); 1954 1955 /** 1956 * Is Radio turned on 1957 */ 1958 public boolean isRadioOn(); 1959 1960 /** 1961 * shutdown Radio gracefully 1962 */ 1963 public void shutdownRadio(); 1964 1965 /** 1966 * Set phone radio capability 1967 * 1968 * @param rc the phone radio capability defined in 1969 * RadioCapability. It's a input object used to transfer parameter to logic modem 1970 * @param response Callback message. 1971 */ 1972 public void setRadioCapability(RadioCapability rc, Message response); 1973 1974 /** 1975 * Get phone radio capability 1976 * 1977 * @return the capability of the radio defined in RadioCapability 1978 */ 1979 public RadioCapability getRadioCapability(); 1980 1981 /** 1982 * Get phone radio access family 1983 * 1984 * @return a bit mask to identify the radio access family. 1985 */ 1986 public int getRadioAccessFamily(); 1987 1988 /** 1989 * Get the associated data modems Id. 1990 * 1991 * @return a String containing the id of the data modem 1992 */ 1993 public String getModemUuId(); 1994 1995 /** 1996 * The RadioCapability has changed. This comes up from the RIL and is called when radios first 1997 * become available or after a capability switch. The flow is we use setRadioCapability to 1998 * request a change with the RIL and get an UNSOL response with the new data which gets set 1999 * here. 2000 * 2001 * @param rc the phone radio capability currently in effect for this phone. 2002 */ 2003 public void radioCapabilityUpdated(RadioCapability rc); 2004 2005 /** 2006 * Registers the handler when phone radio capability is changed. 2007 * 2008 * @param h Handler for notification message. 2009 * @param what User-defined message code. 2010 * @param obj User object. 2011 */ 2012 public void registerForRadioCapabilityChanged(Handler h, int what, Object obj); 2013 2014 /** 2015 * Unregister for notifications when phone radio type and access technology is changed. 2016 * 2017 * @param h Handler to be removed from the registrant list. 2018 */ 2019 public void unregisterForRadioCapabilityChanged(Handler h); 2020 2021 /** 2022 * Query the IMS Registration Status. 2023 * 2024 * @return true if IMS is Registered 2025 */ 2026 public boolean isImsRegistered(); 2027 2028 /** 2029 * Determines if video calling is enabled for the phone. 2030 * 2031 * @return {@code true} if video calling is enabled, {@code false} otherwise. 2032 */ 2033 public boolean isVideoEnabled(); 2034 2035 /** 2036 * @return {@code true} if we are in emergency call back mode. This is a period where the phone 2037 * should be using as little power as possible and be ready to receive an incoming call from the 2038 * emergency operator. 2039 */ 2040 public boolean isInEcm(); 2041 2042 /** 2043 * Returns the Status of Wi-Fi Calling 2044 *@hide 2045 */ 2046 public boolean isWifiCallingEnabled(); 2047 2048 /** 2049 * Returns the Status of Volte 2050 *@hide 2051 */ 2052 public boolean isVolteEnabled(); 2053 2054 /** 2055 * @return {@code true} if video call is present, false otherwise. 2056 */ 2057 public boolean isVideoCallPresent(); 2058 2059 /** 2060 * Returns the status of Link Capacity Estimation (LCE) service. 2061 */ 2062 public int getLceStatus(); 2063 2064 /** 2065 * Returns the locale based on the carrier properties (such as {@code ro.carrier}) and 2066 * SIM preferences. 2067 */ 2068 public Locale getLocaleFromSimAndCarrierPrefs(); 2069} 2070