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