FileDocCategorySizeDatePackage
PhoneProxy.javaAPI DocAndroid 5.1 API47875Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony

PhoneProxy

public class PhoneProxy extends android.os.Handler implements Phone

Fields Summary
public static final Object
lockForRadioTechnologyChange
private Phone
mActivePhone
private CommandsInterface
mCommandsInterface
private IccSmsInterfaceManager
mIccSmsInterfaceManager
private IccPhoneBookInterfaceManagerProxy
mIccPhoneBookInterfaceManagerProxy
private PhoneSubInfoProxy
mPhoneSubInfoProxy
private com.android.internal.telephony.uicc.IccCardProxy
mIccCardProxy
private boolean
mResetModemOnRadioTechnologyChange
private int
mRilVersion
private static final int
EVENT_VOICE_RADIO_TECH_CHANGED
private static final int
EVENT_RADIO_ON
private static final int
EVENT_REQUEST_VOICE_RADIO_TECH_DONE
private static final int
EVENT_RIL_CONNECTED
private static final int
EVENT_UPDATE_PHONE_OBJECT
private static final int
EVENT_SIM_RECORDS_LOADED
private int
mPhoneId
private static final String
LOG_TAG
Constructors Summary
public PhoneProxy(PhoneBase phone)


    //***** Class Methods
       
        mActivePhone = phone;
        mResetModemOnRadioTechnologyChange = SystemProperties.getBoolean(
                TelephonyProperties.PROPERTY_RESET_ON_RADIO_TECH_CHANGE, false);
        mIccPhoneBookInterfaceManagerProxy = new IccPhoneBookInterfaceManagerProxy(
                phone.getIccPhoneBookInterfaceManager());
        mPhoneSubInfoProxy = new PhoneSubInfoProxy(phone.getPhoneSubInfo());
        mCommandsInterface = ((PhoneBase)mActivePhone).mCi;

        mCommandsInterface.registerForRilConnected(this, EVENT_RIL_CONNECTED, null);
        mCommandsInterface.registerForOn(this, EVENT_RADIO_ON, null);
        mCommandsInterface.registerForVoiceRadioTechChanged(
                             this, EVENT_VOICE_RADIO_TECH_CHANGED, null);
        mPhoneId = phone.getPhoneId();
        mIccSmsInterfaceManager =
                new IccSmsInterfaceManager((PhoneBase)this.mActivePhone);
        mIccCardProxy = new IccCardProxy(mActivePhone.getContext(), mCommandsInterface, mActivePhone.getPhoneId());

        if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_GSM) {
            // For the purpose of IccCardProxy we only care about the technology family
            mIccCardProxy.setVoiceRadioTech(ServiceState.RIL_RADIO_TECHNOLOGY_UMTS);
        } else if (phone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
            mIccCardProxy.setVoiceRadioTech(ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT);
        }
    
Methods Summary
public voidacceptCall(int videoState)

        mActivePhone.acceptCall(videoState);
    
public voidacquireOwnershipOfImsPhone(com.android.internal.telephony.imsphone.ImsPhone imsPhone)

 
public voidactivateCellBroadcastSms(int activate, android.os.Message response)

        mActivePhone.activateCellBroadcastSms(activate, response);
    
public booleancanConference()

        return mActivePhone.canConference();
    
public booleancanTransfer()

        return mActivePhone.canTransfer();
    
public voidclearDisconnected()

        mActivePhone.clearDisconnected();
    
public voidconference()

        mActivePhone.conference();
    
private voiddeleteAndCreatePhone(int newVoiceRadioTech)


        String outgoingPhoneName = "Unknown";
        Phone oldPhone = mActivePhone;
        ImsPhone imsPhone = null;

        if (oldPhone != null) {
            outgoingPhoneName = ((PhoneBase) oldPhone).getPhoneName();
            oldPhone.unregisterForSimRecordsLoaded(this);
        }

        logd("Switching Voice Phone : " + outgoingPhoneName + " >>> "
                + (ServiceState.isGsm(newVoiceRadioTech) ? "GSM" : "CDMA"));

        if (ServiceState.isCdma(newVoiceRadioTech)) {
            mActivePhone = PhoneFactory.getCdmaPhone(mPhoneId);
        } else if (ServiceState.isGsm(newVoiceRadioTech)) {
            mActivePhone = PhoneFactory.getGsmPhone(mPhoneId);
        } else {
            loge("deleteAndCreatePhone: newVoiceRadioTech=" + newVoiceRadioTech +
                " is not CDMA or GSM (error) - aborting!");
            return;
        }

        if (oldPhone != null) {
            imsPhone = oldPhone.relinquishOwnershipOfImsPhone();
        }

        if(mActivePhone != null) {
            CallManager.getInstance().registerPhone(mActivePhone);
            if (imsPhone != null) {
                mActivePhone.acquireOwnershipOfImsPhone(imsPhone);
            }
            mActivePhone.registerForSimRecordsLoaded(this, EVENT_SIM_RECORDS_LOADED, null);
        }

        if (oldPhone != null) {
            CallManager.getInstance().unregisterPhone(oldPhone);
            logd("Disposing old phone..");
            oldPhone.dispose();
            // Potential GC issues: however, callers may have references to old
            // phone on which they perform hierarchical funcs: phone.getA().getB()
            // HENCE: do not delete references.
            //oldPhone.removeReferences();
        }
        oldPhone = null;
    
