PhoneProxy.java revision 1c42769339d8fe98ecb2698c64e7dc6672e3d59d
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 String[] getActiveApnTypes() { 195 return mActivePhone.getActiveApnTypes(); 196 } 197 198 public String getActiveApn() { 199 return mActivePhone.getActiveApn(); 200 } 201 202 public SignalStrength getSignalStrength() { 203 return mActivePhone.getSignalStrength(); 204 } 205 206 public void registerForUnknownConnection(Handler h, int what, Object obj) { 207 mActivePhone.registerForUnknownConnection(h, what, obj); 208 } 209 210 public void unregisterForUnknownConnection(Handler h) { 211 mActivePhone.unregisterForUnknownConnection(h); 212 } 213 214 public void registerForPreciseCallStateChanged(Handler h, int what, Object obj) { 215 mActivePhone.registerForPreciseCallStateChanged(h, what, obj); 216 } 217 218 public void unregisterForPreciseCallStateChanged(Handler h) { 219 mActivePhone.unregisterForPreciseCallStateChanged(h); 220 } 221 222 public void registerForNewRingingConnection(Handler h, int what, Object obj) { 223 mActivePhone.registerForNewRingingConnection(h, what, obj); 224 } 225 226 public void unregisterForNewRingingConnection(Handler h) { 227 mActivePhone.unregisterForNewRingingConnection(h); 228 } 229 230 public void registerForIncomingRing(Handler h, int what, Object obj) { 231 mActivePhone.registerForIncomingRing(h, what, obj); 232 } 233 234 public void unregisterForIncomingRing(Handler h) { 235 mActivePhone.unregisterForIncomingRing(h); 236 } 237 238 public void registerForDisconnect(Handler h, int what, Object obj) { 239 mActivePhone.registerForDisconnect(h, what, obj); 240 } 241 242 public void unregisterForDisconnect(Handler h) { 243 mActivePhone.unregisterForDisconnect(h); 244 } 245 246 public void registerForMmiInitiate(Handler h, int what, Object obj) { 247 mActivePhone.registerForMmiInitiate(h, what, obj); 248 } 249 250 public void unregisterForMmiInitiate(Handler h) { 251 mActivePhone.unregisterForMmiInitiate(h); 252 } 253 254 public void registerForMmiComplete(Handler h, int what, Object obj) { 255 mActivePhone.registerForMmiComplete(h, what, obj); 256 } 257 258 public void unregisterForMmiComplete(Handler h) { 259 mActivePhone.unregisterForMmiComplete(h); 260 } 261 262 public List<? extends MmiCode> getPendingMmiCodes() { 263 return mActivePhone.getPendingMmiCodes(); 264 } 265 266 public void sendUssdResponse(String ussdMessge) { 267 mActivePhone.sendUssdResponse(ussdMessge); 268 } 269 270 public void registerForServiceStateChanged(Handler h, int what, Object obj) { 271 mActivePhone.registerForServiceStateChanged(h, what, obj); 272 } 273 274 public void unregisterForServiceStateChanged(Handler h) { 275 mActivePhone.unregisterForServiceStateChanged(h); 276 } 277 278 public void registerForSuppServiceNotification(Handler h, int what, Object obj) { 279 mActivePhone.registerForSuppServiceNotification(h, what, obj); 280 } 281 282 public void unregisterForSuppServiceNotification(Handler h) { 283 mActivePhone.unregisterForSuppServiceNotification(h); 284 } 285 286 public void registerForSuppServiceFailed(Handler h, int what, Object obj) { 287 mActivePhone.registerForSuppServiceFailed(h, what, obj); 288 } 289 290 public void unregisterForSuppServiceFailed(Handler h) { 291 mActivePhone.unregisterForSuppServiceFailed(h); 292 } 293 294 public void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj){ 295 mActivePhone.registerForInCallVoicePrivacyOn(h,what,obj); 296 } 297 298 public void unregisterForInCallVoicePrivacyOn(Handler h){ 299 mActivePhone.unregisterForInCallVoicePrivacyOn(h); 300 } 301 302 public void registerForInCallVoicePrivacyOff(Handler h, int what, Object obj){ 303 mActivePhone.registerForInCallVoicePrivacyOff(h,what,obj); 304 } 305 306 public void unregisterForInCallVoicePrivacyOff(Handler h){ 307 mActivePhone.unregisterForInCallVoicePrivacyOff(h); 308 } 309 310 public void registerForCdmaOtaStatusChange(Handler h, int what, Object obj) { 311 mActivePhone.registerForCdmaOtaStatusChange(h,what,obj); 312 } 313 314 public void unregisterForCdmaOtaStatusChange(Handler h) { 315 mActivePhone.unregisterForCdmaOtaStatusChange(h); 316 } 317 318 public boolean getIccRecordsLoaded() { 319 return mActivePhone.getIccRecordsLoaded(); 320 } 321 322 public IccCard getIccCard() { 323 return mActivePhone.getIccCard(); 324 } 325 326 public void acceptCall() throws CallStateException { 327 mActivePhone.acceptCall(); 328 } 329 330 public void rejectCall() throws CallStateException { 331 mActivePhone.rejectCall(); 332 } 333 334 public void switchHoldingAndActive() throws CallStateException { 335 mActivePhone.switchHoldingAndActive(); 336 } 337 338 public boolean canConference() { 339 return mActivePhone.canConference(); 340 } 341 342 public void conference() throws CallStateException { 343 mActivePhone.conference(); 344 } 345 346 public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete) { 347 mActivePhone.enableEnhancedVoicePrivacy(enable, onComplete); 348 } 349 350 public void getEnhancedVoicePrivacy(Message onComplete) { 351 mActivePhone.getEnhancedVoicePrivacy(onComplete); 352 } 353 354 public boolean canTransfer() { 355 return mActivePhone.canTransfer(); 356 } 357 358 public void explicitCallTransfer() throws CallStateException { 359 mActivePhone.explicitCallTransfer(); 360 } 361 362 public void clearDisconnected() { 363 mActivePhone.clearDisconnected(); 364 } 365 366 public Call getForegroundCall() { 367 return mActivePhone.getForegroundCall(); 368 } 369 370 public Call getBackgroundCall() { 371 return mActivePhone.getBackgroundCall(); 372 } 373 374 public Call getRingingCall() { 375 return mActivePhone.getRingingCall(); 376 } 377 378 public Connection dial(String dialString) throws CallStateException { 379 return mActivePhone.dial(dialString); 380 } 381 382 public boolean handlePinMmi(String dialString) { 383 return mActivePhone.handlePinMmi(dialString); 384 } 385 386 public boolean handleInCallMmiCommands(String command) throws CallStateException { 387 return mActivePhone.handleInCallMmiCommands(command); 388 } 389 390 public void sendDtmf(char c) { 391 mActivePhone.sendDtmf(c); 392 } 393 394 public void startDtmf(char c) { 395 mActivePhone.startDtmf(c); 396 } 397 398 public void stopDtmf() { 399 mActivePhone.stopDtmf(); 400 } 401 402 public void setRadioPower(boolean power) { 403 mActivePhone.setRadioPower(power); 404 } 405 406 public boolean getMessageWaitingIndicator() { 407 return mActivePhone.getMessageWaitingIndicator(); 408 } 409 410 public boolean getCallForwardingIndicator() { 411 return mActivePhone.getCallForwardingIndicator(); 412 } 413 414 public String getLine1Number() { 415 return mActivePhone.getLine1Number(); 416 } 417 418 public String getCdmaMin() { 419 return mActivePhone.getCdmaMin(); 420 } 421 422 public String getCdmaPrlVersion() { 423 return mActivePhone.getCdmaPrlVersion(); 424 } 425 426 public String getLine1AlphaTag() { 427 return mActivePhone.getLine1AlphaTag(); 428 } 429 430 public void setLine1Number(String alphaTag, String number, Message onComplete) { 431 mActivePhone.setLine1Number(alphaTag, number, onComplete); 432 } 433 434 public String getVoiceMailNumber() { 435 return mActivePhone.getVoiceMailNumber(); 436 } 437 438 /** @hide */ 439 public int getVoiceMessageCount(){ 440 return mActivePhone.getVoiceMessageCount(); 441 } 442 443 public String getVoiceMailAlphaTag() { 444 return mActivePhone.getVoiceMailAlphaTag(); 445 } 446 447 public void setVoiceMailNumber(String alphaTag,String voiceMailNumber, 448 Message onComplete) { 449 mActivePhone.setVoiceMailNumber(alphaTag, voiceMailNumber, onComplete); 450 } 451 452 public void getCallForwardingOption(int commandInterfaceCFReason, 453 Message onComplete) { 454 mActivePhone.getCallForwardingOption(commandInterfaceCFReason, 455 onComplete); 456 } 457 458 public void setCallForwardingOption(int commandInterfaceCFReason, 459 int commandInterfaceCFAction, String dialingNumber, 460 int timerSeconds, Message onComplete) { 461 mActivePhone.setCallForwardingOption(commandInterfaceCFReason, 462 commandInterfaceCFAction, dialingNumber, timerSeconds, onComplete); 463 } 464 465 public void getOutgoingCallerIdDisplay(Message onComplete) { 466 mActivePhone.getOutgoingCallerIdDisplay(onComplete); 467 } 468 469 public void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, 470 Message onComplete) { 471 mActivePhone.setOutgoingCallerIdDisplay(commandInterfaceCLIRMode, 472 onComplete); 473 } 474 475 public void getCallWaiting(Message onComplete) { 476 mActivePhone.getCallWaiting(onComplete); 477 } 478 479 public void setCallWaiting(boolean enable, Message onComplete) { 480 mActivePhone.setCallWaiting(enable, onComplete); 481 } 482 483 public void getAvailableNetworks(Message response) { 484 mActivePhone.getAvailableNetworks(response); 485 } 486 487 public void setNetworkSelectionModeAutomatic(Message response) { 488 mActivePhone.setNetworkSelectionModeAutomatic(response); 489 } 490 491 public void selectNetworkManually(NetworkInfo network, Message response) { 492 mActivePhone.selectNetworkManually(network, response); 493 } 494 495 public void setPreferredNetworkType(int networkType, Message response) { 496 mActivePhone.setPreferredNetworkType(networkType, response); 497 } 498 499 public void getPreferredNetworkType(Message response) { 500 mActivePhone.getPreferredNetworkType(response); 501 } 502 503 public void getNeighboringCids(Message response) { 504 mActivePhone.getNeighboringCids(response); 505 } 506 507 public void setOnPostDialCharacter(Handler h, int what, Object obj) { 508 mActivePhone.setOnPostDialCharacter(h, what, obj); 509 } 510 511 public void setMute(boolean muted) { 512 mActivePhone.setMute(muted); 513 } 514 515 public boolean getMute() { 516 return mActivePhone.getMute(); 517 } 518 519 public void invokeOemRilRequestRaw(byte[] data, Message response) { 520 mActivePhone.invokeOemRilRequestRaw(data, response); 521 } 522 523 public void invokeOemRilRequestStrings(String[] strings, Message response) { 524 mActivePhone.invokeOemRilRequestStrings(strings, response); 525 } 526 527 /** 528 * @deprecated 529 */ 530 public void getPdpContextList(Message response) { 531 mActivePhone.getPdpContextList(response); 532 } 533 534 public void getDataCallList(Message response) { 535 mActivePhone.getDataCallList(response); 536 } 537 538 /** 539 * @deprecated 540 */ 541 public List<PdpConnection> getCurrentPdpList() { 542 return mActivePhone.getCurrentPdpList(); 543 } 544 545 public List<DataConnection> getCurrentDataConnectionList() { 546 return mActivePhone.getCurrentDataConnectionList(); 547 } 548 549 public void updateServiceLocation(Message response) { 550 mActivePhone.updateServiceLocation(response); 551 } 552 553 public void enableLocationUpdates() { 554 mActivePhone.enableLocationUpdates(); 555 } 556 557 public void disableLocationUpdates() { 558 mActivePhone.disableLocationUpdates(); 559 } 560 561 public void setUnitTestMode(boolean f) { 562 mActivePhone.setUnitTestMode(f); 563 } 564 565 public boolean getUnitTestMode() { 566 return mActivePhone.getUnitTestMode(); 567 } 568 569 public void setBandMode(int bandMode, Message response) { 570 mActivePhone.setBandMode(bandMode, response); 571 } 572 573 public void queryAvailableBandMode(Message response) { 574 mActivePhone.queryAvailableBandMode(response); 575 } 576 577 public boolean getDataRoamingEnabled() { 578 return mActivePhone.getDataRoamingEnabled(); 579 } 580 581 public void setDataRoamingEnabled(boolean enable) { 582 mActivePhone.setDataRoamingEnabled(enable); 583 } 584 585 public void queryCdmaRoamingPreference(Message response) { 586 mActivePhone.queryCdmaRoamingPreference(response); 587 } 588 589 public void setCdmaRoamingPreference(int cdmaRoamingType, Message response) { 590 mActivePhone.setCdmaRoamingPreference(cdmaRoamingType, response); 591 } 592 593 public void setCdmaSubscription(int cdmaSubscriptionType, Message response) { 594 mActivePhone.setCdmaSubscription(cdmaSubscriptionType, response); 595 } 596 597 public SimulatedRadioControl getSimulatedRadioControl() { 598 return mActivePhone.getSimulatedRadioControl(); 599 } 600 601 public boolean enableDataConnectivity() { 602 return mActivePhone.enableDataConnectivity(); 603 } 604 605 public boolean disableDataConnectivity() { 606 return mActivePhone.disableDataConnectivity(); 607 } 608 609 public int enableApnType(String type) { 610 return mActivePhone.enableApnType(type); 611 } 612 613 public int disableApnType(String type) { 614 return mActivePhone.disableApnType(type); 615 } 616 617 public boolean isDataConnectivityPossible() { 618 return mActivePhone.isDataConnectivityPossible(); 619 } 620 621 public String getInterfaceName(String apnType) { 622 return mActivePhone.getInterfaceName(apnType); 623 } 624 625 public String getIpAddress(String apnType) { 626 return mActivePhone.getIpAddress(apnType); 627 } 628 629 public String getGateway(String apnType) { 630 return mActivePhone.getGateway(apnType); 631 } 632 633 public String[] getDnsServers(String apnType) { 634 return mActivePhone.getDnsServers(apnType); 635 } 636 637 public String getDeviceId() { 638 return mActivePhone.getDeviceId(); 639 } 640 641 public String getDeviceSvn() { 642 return mActivePhone.getDeviceSvn(); 643 } 644 645 public String getSubscriberId() { 646 return mActivePhone.getSubscriberId(); 647 } 648 649 public String getIccSerialNumber() { 650 return mActivePhone.getIccSerialNumber(); 651 } 652 653 public String getEsn() { 654 return mActivePhone.getEsn(); 655 } 656 657 public String getMeid() { 658 return mActivePhone.getMeid(); 659 } 660 661 public PhoneSubInfo getPhoneSubInfo(){ 662 return mActivePhone.getPhoneSubInfo(); 663 } 664 665 public IccSmsInterfaceManager getIccSmsInterfaceManager(){ 666 return mActivePhone.getIccSmsInterfaceManager(); 667 } 668 669 public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager(){ 670 return mActivePhone.getIccPhoneBookInterfaceManager(); 671 } 672 673 public void setTTYMode(int ttyMode, Message onComplete) { 674 mActivePhone.setTTYMode(ttyMode, onComplete); 675 } 676 677 public void queryTTYMode(Message onComplete) { 678 mActivePhone.queryTTYMode(onComplete); 679 } 680 681 public void activateCellBroadcastSms(int activate, Message response) { 682 mActivePhone.activateCellBroadcastSms(activate, response); 683 } 684 685 public void getCellBroadcastSmsConfig(Message response) { 686 mActivePhone.getCellBroadcastSmsConfig(response); 687 } 688 689 public void setCellBroadcastSmsConfig(int[] configValuesArray, Message response) { 690 mActivePhone.setCellBroadcastSmsConfig(configValuesArray, response); 691 } 692 693 public void notifyDataActivity() { 694 mActivePhone.notifyDataActivity(); 695 } 696 697 public void getSmscAddress(Message result) { 698 mActivePhone.getSmscAddress(result); 699 } 700 701 public void setSmscAddress(String address, Message result) { 702 mActivePhone.setSmscAddress(address, result); 703 } 704 705 public int getCdmaEriIconIndex() { 706 return mActivePhone.getCdmaEriIconIndex(); 707 } 708 709 public String getCdmaEriText() { 710 return mActivePhone.getCdmaEriText(); 711 } 712 713 public int getCdmaEriIconMode() { 714 return mActivePhone.getCdmaEriIconMode(); 715 } 716 717 public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){ 718 mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete); 719 } 720 721 public void exitEmergencyCallbackMode(){ 722 mActivePhone.exitEmergencyCallbackMode(); 723 } 724 725 public boolean isOtaSpNumber(String dialStr){ 726 return mActivePhone.isOtaSpNumber(dialStr); 727 } 728 729 public void registerForCallWaiting(Handler h, int what, Object obj){ 730 mActivePhone.registerForCallWaiting(h,what,obj); 731 } 732 733 public void unregisterForCallWaiting(Handler h){ 734 mActivePhone.unregisterForCallWaiting(h); 735 } 736 737 public void registerForSignalInfo(Handler h, int what, Object obj) { 738 mActivePhone.registerForSignalInfo(h,what,obj); 739 } 740 741 public void unregisterForSignalInfo(Handler h) { 742 mActivePhone.unregisterForSignalInfo(h); 743 } 744 745 public void registerForDisplayInfo(Handler h, int what, Object obj) { 746 mActivePhone.registerForDisplayInfo(h,what,obj); 747 } 748 749 public void unregisterForDisplayInfo(Handler h) { 750 mActivePhone.unregisterForDisplayInfo(h); 751 } 752 753 public void registerForNumberInfo(Handler h, int what, Object obj) { 754 mActivePhone.registerForNumberInfo(h, what, obj); 755 } 756 757 public void unregisterForNumberInfo(Handler h) { 758 mActivePhone.unregisterForNumberInfo(h); 759 } 760 761 public void registerForRedirectedNumberInfo(Handler h, int what, Object obj) { 762 mActivePhone.registerForRedirectedNumberInfo(h, what, obj); 763 } 764 765 public void unregisterForRedirectedNumberInfo(Handler h) { 766 mActivePhone.unregisterForRedirectedNumberInfo(h); 767 } 768 769 public void registerForLineControlInfo(Handler h, int what, Object obj) { 770 mActivePhone.registerForLineControlInfo( h, what, obj); 771 } 772 773 public void unregisterForLineControlInfo(Handler h) { 774 mActivePhone.unregisterForLineControlInfo(h); 775 } 776 777 public void registerFoT53ClirlInfo(Handler h, int what, Object obj) { 778 mActivePhone.registerFoT53ClirlInfo(h, what, obj); 779 } 780 781 public void unregisterForT53ClirInfo(Handler h) { 782 mActivePhone.unregisterForT53ClirInfo(h); 783 } 784 785 public void registerForT53AudioControlInfo(Handler h, int what, Object obj) { 786 mActivePhone.registerForT53AudioControlInfo( h, what, obj); 787 } 788 789 public void unregisterForT53AudioControlInfo(Handler h) { 790 mActivePhone.unregisterForT53AudioControlInfo(h); 791 } 792 793 public void setOnEcbModeExitResponse(Handler h, int what, Object obj){ 794 mActivePhone.setOnEcbModeExitResponse(h,what,obj); 795 } 796 797 public void unsetOnEcbModeExitResponse(Handler h){ 798 mActivePhone.unsetOnEcbModeExitResponse(h); 799 } 800} 801