PhoneProxy.java revision 95a1d1a89e383dab893750638c2393dec54833ff
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 void registerForSubscriptionInfoReady(Handler h, int what, Object obj) { 319 mActivePhone.registerForSubscriptionInfoReady(h, what, obj); 320 } 321 322 public void unregisterForSubscriptionInfoReady(Handler h) { 323 mActivePhone.unregisterForSubscriptionInfoReady(h); 324 } 325 326 public void registerForEcmTimerReset(Handler h, int what, Object obj) { 327 mActivePhone.registerForEcmTimerReset(h,what,obj); 328 } 329 330 public void unregisterForEcmTimerReset(Handler h) { 331 mActivePhone.unregisterForEcmTimerReset(h); 332 } 333 334 public boolean getIccRecordsLoaded() { 335 return mActivePhone.getIccRecordsLoaded(); 336 } 337 338 public IccCard getIccCard() { 339 return mActivePhone.getIccCard(); 340 } 341 342 public void acceptCall() throws CallStateException { 343 mActivePhone.acceptCall(); 344 } 345 346 public void rejectCall() throws CallStateException { 347 mActivePhone.rejectCall(); 348 } 349 350 public void switchHoldingAndActive() throws CallStateException { 351 mActivePhone.switchHoldingAndActive(); 352 } 353 354 public boolean canConference() { 355 return mActivePhone.canConference(); 356 } 357 358 public void conference() throws CallStateException { 359 mActivePhone.conference(); 360 } 361 362 public void enableEnhancedVoicePrivacy(boolean enable, Message onComplete) { 363 mActivePhone.enableEnhancedVoicePrivacy(enable, onComplete); 364 } 365 366 public void getEnhancedVoicePrivacy(Message onComplete) { 367 mActivePhone.getEnhancedVoicePrivacy(onComplete); 368 } 369 370 public boolean canTransfer() { 371 return mActivePhone.canTransfer(); 372 } 373 374 public void explicitCallTransfer() throws CallStateException { 375 mActivePhone.explicitCallTransfer(); 376 } 377 378 public void clearDisconnected() { 379 mActivePhone.clearDisconnected(); 380 } 381 382 public Call getForegroundCall() { 383 return mActivePhone.getForegroundCall(); 384 } 385 386 public Call getBackgroundCall() { 387 return mActivePhone.getBackgroundCall(); 388 } 389 390 public Call getRingingCall() { 391 return mActivePhone.getRingingCall(); 392 } 393 394 public Connection dial(String dialString) throws CallStateException { 395 return mActivePhone.dial(dialString); 396 } 397 398 public boolean handlePinMmi(String dialString) { 399 return mActivePhone.handlePinMmi(dialString); 400 } 401 402 public boolean handleInCallMmiCommands(String command) throws CallStateException { 403 return mActivePhone.handleInCallMmiCommands(command); 404 } 405 406 public void sendDtmf(char c) { 407 mActivePhone.sendDtmf(c); 408 } 409 410 public void startDtmf(char c) { 411 mActivePhone.startDtmf(c); 412 } 413 414 public void stopDtmf() { 415 mActivePhone.stopDtmf(); 416 } 417 418 public void setRadioPower(boolean power) { 419 mActivePhone.setRadioPower(power); 420 } 421 422 public boolean getMessageWaitingIndicator() { 423 return mActivePhone.getMessageWaitingIndicator(); 424 } 425 426 public boolean getCallForwardingIndicator() { 427 return mActivePhone.getCallForwardingIndicator(); 428 } 429 430 public String getLine1Number() { 431 return mActivePhone.getLine1Number(); 432 } 433 434 public String getCdmaMin() { 435 return mActivePhone.getCdmaMin(); 436 } 437 438 public boolean isMinInfoReady() { 439 return mActivePhone.isMinInfoReady(); 440 } 441 442 public String getCdmaPrlVersion() { 443 return mActivePhone.getCdmaPrlVersion(); 444 } 445 446 public String getLine1AlphaTag() { 447 return mActivePhone.getLine1AlphaTag(); 448 } 449 450 public void setLine1Number(String alphaTag, String number, Message onComplete) { 451 mActivePhone.setLine1Number(alphaTag, number, onComplete); 452 } 453 454 public String getVoiceMailNumber() { 455 return mActivePhone.getVoiceMailNumber(); 456 } 457 458 /** @hide */ 459 public int getVoiceMessageCount(){ 460 return mActivePhone.getVoiceMessageCount(); 461 } 462 463 public String getVoiceMailAlphaTag() { 464 return mActivePhone.getVoiceMailAlphaTag(); 465 } 466 467 public void setVoiceMailNumber(String alphaTag,String voiceMailNumber, 468 Message onComplete) { 469 mActivePhone.setVoiceMailNumber(alphaTag, voiceMailNumber, onComplete); 470 } 471 472 public void getCallForwardingOption(int commandInterfaceCFReason, 473 Message onComplete) { 474 mActivePhone.getCallForwardingOption(commandInterfaceCFReason, 475 onComplete); 476 } 477 478 public void setCallForwardingOption(int commandInterfaceCFReason, 479 int commandInterfaceCFAction, String dialingNumber, 480 int timerSeconds, Message onComplete) { 481 mActivePhone.setCallForwardingOption(commandInterfaceCFReason, 482 commandInterfaceCFAction, dialingNumber, timerSeconds, onComplete); 483 } 484 485 public void getOutgoingCallerIdDisplay(Message onComplete) { 486 mActivePhone.getOutgoingCallerIdDisplay(onComplete); 487 } 488 489 public void setOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, 490 Message onComplete) { 491 mActivePhone.setOutgoingCallerIdDisplay(commandInterfaceCLIRMode, 492 onComplete); 493 } 494 495 public void getCallWaiting(Message onComplete) { 496 mActivePhone.getCallWaiting(onComplete); 497 } 498 499 public void setCallWaiting(boolean enable, Message onComplete) { 500 mActivePhone.setCallWaiting(enable, onComplete); 501 } 502 503 public void getAvailableNetworks(Message response) { 504 mActivePhone.getAvailableNetworks(response); 505 } 506 507 public void setNetworkSelectionModeAutomatic(Message response) { 508 mActivePhone.setNetworkSelectionModeAutomatic(response); 509 } 510 511 public void selectNetworkManually(NetworkInfo network, Message response) { 512 mActivePhone.selectNetworkManually(network, response); 513 } 514 515 public void setPreferredNetworkType(int networkType, Message response) { 516 mActivePhone.setPreferredNetworkType(networkType, response); 517 } 518 519 public void getPreferredNetworkType(Message response) { 520 mActivePhone.getPreferredNetworkType(response); 521 } 522 523 public void getNeighboringCids(Message response) { 524 mActivePhone.getNeighboringCids(response); 525 } 526 527 public void setOnPostDialCharacter(Handler h, int what, Object obj) { 528 mActivePhone.setOnPostDialCharacter(h, what, obj); 529 } 530 531 public void setMute(boolean muted) { 532 mActivePhone.setMute(muted); 533 } 534 535 public boolean getMute() { 536 return mActivePhone.getMute(); 537 } 538 539 public void invokeOemRilRequestRaw(byte[] data, Message response) { 540 mActivePhone.invokeOemRilRequestRaw(data, response); 541 } 542 543 public void invokeOemRilRequestStrings(String[] strings, Message response) { 544 mActivePhone.invokeOemRilRequestStrings(strings, response); 545 } 546 547 /** 548 * @deprecated 549 */ 550 public void getPdpContextList(Message response) { 551 mActivePhone.getPdpContextList(response); 552 } 553 554 public void getDataCallList(Message response) { 555 mActivePhone.getDataCallList(response); 556 } 557 558 /** 559 * @deprecated 560 */ 561 public List<PdpConnection> getCurrentPdpList() { 562 return mActivePhone.getCurrentPdpList(); 563 } 564 565 public List<DataConnection> getCurrentDataConnectionList() { 566 return mActivePhone.getCurrentDataConnectionList(); 567 } 568 569 public void updateServiceLocation(Message response) { 570 mActivePhone.updateServiceLocation(response); 571 } 572 573 public void enableLocationUpdates() { 574 mActivePhone.enableLocationUpdates(); 575 } 576 577 public void disableLocationUpdates() { 578 mActivePhone.disableLocationUpdates(); 579 } 580 581 public void setUnitTestMode(boolean f) { 582 mActivePhone.setUnitTestMode(f); 583 } 584 585 public boolean getUnitTestMode() { 586 return mActivePhone.getUnitTestMode(); 587 } 588 589 public void setBandMode(int bandMode, Message response) { 590 mActivePhone.setBandMode(bandMode, response); 591 } 592 593 public void queryAvailableBandMode(Message response) { 594 mActivePhone.queryAvailableBandMode(response); 595 } 596 597 public boolean getDataRoamingEnabled() { 598 return mActivePhone.getDataRoamingEnabled(); 599 } 600 601 public void setDataRoamingEnabled(boolean enable) { 602 mActivePhone.setDataRoamingEnabled(enable); 603 } 604 605 public void queryCdmaRoamingPreference(Message response) { 606 mActivePhone.queryCdmaRoamingPreference(response); 607 } 608 609 public void setCdmaRoamingPreference(int cdmaRoamingType, Message response) { 610 mActivePhone.setCdmaRoamingPreference(cdmaRoamingType, response); 611 } 612 613 public void setCdmaSubscription(int cdmaSubscriptionType, Message response) { 614 mActivePhone.setCdmaSubscription(cdmaSubscriptionType, response); 615 } 616 617 public SimulatedRadioControl getSimulatedRadioControl() { 618 return mActivePhone.getSimulatedRadioControl(); 619 } 620 621 public boolean enableDataConnectivity() { 622 return mActivePhone.enableDataConnectivity(); 623 } 624 625 public boolean disableDataConnectivity() { 626 return mActivePhone.disableDataConnectivity(); 627 } 628 629 public int enableApnType(String type) { 630 return mActivePhone.enableApnType(type); 631 } 632 633 public int disableApnType(String type) { 634 return mActivePhone.disableApnType(type); 635 } 636 637 public boolean isDataConnectivityEnabled() { 638 return mActivePhone.isDataConnectivityEnabled(); 639 } 640 641 public boolean isDataConnectivityPossible() { 642 return mActivePhone.isDataConnectivityPossible(); 643 } 644 645 public String getInterfaceName(String apnType) { 646 return mActivePhone.getInterfaceName(apnType); 647 } 648 649 public String getIpAddress(String apnType) { 650 return mActivePhone.getIpAddress(apnType); 651 } 652 653 public String getGateway(String apnType) { 654 return mActivePhone.getGateway(apnType); 655 } 656 657 public String[] getDnsServers(String apnType) { 658 return mActivePhone.getDnsServers(apnType); 659 } 660 661 public String getDeviceId() { 662 return mActivePhone.getDeviceId(); 663 } 664 665 public String getDeviceSvn() { 666 return mActivePhone.getDeviceSvn(); 667 } 668 669 public String getSubscriberId() { 670 return mActivePhone.getSubscriberId(); 671 } 672 673 public String getIccSerialNumber() { 674 return mActivePhone.getIccSerialNumber(); 675 } 676 677 public String getEsn() { 678 return mActivePhone.getEsn(); 679 } 680 681 public String getMeid() { 682 return mActivePhone.getMeid(); 683 } 684 685 public PhoneSubInfo getPhoneSubInfo(){ 686 return mActivePhone.getPhoneSubInfo(); 687 } 688 689 public IccSmsInterfaceManager getIccSmsInterfaceManager(){ 690 return mActivePhone.getIccSmsInterfaceManager(); 691 } 692 693 public IccPhoneBookInterfaceManager getIccPhoneBookInterfaceManager(){ 694 return mActivePhone.getIccPhoneBookInterfaceManager(); 695 } 696 697 public void setTTYMode(int ttyMode, Message onComplete) { 698 mActivePhone.setTTYMode(ttyMode, onComplete); 699 } 700 701 public void queryTTYMode(Message onComplete) { 702 mActivePhone.queryTTYMode(onComplete); 703 } 704 705 public void activateCellBroadcastSms(int activate, Message response) { 706 mActivePhone.activateCellBroadcastSms(activate, response); 707 } 708 709 public void getCellBroadcastSmsConfig(Message response) { 710 mActivePhone.getCellBroadcastSmsConfig(response); 711 } 712 713 public void setCellBroadcastSmsConfig(int[] configValuesArray, Message response) { 714 mActivePhone.setCellBroadcastSmsConfig(configValuesArray, response); 715 } 716 717 public void notifyDataActivity() { 718 mActivePhone.notifyDataActivity(); 719 } 720 721 public void getSmscAddress(Message result) { 722 mActivePhone.getSmscAddress(result); 723 } 724 725 public void setSmscAddress(String address, Message result) { 726 mActivePhone.setSmscAddress(address, result); 727 } 728 729 public int getCdmaEriIconIndex() { 730 return mActivePhone.getCdmaEriIconIndex(); 731 } 732 733 public String getCdmaEriText() { 734 return mActivePhone.getCdmaEriText(); 735 } 736 737 public int getCdmaEriIconMode() { 738 return mActivePhone.getCdmaEriIconMode(); 739 } 740 741 public void sendBurstDtmf(String dtmfString, int on, int off, Message onComplete){ 742 mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete); 743 } 744 745 public void exitEmergencyCallbackMode(){ 746 mActivePhone.exitEmergencyCallbackMode(); 747 } 748 749 public boolean isOtaSpNumber(String dialStr){ 750 return mActivePhone.isOtaSpNumber(dialStr); 751 } 752 753 public void registerForCallWaiting(Handler h, int what, Object obj){ 754 mActivePhone.registerForCallWaiting(h,what,obj); 755 } 756 757 public void unregisterForCallWaiting(Handler h){ 758 mActivePhone.unregisterForCallWaiting(h); 759 } 760 761 public void registerForSignalInfo(Handler h, int what, Object obj) { 762 mActivePhone.registerForSignalInfo(h,what,obj); 763 } 764 765 public void unregisterForSignalInfo(Handler h) { 766 mActivePhone.unregisterForSignalInfo(h); 767 } 768 769 public void registerForDisplayInfo(Handler h, int what, Object obj) { 770 mActivePhone.registerForDisplayInfo(h,what,obj); 771 } 772 773 public void unregisterForDisplayInfo(Handler h) { 774 mActivePhone.unregisterForDisplayInfo(h); 775 } 776 777 public void registerForNumberInfo(Handler h, int what, Object obj) { 778 mActivePhone.registerForNumberInfo(h, what, obj); 779 } 780 781 public void unregisterForNumberInfo(Handler h) { 782 mActivePhone.unregisterForNumberInfo(h); 783 } 784 785 public void registerForRedirectedNumberInfo(Handler h, int what, Object obj) { 786 mActivePhone.registerForRedirectedNumberInfo(h, what, obj); 787 } 788 789 public void unregisterForRedirectedNumberInfo(Handler h) { 790 mActivePhone.unregisterForRedirectedNumberInfo(h); 791 } 792 793 public void registerForLineControlInfo(Handler h, int what, Object obj) { 794 mActivePhone.registerForLineControlInfo( h, what, obj); 795 } 796 797 public void unregisterForLineControlInfo(Handler h) { 798 mActivePhone.unregisterForLineControlInfo(h); 799 } 800 801 public void registerFoT53ClirlInfo(Handler h, int what, Object obj) { 802 mActivePhone.registerFoT53ClirlInfo(h, what, obj); 803 } 804 805 public void unregisterForT53ClirInfo(Handler h) { 806 mActivePhone.unregisterForT53ClirInfo(h); 807 } 808 809 public void registerForT53AudioControlInfo(Handler h, int what, Object obj) { 810 mActivePhone.registerForT53AudioControlInfo( h, what, obj); 811 } 812 813 public void unregisterForT53AudioControlInfo(Handler h) { 814 mActivePhone.unregisterForT53AudioControlInfo(h); 815 } 816 817 public void setOnEcbModeExitResponse(Handler h, int what, Object obj){ 818 mActivePhone.setOnEcbModeExitResponse(h,what,obj); 819 } 820 821 public void unsetOnEcbModeExitResponse(Handler h){ 822 mActivePhone.unsetOnEcbModeExitResponse(h); 823 } 824} 825