public Connectiondial(java.lang.String dialString, int videoState)

        return mActivePhone.dial(dialString, videoState);
    
public Connectiondial(java.lang.String dialString, UUSInfo uusInfo, int videoState)

        return mActivePhone.dial(dialString, uusInfo, videoState);
    
public voiddisableDnsCheck(boolean b)

        mActivePhone.disableDnsCheck(b);
    
public voiddisableLocationUpdates()

        mActivePhone.disableLocationUpdates();
    
public voiddispose()

        if (mActivePhone != null) {
            mActivePhone.unregisterForSimRecordsLoaded(this);
        }
        mCommandsInterface.unregisterForOn(this);
        mCommandsInterface.unregisterForVoiceRadioTechChanged(this);
        mCommandsInterface.unregisterForRilConnected(this);
    
public voiddump(java.io.FileDescriptor fd, java.io.PrintWriter pw, java.lang.String[] args)

        try {
            ((PhoneBase)mActivePhone).dump(fd, pw, args);
        } catch (Exception e) {
            e.printStackTrace();
        }
        pw.flush();
        pw.println("++++++++++++++++++++++++++++++++");

        try {
            mPhoneSubInfoProxy.dump(fd, pw, args);
        } catch (Exception e) {
            e.printStackTrace();
        }
        pw.flush();
        pw.println("++++++++++++++++++++++++++++++++");

        try {
            mIccCardProxy.dump(fd, pw, args);
        } catch (Exception e) {
            e.printStackTrace();
        }
        pw.flush();
        pw.println("++++++++++++++++++++++++++++++++");
    
public voidenableEnhancedVoicePrivacy(boolean enable, android.os.Message onComplete)

        mActivePhone.enableEnhancedVoicePrivacy(enable, onComplete);
    
public voidenableLocationUpdates()

        mActivePhone.enableLocationUpdates();
    
public voidexitEmergencyCallbackMode()

        mActivePhone.exitEmergencyCallbackMode();
    
public voidexplicitCallTransfer()

        mActivePhone.explicitCallTransfer();
    
public java.lang.StringgetActiveApnHost(java.lang.String apnType)

        return mActivePhone.getActiveApnHost(apnType);
    
public java.lang.String[]getActiveApnTypes()

        return mActivePhone.getActiveApnTypes();
    
public PhonegetActivePhone()

        return mActivePhone;
    
public java.util.ListgetAllCellInfo()

return
all available cell information or null if none.

        return mActivePhone.getAllCellInfo();
    
public voidgetAvailableNetworks(android.os.Message response)

        mActivePhone.getAvailableNetworks(response);
    
public CallgetBackgroundCall()

        return mActivePhone.getBackgroundCall();
    
public booleangetCallForwardingIndicator()

        return mActivePhone.getCallForwardingIndicator();
    
public voidgetCallForwardingOption(int commandInterfaceCFReason, android.os.Message onComplete)

        mActivePhone.getCallForwardingOption(commandInterfaceCFReason,
                onComplete);
    
public voidgetCallWaiting(android.os.Message onComplete)

        mActivePhone.getCallWaiting(onComplete);
    
public intgetCdmaEriIconIndex()

        return mActivePhone.getCdmaEriIconIndex();
    
public intgetCdmaEriIconMode()

        return mActivePhone.getCdmaEriIconMode();
    
public java.lang.StringgetCdmaEriText()

        return mActivePhone.getCdmaEriText();
    
public java.lang.StringgetCdmaMin()

        return mActivePhone.getCdmaMin();
    
public java.lang.StringgetCdmaPrlVersion()

        return mActivePhone.getCdmaPrlVersion();
    
public voidgetCellBroadcastSmsConfig(android.os.Message response)

        mActivePhone.getCellBroadcastSmsConfig(response);
    
public android.telephony.CellLocationgetCellLocation()

        return mActivePhone.getCellLocation();
    
public android.content.ContextgetContext()

        return mActivePhone.getContext();
    
public DataActivityStategetDataActivityState()

        return mActivePhone.getDataActivityState();
    
public voidgetDataCallList(android.os.Message response)

        mActivePhone.getDataCallList(response);
    
public PhoneConstants.DataStategetDataConnectionState()

        return mActivePhone.getDataConnectionState(PhoneConstants.APN_TYPE_DEFAULT);
    
public PhoneConstants.DataStategetDataConnectionState(java.lang.String apnType)

        return mActivePhone.getDataConnectionState(apnType);
    
public booleangetDataEnabled()

        return mActivePhone.getDataEnabled();
    
public booleangetDataRoamingEnabled()

        return mActivePhone.getDataRoamingEnabled();
    
public java.lang.StringgetDeviceId()

        return mActivePhone.getDeviceId();
    
public java.lang.StringgetDeviceSvn()

        return mActivePhone.getDeviceSvn();
    
public voidgetEnhancedVoicePrivacy(android.os.Message onComplete)

        mActivePhone.getEnhancedVoicePrivacy(onComplete);
    
public java.lang.StringgetEsn()

        return mActivePhone.getEsn();
    
public CallgetForegroundCall()

        return mActivePhone.getForegroundCall();
    
public java.lang.StringgetGroupIdLevel1()

        return mActivePhone.getGroupIdLevel1();
    
public IccCardgetIccCard()

        return mIccCardProxy;
    
