PhoneProxy.java revision 1ccc41ed938ff005ae3d621292580a90601242ca
1/* 2 * Copyright (C) 2008 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 19 20import android.app.ActivityManagerNative; 21import android.content.Context; 22import android.content.Intent; 23import android.content.SharedPreferences; 24import android.os.Handler; 25import android.os.Message; 26import android.preference.PreferenceManager; 27import android.telephony.CellLocation; 28import android.telephony.PhoneStateListener; 29import android.telephony.ServiceState; 30import android.telephony.SignalStrength; 31import android.util.Log; 32 33import com.android.internal.telephony.cdma.CDMAPhone; 34import com.android.internal.telephony.gsm.GSMPhone; 35import com.android.internal.telephony.gsm.NetworkInfo; 36import com.android.internal.telephony.gsm.PdpConnection; 37import com.android.internal.telephony.test.SimulatedRadioControl; 38 39import java.util.List; 40 41public class PhoneProxy extends Handler implements Phone { 42 public final static Object lockForRadioTechnologyChange = new Object(); 43// private static boolean radioTechnologyChangeGsmToCdma = false; 44// private static boolean radioTechnologyChangeCdmaToGsm = false; 45 46 private Phone mActivePhone; 47 private String mOutgoingPhone; 48 private CommandsInterface mCommandsInterface; 49 private IccSmsInterfaceManagerProxy mIccSmsInterfaceManagerProxy; 50 private IccPhoneBookInterfaceManagerProxy mIccPhoneBookInterfaceManagerProxy; 51 private PhoneSubInfoProxy mPhoneSubInfoProxy; 52 53 private static final int EVENT_RADIO_TECHNOLOGY_CHANGED = 1; 54 private static final String LOG_TAG = "PHONE"; 55 56 //***** Class Methods 57 public PhoneProxy(Phone phone) { 58 mActivePhone = phone; 59 mIccSmsInterfaceManagerProxy = new IccSmsInterfaceManagerProxy( 60 phone.getIccSmsInterfaceManager()); 61 mIccPhoneBookInterfaceManagerProxy = new IccPhoneBookInterfaceManagerProxy( 62 phone.getIccPhoneBookInterfaceManager()); 63 mPhoneSubInfoProxy = new PhoneSubInfoProxy(phone.getPhoneSubInfo()); 64 mCommandsInterface = ((PhoneBase)mActivePhone).mCM; 65 mCommandsInterface.registerForRadioTechnologyChanged( 66 this, EVENT_RADIO_TECHNOLOGY_CHANGED, null); 67 } 68 69 @Override 70 public void handleMessage(Message msg) { 71 switch(msg.what) { 72 case EVENT_RADIO_TECHNOLOGY_CHANGED: 73 //switch Phone from CDMA to GSM or vice versa 74 mOutgoingPhone = ((PhoneBase)mActivePhone).getPhoneName(); 75 logd("Switching phone from " + mOutgoingPhone + "Phone to " + 76 (mOutgoingPhone.equals("GSM") ? "CDMAPhone" : "GSMPhone") ); 77 boolean oldPowerState = false; //old power state to off 78 if (mCommandsInterface.getRadioState().isOn()) { 79 oldPowerState = true; 80 logd("Setting Radio Power to Off"); 81 mCommandsInterface.setRadioPower(false, null); 82 } 83 if(mOutgoingPhone.equals("GSM")) { 84 logd("Make a new CDMAPhone and destroy the old GSMPhone."); 85 86 ((GSMPhone)mActivePhone).dispose(); 87 Phone oldPhone = mActivePhone; 88 89 //Give the garbage collector a hint to start the garbage collection asap 90 // NOTE this has been disabled since radio technology change could happen during 91 // e.g. a multimedia playing and could slow the system. Tests needs to be done 92 // to see the effects of the GC call here when system is busy. 93 //System.gc(); 94 95 mActivePhone = PhoneFactory.getCdmaPhone(); 96 logd("Resetting Radio"); 97 mCommandsInterface.setRadioPower(oldPowerState, null); 98 ((GSMPhone)oldPhone).removeReferences(); 99 oldPhone = null; 100 } else { 101 logd("Make a new GSMPhone and destroy the old CDMAPhone."); 102 103 ((CDMAPhone)mActivePhone).dispose(); 104 //mActivePhone = null; 105 Phone oldPhone = mActivePhone; 106 107 // Give the GC a hint to start the garbage collection asap 108 // NOTE this has been disabled since radio technology change could happen during 109 // e.g. a multimedia playing and could slow the system. Tests needs to be done 110 // to see the effects of the GC call here when system is busy. 111 //System.gc(); 112 113 mActivePhone = PhoneFactory.getGsmPhone(); 114 logd("Resetting Radio:"); 115 mCommandsInterface.setRadioPower(oldPowerState, null); 116 ((CDMAPhone)oldPhone).removeReferences(); 117 oldPhone = null; 118 } 119 120 //Set the new interfaces in the proxy's 121 mIccSmsInterfaceManagerProxy.setmIccSmsInterfaceManager( 122 mActivePhone.getIccSmsInterfaceManager()); 123 mIccPhoneBookInterfaceManagerProxy.setmIccPhoneBookInterfaceManager( 124 mActivePhone.getIccPhoneBookInterfaceManager()); 125 mPhoneSubInfoProxy.setmPhoneSubInfo(this.mActivePhone.getPhoneSubInfo()); 126 mCommandsInterface = ((PhoneBase)mActivePhone).mCM; 127 128 //Send an Intent to the PhoneApp that we had a radio technology change 129 Intent intent = new Intent(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED); 130 intent.putExtra(Phone.PHONE_NAME_KEY, mActivePhone.getPhoneName()); 131 ActivityManagerNative.broadcastStickyIntent(intent, null); 132 break; 133 default: 134 Log.e(LOG_TAG,"Error! This handler was not registered for this message type. Message: " 135 + msg.what); 136 break; 137 } 138 super.handleMessage(msg); 139 } 140 141 private void logv(String msg) { 142 Log.v(LOG_TAG, "[PhoneProxy] " + msg); 143 } 144 145 private void logd(String msg) { 146 Log.d(LOG_TAG, "[PhoneProxy] " + msg); 147 } 148 149 private void logw(String msg) { 150 Log.w(LOG_TAG, "[PhoneProxy] " + msg); 151 } 152 153 private void loge(String msg) { 154 Log.e(LOG_TAG, "[PhoneProxy] " + msg); 155 } 156 157 158 public ServiceState getServiceState() { 159 return mActivePhone.getServiceState(); 160 } 161 162 public CellLocation getCellLocation() { 163 return mActivePhone.getCellLocation(); 164 } 165 166 public DataState getDataConnectionState() { 167 return mActivePhone.getDataConnectionState(); 168 } 169 170 public DataActivityState getDataActivityState() { 171 return mActivePhone.getDataActivityState(); 172 } 173 174 public Context getContext() { 175 return mActivePhone.getContext(); 176 } 177 178 public void disableDnsCheck(boolean b) { 179 mActivePhone.disableDnsCheck(b); 180 } 181 182 public boolean isDnsCheckDisabled() { 183 return mActivePhone.isDnsCheckDisabled(); 184 } 185 186 public State getState() { 187 return mActivePhone.getState(); 188 } 189 190 public String getPhoneName() { 191 return mActivePhone.getPhoneName(); 192 } 193 194 public int getPhoneType() { 195 return mActivePhone.getPhoneType(); 196 } 197 198 public String[] getActiveApnTypes() { 199 return mActivePhone.getActiveApnTypes(); 200 } 201 202 public String getActiveApn() { 203 return mActivePhone.getActiveApn(); 204 } 205 206 public SignalStrength getSignalStrength() { 207 return mActivePhone.getSignalStrength(); 208 } 209 210 public void registerForUnknownConnection(Handler h, int what, Object obj) { 211 mActivePhone.registerForUnknownConnection(h, what, obj); 212 } 213 214 public void unregisterForUnknownConnection(Handler h) { 215 mActivePhone.unregisterForUnknownConnection(h); 216 } 217 218 public void registerForPreciseCallStateChanged(Handler h, int what, Object obj) { 219 mActivePhone.registerForPreciseCallStateChanged(h, what, obj); 220 } 221 222 public void unregisterForPreciseCallStateChanged(Handler h) { 223 mActivePhone.unregisterForPreciseCallStateChanged(h); 224 } 225 226 public void registerForNewRingingConnection(Handler h, int what, Object obj) { 227 mActivePhone.registerForNewRingingConnection(h, what, obj); 228 } 229 230 public void unregisterForNewRingingConnection(Handler h) { 231 mActivePhone.unregisterForNewRingingConnection(h); 232 } 233 234 public void registerForIncomingRing(Handler h, int what, Object obj) { 235 mActivePhone.registerForIncomingRing(h, what, obj); 236 } 237 238 public void unregisterForIncomingRing(Handler h) { 239 mActivePhone.unregisterForIncomingRing(h); 240 } 241 242 public void registerForDisconnect(Handler h, int what, Object obj) { 243 mActivePhone.registerForDisconnect(h, what, obj); 244 } 245 246 public void unregisterForDisconnect(Handler h) { 247 mActivePhone.unregisterForDisconnect(h); 248 } 249 250 public void registerForMmiInitiate(Handler h, int what, Object obj) { 251 mActivePhone.registerForMmiInitiate(h, what, obj); 252 } 253 254 public void unregisterForMmiInitiate(Handler h) { 255 mActivePhone.unregisterForMmiInitiate(h); 256 } 257 258 public void registerForMmiComplete(Handler h, int what, Object obj) { 259 mActivePhone.registerForMmiComplete(h, what, obj); 260 } 261 262 public void unregisterForMmiComplete(Handler h) { 263 mActivePhone.unregisterForMmiComplete(h); 264 } 265 266 public List<? extends MmiCode> getPendingMmiCodes() { 267 return mActivePhone.getPendingMmiCodes(); 268 } 269 270 public void sendUssdResponse(String ussdMessge) { 271 mActivePhone.sendUssdResponse(ussdMessge); 272 } 273 274 public void registerForServiceStateChanged(Handler h, int what, Object obj) { 275 mActivePhone.registerForServiceStateChanged(h, what, obj); 276 } 277 278 public void unregisterForServiceStateChanged(Handler h) { 279 mActivePhone.unregisterForServiceStateChanged(h); 280 } 281 282 public void registerForSuppServiceNotification(Handler h, int what, Object obj) { 283 mActivePhone.registerForSuppServiceNotification(h, what, obj); 284 } 285 286 public void unregisterForSuppServiceNotification(Handler h) { 287 mActivePhone.unregisterForSuppServiceNotification(h); 288 } 289 290 public void registerForSuppServiceFailed(Handler h, int what, Object obj) { 291 mActivePhone.registerForSuppServiceFailed(h, what, obj); 292 } 293 294 public void unregisterForSuppServiceFailed(Handler h) { 295 mActivePhone.unregisterForSuppServiceFailed(h); 296 } 297 298 public void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj){ 299 mActivePhone.registerForInCallVoicePrivacyOn(h,what,obj); 300 } 301 302 public void unregisterForInCallVoicePrivacyOn(Handler h){ 303 mActivePhone.unregisterForInCallVoicePrivacyOn(h); 304 } 305 306 public void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj){ 307 mActivePhone.registerForInCallVoicePrivacyOff(h,what,obj); 308 } 309 310 public void unregisterForInCallVoicePrivacyOff(Handler h){ 311 mActivePhone.unregisterForInCallVoicePrivacyOff(h); 312 } 313 314 public void registerForCdmaOtaStatusChange(Handler h, int what, Object obj) { 315 mActivePhone.registerForCdmaOtaStatusChange(h,what,obj); 316 } 317 318 public void unregisterForCdmaOtaStatusChange(Handler h) { 319 mActivePhone.unregisterForCdmaOtaStatusChange(h); 320 } 321 322 public void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { 323 mActivePhone.registerForSubscriptionInfoReady(h, what, obj); 324 } 325 326 public void unregisterForSubscriptionInfoReady(Handler h) { 327 mActivePhone.unregisterForSubscriptionInfoReady(h); 328 } 329 330 public void registerForEcmTimerReset(Handler h, int what, Object obj) { 331 mActivePhone.registerForEcmTimerReset(h,what,obj); 332 } 333 334 public void unregisterForEcmTimerReset(Handler h) { 335 mActivePhone.unregisterForEcmTimerReset(h); 336 } 337 338 public void registerForRingbackTone(Handler h, int what, Object obj) { 339 mActivePhone.registerForRingbackTone(h,what,obj); 340 } 341 342 public void unregisterForRingbackTone(Handler h) { 343 mActivePhone.unregisterForRingbackTone(h); 344 } 345 346 public void registerForResendIncallMute(Handler h, int what, Object obj) { 347 mActivePhone.registerForResendIncallMute(h,what,obj); 348 } 349 350 public void unregisterForResendIncallMute(Handler h) { 351 mActivePhone.unregisterForResendIncallMute(h); 352 } 353 354 public boolean getIccRecordsLoaded() { 355 return mActivePhone.getIccRecordsLoaded(); 356 } 357 358 public IccCard getIccCard() { 359 return mActivePhone.getIccCard(); 360 } 361 362 public void acceptCall() throws CallStateException { 363 mActivePhone.acceptCall(); 364 } 365 366 public void rejectCall() throws CallStateException { 367 mActivePhone.rejectCall(); 368 } 369 370 public void switchHoldingAndActive() throws CallStateException { 371 mActivePhone.switchHoldingAndActive(); 372 } 373 374 public boolean canConference() { 375 return mActivePhone.canConference(); 376 } 377 378 public void conference() throws CallStateException { 379 mActivePhone.conference(); 380 } 381 382 public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete) { 383 mActivePhone.enableEnhancedVoicePrivacy(enable, onComplete); 384 } 385 386 public void getEnhancedVoicePrivacy(Message onComplete) { 387 mActivePhone.getEnhancedVoicePrivacy(onComplete); 388 } 389 390 public boolean canTransfer() { 391 return mActivePhone.canTransfer(); 392 } 393 394 public void explicitCallTransfer() throws CallStateException { 395 mActivePhone.explicitCallTransfer(); 396 } 397 398 public void clearDisconnected() { 399 mActivePhone.clearDisconnected(); 400 } 401 402 public Call getForegroundCall() { 403 return mActivePhone.getForegroundCall(); 404 } 405 406 public Call getBackgroundCall() { 407 return mActivePhone.getBackgroundCall(); 408 } 409 410 public Call getRingingCall() { 411 return mActivePhone.getRingingCall(); 412 } 413 414 public Connection dial(String dialString) throws CallStateException { 415 return mActivePhone.dial(dialString); 416 } 417 418 public boolean handlePinMmi(String dialString) { 419 return mActivePhone.handlePinMmi(dialString); 420 } 421 422 public boolean handleInCallMmiCommands(String command) throws CallStateException { 423 return mActivePhone.handleInCallMmiCommands(command); 424 } 425 426 public void sendDtmf(char c) { 427 mActivePhone.sendDtmf(c); 428 } 429 430 public void startDtmf(char c) { 431 mActivePhone.startDtmf(c); 432 } 433 434 public void stopDtmf() { 435 mActivePhone.stopDtmf(); 436 } 437 438 public void setRadioPower(boolean power) { 439 mActivePhone.setRadioPower(power); 440 } 441 442 public boolean getMessageWaitingIndicator() { 443 return mActivePhone.getMessageWaitingIndicator(); 444 } 445 446 public boolean getCallForwardingIndicator() { 447 return mActivePhone.getCallForwardingIndicator(); 448 } 449 450 public String getLine1Number() { 451 return mActivePhone.getLine1Number(); 452 } 453 454 public String getCdmaMin() { 455 return mActivePhone.getCdmaMin(); 456 } 457 458 public boolean isMinInfoReady() { 459 return mActivePhone.isMinInfoReady(); 460 } 461 462 public String getCdmaPrlVersion() { 463 return mActivePhone.getCdmaPrlVersion(); 464 } 465 466 public String getLine1AlphaTag() { 467 return mActivePhone.getLine1AlphaTag(); 468 } 469 470 public void setLine1Number(String alphaTag, String number, Message onComplete) { 471 mActivePhone.setLine1Number(alphaTag, number, onComplete); 472 } 473 474 public String getVoiceMailNumber() { 475 return mActivePhone.getVoiceMailNumber(); 476 } 477 478 /** @hide */ 479 public int getVoiceMessageCount(){ 480 return mActivePhone.getVoiceMessageCount(); 481 } 482 483 public String getVoiceMailAlphaTag() { 484 return mActivePhone.getVoiceMailAlphaTag(); 485 } 486 487 public void setVoiceMailNumber(String alphaTag,String voiceMailNumber, 488 Message onComplete) { 489 mActivePhone.setVoiceMailNumber(alphaTag, voiceMailNumber, onComplete); 490 } 491 492 public void getCallForwardingOption(int commandInterfaceCFReason, 493 Message onComplete) { 494 mActivePhone.getCallForwardingOption(commandInterfaceCFReason, 495 onComplete); 496 } 497 498 public void setCallForwardingOption(int commandInterfaceCFReason, 499 int commandInterfaceCFAction, String dialingNumber, 500 int timerSeconds, Message onComplete) { 501 mActivePhone.setCallForwardingOption(commandInterfaceCFReason, 502 commandInterfaceCFAction, dialingNumber, timerSeconds, onComplete); 503 } 504 505 public void getOutgoingCallerIdDisplay(Message onComplete) { 506 mActivePhone.getOutgoingCallerIdDisplay(onComplete); 507 } 508 509 public void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, 510 Message onComplete) { 511 mActivePhone.setOutgoingCallerIdDisplay(commandInterfaceCLIRMode, 512 onComplete); 513 } 514 515 public void getCallWaiting(Message onComplete) { 516 mActivePhone.getCallWaiting(onComplete); 517 } 518 519 public void setCallWaiting(boolean enable, Message onComplete) { 520 mActivePhone.setCallWaiting(enable, onComplete); 521 } 522 523 public void getAvailableNetworks(Message response) { 524 mActivePhone.getAvailableNetworks(response); 525 } 526 527 public void setNetworkSelectionModeAutomatic(Message response) { 528 mActivePhone.setNetworkSelectionModeAutomatic(response); 529 } 530 531 public void selectNetworkManually(NetworkInfo network, Message response) { 532 mActivePhone.selectNetworkManually(network, response); 533 } 534 535 public void setPreferredNetworkType(int networkType, Message response) { 536 mActivePhone.setPreferredNetworkType(networkType, response); 537 } 538 539 public void getPreferredNetworkType(Message response) { 540 mActivePhone.getPreferredNetworkType(response); 541 } 542 543 public void getNeighboringCids(Message response) { 544 mActivePhone.getNeighboringCids(response); 545 } 546 547 public void setOnPostDialCharacter(Handler h, int what, Object obj) { 548 mActivePhone.setOnPostDialCharacter(h, what, obj); 549 } 550 551 public void setMute(boolean muted) { 552 mActivePhone.setMute(muted); 553 } 554 555 public boolean getMute() { 556 return mActivePhone.getMute(); 557 } 558 559 public void invokeOemRilRequestRaw(byte[] data, Message response) { 560 mActivePhone.invokeOemRilRequestRaw(data, response); 561 } 562 563 public void invokeOemRilRequestStrings(String[] strings, Message response) { 564 mActivePhone.invokeOemRilRequestStrings(strings, response); 565 } 566 567 /** 568 * @deprecated 569 */ 570 public void getPdpContextList(Message response) { 571 mActivePhone.getPdpContextList(response); 572 } 573 574 public void getDataCallList(Message response) { 575 mActivePhone.getDataCallList(response); 576 } 577 578 /** 579 * @deprecated 580 */ 581 public List<PdpConnection> getCurrentPdpList() { 582 return mActivePhone.getCurrentPdpList(); 583 } 584 585 public List<DataConnection> getCurrentDataConnectionList() { 586 return mActivePhone.getCurrentDataConnectionList(); 587 } 588 589 public void updateServiceLocation() { 590 mActivePhone.updateServiceLocation(); 591 } 592 593 public void enableLocationUpdates() { 594 mActivePhone.enableLocationUpdates(); 595 } 596 597 public void disableLocationUpdates() { 598 mActivePhone.disableLocationUpdates(); 599 } 600 601 public void setUnitTestMode(boolean f) { 602 mActivePhone.setUnitTestMode(f); 603 } 604 605 public boolean getUnitTestMode() { 606 return mActivePhone.getUnitTestMode(); 607 } 608 609 public void setBandMode(int bandMode, Message response) { 610 mActivePhone.setBandMode(bandMode, response); 611 } 612 613 public void queryAvailableBandMode(Message response) { 614 mActivePhone.queryAvailableBandMode(response); 615 } 616 617 public boolean getDataRoamingEnabled() { 618 return mActivePhone.getDataRoamingEnabled(); 619 } 620 621 public void setDataRoamingEnabled(boolean enable) { 622 mActivePhone.setDataRoamingEnabled(enable); 623 } 624 625 public void queryCdmaRoamingPreference(Message response) { 626 mActivePhone.queryCdmaRoamingPreference(response); 627 } 628 629 public void setCdmaRoamingPreference(int cdmaRoamingType, Message response) { 630 mActivePhone.setCdmaRoamingPreference(cdmaRoamingType, response); 631 } 632 633 public void setCdmaSubscription(int cdmaSubscriptionType, Message response) { 634 mActivePhone.setCdmaSubscription(cdmaSubscriptionType, response); 635 } 636 637 public SimulatedRadioControl getSimulatedRadioControl() { 638 return mActivePhone.getSimulatedRadioControl(); 639 } 640 641 public boolean enableDataConnectivity() { 642 return mActivePhone.enableDataConnectivity(); 643 } 644 645 public boolean disableDataConnectivity() { 646 return mActivePhone.disableDataConnectivity(); 647 } 648 649 public int enableApnType(String type) { 650 return mActivePhone.enableApnType(type); 651 } 652 653 public int disableApnType(String type) { 654 return mActivePhone.disableApnType(type); 655 } 656 657 public boolean isDataConnectivityEnabled() { 658 return mActivePhone.isDataConnectivityEnabled(); 659 } 660 661 public boolean isDataConnectivityPossible() { 662 return mActivePhone.isDataConnectivityPossible(); 663 } 664 665 public String getInterfaceName(String apnType) { 666 return mActivePhone.getInterfaceName(apnType); 667 } 668 669 public String getIpAddress(String apnType) { 670 return mActivePhone.getIpAddress(apnType); 671 } 672 673 public String getGateway(String apnType) { 674 return mActivePhone.getGateway(apnType); 675 } 676 677 public String[] getDnsServers(String apnType) { 678 return mActivePhone.getDnsServers(apnType); 679 } 680 681 public String getDeviceId() { 682 return mActivePhone.getDeviceId(); 683 } 684 685 public String getDeviceSvn() { 686 return mActivePhone.getDeviceSvn(); 687 } 688 689 public String getSubscriberId() { 690 return mActivePhone.getSubscriberId(); 691 } 692 693 public String getIccSerialNumber() { 694 return mActivePhone.getIccSerialNumber(); 695 } 696 697 public String getEsn() { 698 return mActivePhone.getEsn(); 699 } 700 701 public String getMeid() { 702 return mActivePhone.getMeid(); 703 } 704 705 public PhoneSubInfo getPhoneSubInfo(){ 706 return mActivePhone.getPhoneSubInfo(); 707 } 708 709 public IccSmsInterfaceManager getIccSmsInterfaceManager(){ 710 return mActivePhone.getIccSmsInterfaceManager(); 711 } 712 713 public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager(){ 714 return mActivePhone.getIccPhoneBookInterfaceManager(); 715 } 716 717 public void setTTYMode(int ttyMode, Message onComplete) { 718 mActivePhone.setTTYMode(ttyMode, onComplete); 719 } 720 721 public void queryTTYMode(Message onComplete) { 722 mActivePhone.queryTTYMode(onComplete); 723 } 724 725 public void activateCellBroadcastSms(int activate, Message response) { 726 mActivePhone.activateCellBroadcastSms(activate, response); 727 } 728 729 public void getCellBroadcastSmsConfig(Message response) { 730 mActivePhone.getCellBroadcastSmsConfig(response); 731 } 732 733 public void setCellBroadcastSmsConfig(int[] configValuesArray, Message response) { 734 mActivePhone.setCellBroadcastSmsConfig(configValuesArray, response); 735 } 736 737 public void notifyDataActivity() { 738 mActivePhone.notifyDataActivity(); 739 } 740 741 public void getSmscAddress(Message result) { 742 mActivePhone.getSmscAddress(result); 743 } 744 745 public void setSmscAddress(String address, Message result) { 746 mActivePhone.setSmscAddress(address, result); 747 } 748 749 public int getCdmaEriIconIndex() { 750 return mActivePhone.getCdmaEriIconIndex(); 751 } 752 753 public String getCdmaEriText() { 754 return mActivePhone.getCdmaEriText(); 755 } 756 757 public int getCdmaEriIconMode() { 758 return mActivePhone.getCdmaEriIconMode(); 759 } 760 761 public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){ 762 mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete); 763 } 764 765 public void exitEmergencyCallbackMode(){ 766 mActivePhone.exitEmergencyCallbackMode(); 767 } 768 769 public boolean isOtaSpNumber(String dialStr){ 770 return mActivePhone.isOtaSpNumber(dialStr); 771 } 772 773 public void registerForCallWaiting(Handler h, int what, Object obj){ 774 mActivePhone.registerForCallWaiting(h,what,obj); 775 } 776 777 public void unregisterForCallWaiting(Handler h){ 778 mActivePhone.unregisterForCallWaiting(h); 779 } 780 781 public void registerForSignalInfo(Handler h, int what, Object obj) { 782 mActivePhone.registerForSignalInfo(h,what,obj); 783 } 784 785 public void unregisterForSignalInfo(Handler h) { 786 mActivePhone.unregisterForSignalInfo(h); 787 } 788 789 public void registerForDisplayInfo(Handler h, int what, Object obj) { 790 mActivePhone.registerForDisplayInfo(h,what,obj); 791 } 792 793 public void unregisterForDisplayInfo(Handler h) { 794 mActivePhone.unregisterForDisplayInfo(h); 795 } 796 797 public void registerForNumberInfo(Handler h, int what, Object obj) { 798 mActivePhone.registerForNumberInfo(h, what, obj); 799 } 800 801 public void unregisterForNumberInfo(Handler h) { 802 mActivePhone.unregisterForNumberInfo(h); 803 } 804 805 public void registerForRedirectedNumberInfo(Handler h, int what, Object obj) { 806 mActivePhone.registerForRedirectedNumberInfo(h, what, obj); 807 } 808 809 public void unregisterForRedirectedNumberInfo(Handler h) { 810 mActivePhone.unregisterForRedirectedNumberInfo(h); 811 } 812 813 public void registerForLineControlInfo(Handler h, int what, Object obj) { 814 mActivePhone.registerForLineControlInfo( h, what, obj); 815 } 816 817 public void unregisterForLineControlInfo(Handler h) { 818 mActivePhone.unregisterForLineControlInfo(h); 819 } 820 821 public void registerFoT53ClirlInfo(Handler h, int what, Object obj) { 822 mActivePhone.registerFoT53ClirlInfo(h, what, obj); 823 } 824 825 public void unregisterForT53ClirInfo(Handler h) { 826 mActivePhone.unregisterForT53ClirInfo(h); 827 } 828 829 public void registerForT53AudioControlInfo(Handler h, int what, Object obj) { 830 mActivePhone.registerForT53AudioControlInfo( h, what, obj); 831 } 832 833 public void unregisterForT53AudioControlInfo(Handler h) { 834 mActivePhone.unregisterForT53AudioControlInfo(h); 835 } 836 837 public void setOnEcbModeExitResponse(Handler h, int what, Object obj){ 838 mActivePhone.setOnEcbModeExitResponse(h,what,obj); 839 } 840 841 public void unsetOnEcbModeExitResponse(Handler h){ 842 mActivePhone.unsetOnEcbModeExitResponse(h); 843 } 844} 845