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