public com.android.internal.telephony.uicc.IccFileHandlergetIccFileHandler()

        return ((PhoneBase)mActivePhone).getIccFileHandler();
    
public IccPhoneBookInterfaceManagergetIccPhoneBookInterfaceManager()

        return mActivePhone.getIccPhoneBookInterfaceManager();
    
public IccPhoneBookInterfaceManagerProxygetIccPhoneBookInterfaceManagerProxy()

        return mIccPhoneBookInterfaceManagerProxy;
    
public booleangetIccRecordsLoaded()

        return mIccCardProxy.getIccRecordsLoaded();
    
public java.lang.StringgetIccSerialNumber()

        return mActivePhone.getIccSerialNumber();
    
public IccSmsInterfaceManagergetIccSmsInterfaceManager()

        return mIccSmsInterfaceManager;
    
public java.lang.StringgetImei()

        return mActivePhone.getImei();
    
public PhonegetImsPhone()

        return mActivePhone.getImsPhone();
    
public com.android.internal.telephony.uicc.IsimRecordsgetIsimRecords()

        return mActivePhone.getIsimRecords();
    
public java.lang.StringgetLine1AlphaTag()

        return mActivePhone.getLine1AlphaTag();
    
public java.lang.StringgetLine1Number()

        return mActivePhone.getLine1Number();
    
public android.net.LinkPropertiesgetLinkProperties(java.lang.String apnType)

        return mActivePhone.getLinkProperties(apnType);
    
public intgetLteOnCdmaMode()
{@inheritDoc}

        return mActivePhone.getLteOnCdmaMode();
    
public java.lang.StringgetMeid()

        return mActivePhone.getMeid();
    
public booleangetMessageWaitingIndicator()

        return mActivePhone.getMessageWaitingIndicator();
    
public java.lang.StringgetMsisdn()

        return mActivePhone.getMsisdn();
    
public booleangetMute()

        return mActivePhone.getMute();
    
public java.lang.StringgetNai()

        return mActivePhone.getNai();
    
public voidgetNeighboringCids(android.os.Message response)

        mActivePhone.getNeighboringCids(response);
    
public android.net.NetworkCapabilitiesgetNetworkCapabilities(java.lang.String apnType)

        return mActivePhone.getNetworkCapabilities(apnType);
    
public voidgetNetworkSelectionMode(android.os.Message response)

        mActivePhone.getNetworkSelectionMode(response);
    
public voidgetOutgoingCallerIdDisplay(android.os.Message onComplete)

        mActivePhone.getOutgoingCallerIdDisplay(onComplete);
    
public java.lang.String[]getPcscfAddress(java.lang.String apnType)

        return mActivePhone.getPcscfAddress(apnType);
    
public java.util.ListgetPendingMmiCodes()

        return mActivePhone.getPendingMmiCodes();
    
public com.android.internal.telephony.uicc.IccCardProxygetPhoneIccCardProxy()

        return mIccCardProxy;
    
public intgetPhoneId()

        return mActivePhone.getPhoneId();
    
public java.lang.StringgetPhoneName()

        return mActivePhone.getPhoneName();
    
public PhoneSubInfogetPhoneSubInfo()

        return mActivePhone.getPhoneSubInfo();
    
public PhoneSubInfoProxygetPhoneSubInfoProxy()

        return mPhoneSubInfoProxy;
    
public intgetPhoneType()

        return mActivePhone.getPhoneType();
    
public voidgetPreferredNetworkType(android.os.Message response)

        mActivePhone.getPreferredNetworkType(response);
    
public intgetRadioAccessFamily()

        return mActivePhone.getRadioAccessFamily();
    
public CallgetRingingCall()

        return mActivePhone.getRingingCall();
    
public android.telephony.ServiceStategetServiceState()

        return mActivePhone.getServiceState();
    
public android.telephony.SignalStrengthgetSignalStrength()

        return mActivePhone.getSignalStrength();
    
public com.android.internal.telephony.test.SimulatedRadioControlgetSimulatedRadioControl()

        return mActivePhone.getSimulatedRadioControl();
    
public voidgetSmscAddress(android.os.Message result)

        mActivePhone.getSmscAddress(result);
    
public PhoneConstants.StategetState()

        return mActivePhone.getState();
    
public intgetSubId()

        return mActivePhone.getSubId();
    
public java.lang.StringgetSubscriberId()

        return mActivePhone.getSubscriberId();
    
public intgetSupportedRadioAccessFamily()

        return mCommandsInterface.getSupportedRadioAccessFamily();
    
public com.android.internal.telephony.uicc.UiccCardgetUiccCard()

        return mActivePhone.getUiccCard();
    
public booleangetUnitTestMode()

        return mActivePhone.getUnitTestMode();
    
public com.android.internal.telephony.uicc.UsimServiceTablegetUsimServiceTable()

        return mActivePhone.getUsimServiceTable();
    
public java.lang.StringgetVoiceMailAlphaTag()

        return mActivePhone.getVoiceMailAlphaTag();
    
public java.lang.StringgetVoiceMailNumber()

        return mActivePhone.getVoiceMailNumber();
    
public intgetVoiceMessageCount()

hide

        return mActivePhone.getVoiceMessageCount();
    
public intgetVoicePhoneServiceState()

        return mActivePhone.getVoicePhoneServiceState();
    
public booleanhandleInCallMmiCommands(java.lang.String command)

        return mActivePhone.handleInCallMmiCommands(command);
    
