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