public voidhandleMessage(android.os.Message msg)

        AsyncResult ar = (AsyncResult) msg.obj;
        switch(msg.what) {
        case EVENT_RADIO_ON:
            /* Proactively query voice radio technologies */
            mCommandsInterface.getVoiceRadioTechnology(
                    obtainMessage(EVENT_REQUEST_VOICE_RADIO_TECH_DONE));
            break;

        case EVENT_RIL_CONNECTED:
            if (ar.exception == null && ar.result != null) {
                mRilVersion = (Integer) ar.result;
            } else {
                logd("Unexpected exception on EVENT_RIL_CONNECTED");
                mRilVersion = -1;
            }
            break;

        case EVENT_VOICE_RADIO_TECH_CHANGED:
        case EVENT_REQUEST_VOICE_RADIO_TECH_DONE:
            String what = (msg.what == EVENT_VOICE_RADIO_TECH_CHANGED) ?
                    "EVENT_VOICE_RADIO_TECH_CHANGED" : "EVENT_REQUEST_VOICE_RADIO_TECH_DONE";
            if (ar.exception == null) {
                if ((ar.result != null) && (((int[]) ar.result).length != 0)) {
                    int newVoiceTech = ((int[]) ar.result)[0];
                    logd(what + ": newVoiceTech=" + newVoiceTech);
                    phoneObjectUpdater(newVoiceTech);
                } else {
                    loge(what + ": has no tech!");
                }
            } else {
                loge(what + ": exception=" + ar.exception);
            }
            break;

        case EVENT_UPDATE_PHONE_OBJECT:
            phoneObjectUpdater(msg.arg1);
            break;

        case EVENT_SIM_RECORDS_LOADED:
            // Only check for the voice radio tech if it not going to be updated by the voice
            // registration changes.
            if (!mActivePhone.getContext().getResources().getBoolean(
                    com.android.internal.R.bool.config_switch_phone_on_voice_reg_state_change)) {
                mCommandsInterface.getVoiceRadioTechnology(obtainMessage(
                        EVENT_REQUEST_VOICE_RADIO_TECH_DONE));
            }
            break;

        default:
            loge("Error! This handler was not registered for this message type. Message: "
                    + msg.what);
            break;
        }
        super.handleMessage(msg);
    
public booleanhandlePinMmi(java.lang.String dialString)

        return mActivePhone.handlePinMmi(dialString);
    
public booleanhasMatchedTetherApnSetting()

        return mActivePhone.hasMatchedTetherApnSetting();
    
public voidinvokeOemRilRequestRaw(byte[] data, android.os.Message response)

        mActivePhone.invokeOemRilRequestRaw(data, response);
    
public voidinvokeOemRilRequestStrings(java.lang.String[] strings, android.os.Message response)

        mActivePhone.invokeOemRilRequestStrings(strings, response);
    
public booleanisCspPlmnEnabled()

        return mActivePhone.isCspPlmnEnabled();
    
public booleanisDataConnectivityPossible()

        return mActivePhone.isDataConnectivityPossible(PhoneConstants.APN_TYPE_DEFAULT);
    
public booleanisDataConnectivityPossible(java.lang.String apnType)

        return mActivePhone.isDataConnectivityPossible(apnType);
    
public booleanisDnsCheckDisabled()

        return mActivePhone.isDnsCheckDisabled();
    
public booleanisImsRegistered()

        return mActivePhone.isImsRegistered();
    
public booleanisMinInfoReady()

        return mActivePhone.isMinInfoReady();
    
public booleanisOtaSpNumber(java.lang.String dialStr)

        return mActivePhone.isOtaSpNumber(dialStr);
    
public booleanisRadioAvailable()

        return mCommandsInterface.getRadioState().isAvailable();
    
private static voidlogd(java.lang.String msg)

        Rlog.d(LOG_TAG, "[PhoneProxy] " + msg);
    
private voidloge(java.lang.String msg)

        Rlog.e(LOG_TAG, "[PhoneProxy] " + msg);
    
public booleanneedsOtaServiceProvisioning()

        return mActivePhone.needsOtaServiceProvisioning();
    
public voidnotifyDataActivity()

         mActivePhone.notifyDataActivity();
    
public voidnvReadItem(int itemID, android.os.Message response)

        mActivePhone.nvReadItem(itemID, response);
    
public voidnvResetConfig(int resetType, android.os.Message response)

        mActivePhone.nvResetConfig(resetType, response);
    
public voidnvWriteCdmaPrl(byte[] preferredRoamingList, android.os.Message response)

        mActivePhone.nvWriteCdmaPrl(preferredRoamingList, response);
    
public voidnvWriteItem(int itemID, java.lang.String itemValue, android.os.Message response)

        mActivePhone.nvWriteItem(itemID, itemValue, response);
    
private voidphoneObjectUpdater(int newVoiceRadioTech)

        logd("phoneObjectUpdater: newVoiceRadioTech=" + newVoiceRadioTech);

        if (mActivePhone != null) {
            // Check for a voice over lte replacement
            if ((newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_LTE) ||
                    (newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)) {
                int volteReplacementRat = mActivePhone.getContext().getResources().getInteger(
                        com.android.internal.R.integer.config_volte_replacement_rat);
                logd("phoneObjectUpdater: volteReplacementRat=" + volteReplacementRat);
                if (volteReplacementRat != ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
                    newVoiceRadioTech = volteReplacementRat;
                }
            }

            if(mRilVersion == 6 && getLteOnCdmaMode() == PhoneConstants.LTE_ON_CDMA_TRUE) {
                /*
                 * On v6 RIL, when LTE_ON_CDMA is TRUE, always create CDMALTEPhone
                 * irrespective of the voice radio tech reported.
                 */
                if (mActivePhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) {
                    logd("phoneObjectUpdater: LTE ON CDMA property is set. Use CDMA Phone" +
                            " newVoiceRadioTech=" + newVoiceRadioTech +
                            " mActivePhone=" + mActivePhone.getPhoneName());
                    return;
                } else {
                    logd("phoneObjectUpdater: LTE ON CDMA property is set. Switch to CDMALTEPhone" +
                            " newVoiceRadioTech=" + newVoiceRadioTech +
                            " mActivePhone=" + mActivePhone.getPhoneName());
                    newVoiceRadioTech = ServiceState.RIL_RADIO_TECHNOLOGY_1xRTT;
                }
            } else {
                boolean matchCdma = ServiceState.isCdma(newVoiceRadioTech);
                boolean matchGsm = ServiceState.isGsm(newVoiceRadioTech);
                if ((matchCdma  &&
                        mActivePhone.getPhoneType() == PhoneConstants.PHONE_TYPE_CDMA) ||
                        (matchGsm &&
                                mActivePhone.getPhoneType() == PhoneConstants.PHONE_TYPE_GSM)) {
                    // Nothing changed. Keep phone as it is.
                    logd("phoneObjectUpdater: No change ignore," +
                            " newVoiceRadioTech=" + newVoiceRadioTech +
                            " mActivePhone=" + mActivePhone.getPhoneName());
                    return;
                }
                if (!matchCdma && !matchGsm) {
                    loge("phoneObjectUpdater: newVoiceRadioTech=" + newVoiceRadioTech +
                        " doesn't match either CDMA or GSM - error! No phone change");
                    return;
                }
            }
        }

        if (newVoiceRadioTech == ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN) {
            // We need some voice phone object to be active always, so never
            // delete the phone without anything to replace it with!
            logd("phoneObjectUpdater: Unknown rat ignore, "
                    + " newVoiceRadioTech=Unknown. mActivePhone=" + mActivePhone.getPhoneName());
            return;
        }

        boolean oldPowerState = false; // old power state to off
        if (mResetModemOnRadioTechnologyChange) {
            if (mCommandsInterface.getRadioState().isOn()) {
                oldPowerState = true;
                logd("phoneObjectUpdater: Setting Radio Power to Off");
                mCommandsInterface.setRadioPower(false, null);
            }
        }

        deleteAndCreatePhone(newVoiceRadioTech);

        if (mResetModemOnRadioTechnologyChange && oldPowerState) { // restore power state
            logd("phoneObjectUpdater: Resetting Radio");
            mCommandsInterface.setRadioPower(oldPowerState, null);
        }

        // Set the new interfaces in the proxy's
        mIccSmsInterfaceManager.updatePhoneObject((PhoneBase) mActivePhone);
        mIccPhoneBookInterfaceManagerProxy.setmIccPhoneBookInterfaceManager(mActivePhone
                .getIccPhoneBookInterfaceManager());
        mPhoneSubInfoProxy.setmPhoneSubInfo(mActivePhone.getPhoneSubInfo());

        mCommandsInterface = ((PhoneBase)mActivePhone).mCi;
        mIccCardProxy.setVoiceRadioTech(newVoiceRadioTech);

        // Send an Intent to the PhoneApp that we had a radio technology change
        Intent intent = new Intent(TelephonyIntents.ACTION_RADIO_TECHNOLOGY_CHANGED);
        intent.addFlags(Intent.FLAG_RECEIVER_REPLACE_PENDING);
        intent.putExtra(PhoneConstants.PHONE_NAME_KEY, mActivePhone.getPhoneName());
        SubscriptionManager.putPhoneIdAndSubIdExtra(intent, mPhoneId);
        ActivityManagerNative.broadcastStickyIntent(intent, null, UserHandle.USER_ALL);

        DctController.getInstance().updatePhoneObject(this);

    
public voidqueryAvailableBandMode(android.os.Message response)

        mActivePhone.queryAvailableBandMode(response);
    
public voidqueryCdmaRoamingPreference(android.os.Message response)

        mActivePhone.queryCdmaRoamingPreference(response);
    
public voidqueryTTYMode(android.os.Message onComplete)

        mActivePhone.queryTTYMode(onComplete);
    
public voidregisterFoT53ClirlInfo(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerFoT53ClirlInfo(h, what, obj);
    
public voidregisterForAllDataDisconnected(android.os.Handler h, int what, java.lang.Object obj)

        if (mActivePhone instanceof CDMALTEPhone) {
            ((CDMALTEPhone)mActivePhone).registerForAllDataDisconnected(h, what, obj);
        } else if (mActivePhone instanceof GSMPhone) {
            ((GSMPhone)mActivePhone).registerForAllDataDisconnected(h, what, obj);
        } else {
           loge("Phone object is not MultiSim. This should not hit!!!!");
        }
    
public voidregisterForCallWaiting(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForCallWaiting(h,what,obj);
    
public voidregisterForCdmaOtaStatusChange(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForCdmaOtaStatusChange(h,what,obj);
    
public voidregisterForDisconnect(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForDisconnect(h, what, obj);
    
public voidregisterForDisplayInfo(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForDisplayInfo(h,what,obj);
    
public voidregisterForEcmTimerReset(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForEcmTimerReset(h,what,obj);
    
public voidregisterForHandoverStateChanged(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForHandoverStateChanged(h, what, obj);
    
public voidregisterForInCallVoicePrivacyOff(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForInCallVoicePrivacyOff(h,what,obj);
    
public voidregisterForInCallVoicePrivacyOn(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForInCallVoicePrivacyOn(h,what,obj);
    
public voidregisterForIncomingRing(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForIncomingRing(h, what, obj);
    
public voidregisterForLineControlInfo(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForLineControlInfo( h, what, obj);
    
public voidregisterForMmiComplete(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForMmiComplete(h, what, obj);
    
public voidregisterForMmiInitiate(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForMmiInitiate(h, what, obj);
    
public voidregisterForNewRingingConnection(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForNewRingingConnection(h, what, obj);
    
public voidregisterForNumberInfo(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForNumberInfo(h, what, obj);
    
public voidregisterForOnHoldTone(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForOnHoldTone(h,what,obj);
    
public voidregisterForPreciseCallStateChanged(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForPreciseCallStateChanged(h, what, obj);
    
public voidregisterForRadioCapabilityChanged(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForRadioCapabilityChanged(h, what, obj);
    
public voidregisterForRadioOffOrNotAvailable(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForRadioOffOrNotAvailable( h, what, obj);
    
public voidregisterForRedirectedNumberInfo(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForRedirectedNumberInfo(h, what, obj);
    
public voidregisterForResendIncallMute(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForResendIncallMute(h,what,obj);
    
public voidregisterForRingbackTone(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForRingbackTone(h,what,obj);
    
public voidregisterForServiceStateChanged(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForServiceStateChanged(h, what, obj);
    
public voidregisterForSignalInfo(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForSignalInfo(h,what,obj);
    
public voidregisterForSimRecordsLoaded(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForSimRecordsLoaded(h,what,obj);
    
public voidregisterForSubscriptionInfoReady(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForSubscriptionInfoReady(h, what, obj);
    
public voidregisterForSuppServiceFailed(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForSuppServiceFailed(h, what, obj);
    
public voidregisterForSuppServiceNotification(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForSuppServiceNotification(h, what, obj);
    
public voidregisterForT53AudioControlInfo(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForT53AudioControlInfo( h, what, obj);
    
public voidregisterForTtyModeReceived(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForTtyModeReceived(h, what, obj);
    
public voidregisterForUnknownConnection(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.registerForUnknownConnection(h, what, obj);
    
public voidrejectCall()

        mActivePhone.rejectCall();
    
public com.android.internal.telephony.imsphone.ImsPhonerelinquishOwnershipOfImsPhone()

 return null; 
public voidremoveReferences()

        mActivePhone = null;
        mCommandsInterface = null;
    
public voidselectNetworkManually(OperatorInfo network, android.os.Message response)

        mActivePhone.selectNetworkManually(network, response);
    
public voidsendBurstDtmf(java.lang.String dtmfString, int on, int off, android.os.Message onComplete)

        mActivePhone.sendBurstDtmf(dtmfString, on, off, onComplete);
    
public voidsendDtmf(char c)

        mActivePhone.sendDtmf(c);
    
public voidsendUssdResponse(java.lang.String ussdMessge)

        mActivePhone.sendUssdResponse(ussdMessge);
    
public voidsetBandMode(int bandMode, android.os.Message response)

        mActivePhone.setBandMode(bandMode, response);
    
public voidsetCallForwardingOption(int commandInterfaceCFReason, int commandInterfaceCFAction, java.lang.String dialingNumber, int timerSeconds, android.os.Message onComplete)

        mActivePhone.setCallForwardingOption(commandInterfaceCFReason,
            commandInterfaceCFAction, dialingNumber, timerSeconds, onComplete);
    
public voidsetCallWaiting(boolean enable, android.os.Message onComplete)

        mActivePhone.setCallWaiting(enable, onComplete);
    
public voidsetCdmaRoamingPreference(int cdmaRoamingType, android.os.Message response)

        mActivePhone.setCdmaRoamingPreference(cdmaRoamingType, response);
    
public voidsetCdmaSubscription(int cdmaSubscriptionType, android.os.Message response)

        mActivePhone.setCdmaSubscription(cdmaSubscriptionType, response);
    
public voidsetCellBroadcastSmsConfig(int[] configValuesArray, android.os.Message response)

        mActivePhone.setCellBroadcastSmsConfig(configValuesArray, response);
    
public voidsetCellInfoListRate(int rateInMillis)
{@inheritDoc}

        mActivePhone.setCellInfoListRate(rateInMillis);
    
public voidsetDataEnabled(boolean enable)

        mActivePhone.setDataEnabled(enable);
    
public voidsetDataRoamingEnabled(boolean enable)

        mActivePhone.setDataRoamingEnabled(enable);
    
public voidsetEchoSuppressionEnabled()

        mActivePhone.setEchoSuppressionEnabled();
    
public voidsetImsRegistrationState(boolean registered)

        logd("setImsRegistrationState - registered: " + registered);

        mActivePhone.setImsRegistrationState(registered);

        if ((mActivePhone.getPhoneName()).equals("GSM")) {
            GSMPhone GP = (GSMPhone)mActivePhone;
            GP.getServiceStateTracker().setImsRegistrationState(registered);
        } else if ((mActivePhone.getPhoneName()).equals("CDMA")) {
            CDMAPhone CP = (CDMAPhone)mActivePhone;
            CP.getServiceStateTracker().setImsRegistrationState(registered);
        }
    
public voidsetInternalDataEnabled(boolean enable)

        setInternalDataEnabled(enable, null);
    
public voidsetInternalDataEnabled(boolean enable, android.os.Message onCompleteMsg)

        if (mActivePhone instanceof CDMALTEPhone) {
            ((CDMALTEPhone)mActivePhone).setInternalDataEnabled(enable, onCompleteMsg);
        } else if (mActivePhone instanceof GSMPhone) {
            ((GSMPhone)mActivePhone).setInternalDataEnabled(enable, onCompleteMsg);
        } else {
           loge("Phone object is not MultiSim. This should not hit!!!!");
        }
    
public booleansetInternalDataEnabledFlag(boolean enable)

        boolean flag = false;
        if (mActivePhone instanceof CDMALTEPhone) {
            flag = ((CDMALTEPhone)mActivePhone).setInternalDataEnabledFlag(enable);
        } else if (mActivePhone instanceof GSMPhone) {
            flag = ((GSMPhone)mActivePhone).setInternalDataEnabledFlag(enable);
        } else {
           loge("Phone object is not MultiSim. This should not hit!!!!");
        }
        return flag;
    
public booleansetLine1Number(java.lang.String alphaTag, java.lang.String number, android.os.Message onComplete)

        return mActivePhone.setLine1Number(alphaTag, number, onComplete);
    
public voidsetMute(boolean muted)

        mActivePhone.setMute(muted);
    
public voidsetNetworkSelectionModeAutomatic(android.os.Message response)

        mActivePhone.setNetworkSelectionModeAutomatic(response);
    
public voidsetOnEcbModeExitResponse(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.setOnEcbModeExitResponse(h,what,obj);
    
public voidsetOnPostDialCharacter(android.os.Handler h, int what, java.lang.Object obj)

        mActivePhone.setOnPostDialCharacter(h, what, obj);
    
public booleansetOperatorBrandOverride(java.lang.String brand)

        return mActivePhone.setOperatorBrandOverride(brand);
    
public voidsetOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, android.os.Message onComplete)

        mActivePhone.setOutgoingCallerIdDisplay(commandInterfaceCLIRMode,
                onComplete);
    
public voidsetPreferredNetworkType(int networkType, android.os.Message response)

        mActivePhone.setPreferredNetworkType(networkType, response);
    
public voidsetRadioCapability(com.android.internal.telephony.RadioCapability rc, android.os.Message response)

        mActivePhone.setRadioCapability(rc, response);
    
public voidsetRadioPower(boolean power)

        mActivePhone.setRadioPower(power);
    
public booleansetRoamingOverride(java.util.List gsmRoamingList, java.util.List gsmNonRoamingList, java.util.List cdmaRoamingList, java.util.List cdmaNonRoamingList)

        return mActivePhone.setRoamingOverride(gsmRoamingList, gsmNonRoamingList,
                cdmaRoamingList, cdmaNonRoamingList);
    
public voidsetSmscAddress(java.lang.String address, android.os.Message result)

        mActivePhone.setSmscAddress(address, result);
    
public voidsetTTYMode(int ttyMode, android.os.Message onComplete)

        mActivePhone.setTTYMode(ttyMode, onComplete);
    
public voidsetUiTTYMode(int uiTtyMode, android.os.Message onComplete)

        mActivePhone.setUiTTYMode(uiTtyMode, onComplete);
    
public voidsetUnitTestMode(boolean f)

        mActivePhone.setUnitTestMode(f);
    
public voidsetVoiceMailNumber(java.lang.String alphaTag, java.lang.String voiceMailNumber, android.os.Message onComplete)

        mActivePhone.setVoiceMailNumber(alphaTag, voiceMailNumber, onComplete);
    
public voidsetVoiceMessageWaiting(int line, int countWaiting)

        mActivePhone.setVoiceMessageWaiting(line, countWaiting);
    
public voidshutdownRadio()

        mActivePhone.shutdownRadio();
    
public voidstartDtmf(char c)

        mActivePhone.startDtmf(c);
    
public voidstopDtmf()

        mActivePhone.stopDtmf();
    
public voidswitchHoldingAndActive()

        mActivePhone.switchHoldingAndActive();
    
public voidunregisterForAllDataDisconnected(android.os.Handler h)

        if (mActivePhone instanceof CDMALTEPhone) {
            ((CDMALTEPhone)mActivePhone).unregisterForAllDataDisconnected(h);
        } else if (mActivePhone instanceof GSMPhone) {
            ((GSMPhone)mActivePhone).unregisterForAllDataDisconnected(h);
        } else {
           loge("Phone object is not MultiSim. This should not hit!!!!");
        }
    
public voidunregisterForCallWaiting(android.os.Handler h)

        mActivePhone.unregisterForCallWaiting(h);
    
public voidunregisterForCdmaOtaStatusChange(android.os.Handler h)

         mActivePhone.unregisterForCdmaOtaStatusChange(h);
    
public voidunregisterForDisconnect(android.os.Handler h)

        mActivePhone.unregisterForDisconnect(h);
    
public voidunregisterForDisplayInfo(android.os.Handler h)

        mActivePhone.unregisterForDisplayInfo(h);
    
public voidunregisterForEcmTimerReset(android.os.Handler h)

        mActivePhone.unregisterForEcmTimerReset(h);
    
public voidunregisterForHandoverStateChanged(android.os.Handler h)

        mActivePhone.unregisterForHandoverStateChanged(h);
    
public voidunregisterForInCallVoicePrivacyOff(android.os.Handler h)

        mActivePhone.unregisterForInCallVoicePrivacyOff(h);
    
public voidunregisterForInCallVoicePrivacyOn(android.os.Handler h)

        mActivePhone.unregisterForInCallVoicePrivacyOn(h);
    
public voidunregisterForIncomingRing(android.os.Handler h)

        mActivePhone.unregisterForIncomingRing(h);
    
public voidunregisterForLineControlInfo(android.os.Handler h)

        mActivePhone.unregisterForLineControlInfo(h);
    
public voidunregisterForMmiComplete(android.os.Handler h)

        mActivePhone.unregisterForMmiComplete(h);
    
public voidunregisterForMmiInitiate(android.os.Handler h)

        mActivePhone.unregisterForMmiInitiate(h);
    
public voidunregisterForNewRingingConnection(android.os.Handler h)

        mActivePhone.unregisterForNewRingingConnection(h);
    
public voidunregisterForNumberInfo(android.os.Handler h)

        mActivePhone.unregisterForNumberInfo(h);
    
public voidunregisterForOnHoldTone(android.os.Handler h)

        mActivePhone.unregisterForOnHoldTone(h);
    
public voidunregisterForPreciseCallStateChanged(android.os.Handler h)

        mActivePhone.unregisterForPreciseCallStateChanged(h);
    
public voidunregisterForRadioCapabilityChanged(android.os.Handler h)

        mActivePhone.unregisterForRadioCapabilityChanged(h);
    
public voidunregisterForRadioOffOrNotAvailable(android.os.Handler h)

        mActivePhone.unregisterForRadioOffOrNotAvailable(h);
    
public voidunregisterForRedirectedNumberInfo(android.os.Handler h)

        mActivePhone.unregisterForRedirectedNumberInfo(h);
    
public voidunregisterForResendIncallMute(android.os.Handler h)

        mActivePhone.unregisterForResendIncallMute(h);
    
public voidunregisterForRingbackTone(android.os.Handler h)

        mActivePhone.unregisterForRingbackTone(h);
    
public voidunregisterForServiceStateChanged(android.os.Handler h)

        mActivePhone.unregisterForServiceStateChanged(h);
    
public voidunregisterForSignalInfo(android.os.Handler h)

        mActivePhone.unregisterForSignalInfo(h);
    
public voidunregisterForSimRecordsLoaded(android.os.Handler h)

        mActivePhone.unregisterForSimRecordsLoaded(h);
    
public voidunregisterForSubscriptionInfoReady(android.os.Handler h)

        mActivePhone.unregisterForSubscriptionInfoReady(h);
    
public voidunregisterForSuppServiceFailed(android.os.Handler h)

        mActivePhone.unregisterForSuppServiceFailed(h);
    
public voidunregisterForSuppServiceNotification(android.os.Handler h)

        mActivePhone.unregisterForSuppServiceNotification(h);
    
public voidunregisterForT53AudioControlInfo(android.os.Handler h)

        mActivePhone.unregisterForT53AudioControlInfo(h);
    
public voidunregisterForT53ClirInfo(android.os.Handler h)

        mActivePhone.unregisterForT53ClirInfo(h);
    
public voidunregisterForTtyModeReceived(android.os.Handler h)

        mActivePhone.unregisterForTtyModeReceived(h);
    
public voidunregisterForUnknownConnection(android.os.Handler h)

        mActivePhone.unregisterForUnknownConnection(h);
    
public voidunsetOnEcbModeExitResponse(android.os.Handler h)

        mActivePhone.unsetOnEcbModeExitResponse(h);
    
public booleanupdateCurrentCarrierInProvider()

        if (mActivePhone instanceof CDMALTEPhone) {
            return ((CDMALTEPhone)mActivePhone).updateCurrentCarrierInProvider();
        } else if (mActivePhone instanceof GSMPhone) {
            return ((GSMPhone)mActivePhone).updateCurrentCarrierInProvider();
        } else {
           loge("Phone object is not MultiSim. This should not hit!!!!");
           return false;
        }
    
public voidupdateDataConnectionTracker()

        logd("Updating Data Connection Tracker");
        if (mActivePhone instanceof CDMALTEPhone) {
            ((CDMALTEPhone)mActivePhone).updateDataConnectionTracker();
        } else if (mActivePhone instanceof GSMPhone) {
            ((GSMPhone)mActivePhone).updateDataConnectionTracker();
        } else {
           loge("Phone object is not MultiSim. This should not hit!!!!");
        }
    
public voidupdatePhoneObject(int voiceRadioTech)

        logd("updatePhoneObject: radioTechnology=" + voiceRadioTech);
        sendMessage(obtainMessage(EVENT_UPDATE_PHONE_OBJECT, voiceRadioTech, 0, null));
    
public voidupdateServiceLocation()

        mActivePhone.updateServiceLocation();