FileDocCategorySizeDatePackage
ImsPhoneBase.javaAPI DocAndroid 5.1 API15443Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.imsphone

ImsPhoneBase

public abstract class ImsPhoneBase extends com.android.internal.telephony.PhoneBase

Fields Summary
private static final String
LOG_TAG
private android.os.RegistrantList
mRingbackRegistrants
private android.os.RegistrantList
mOnHoldRegistrants
private android.os.RegistrantList
mTtyModeReceivedRegistrants
private PhoneConstants.State
mState
Constructors Summary
public ImsPhoneBase(String name, android.content.Context context, com.android.internal.telephony.PhoneNotifier notifier)


           
        super(name, notifier, context, new ImsPhoneCommandInterface(context), false);
    
Methods Summary
public voidactivateCellBroadcastSms(int activate, android.os.Message response)

        Rlog.e(LOG_TAG, "Error! This functionality is not implemented for Volte.");
    
public booleancanDial()

        int serviceState = getServiceState().getState();
        Rlog.v(LOG_TAG, "canDial(): serviceState = " + serviceState);
        if (serviceState == ServiceState.STATE_POWER_OFF) return false;

        String disableCall = SystemProperties.get(
                TelephonyProperties.PROPERTY_DISABLE_CALL, "false");
        Rlog.v(LOG_TAG, "canDial(): disableCall = " + disableCall);
        if (disableCall.equals("true")) return false;

        Rlog.v(LOG_TAG, "canDial(): ringingCall: " + getRingingCall().getState());
        Rlog.v(LOG_TAG, "canDial(): foregndCall: " + getForegroundCall().getState());
        Rlog.v(LOG_TAG, "canDial(): backgndCall: " + getBackgroundCall().getState());
        return !getRingingCall().isRinging()
                && (!getForegroundCall().getState().isAlive()
                    || !getBackgroundCall().getState().isAlive());
    
public com.android.internal.telephony.Connectiondial(java.lang.String dialString, com.android.internal.telephony.UUSInfo uusInfo, int videoState)

        // ignore UUSInfo
        return dial(dialString, videoState);
    
public booleandisableDataConnectivity()

        return false;
    
public voiddisableLocationUpdates()

    
public booleanenableDataConnectivity()

        return false;
    
public voidenableLocationUpdates()

    
public java.util.ListgetAllCellInfo()

return
all available cell information or null if none.

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

    
public booleangetCallForwardingIndicator()

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

    
public voidgetCallWaiting(android.os.Message onComplete)

        AsyncResult.forMessage(onComplete, null, null);
        onComplete.sendToTarget();
    
public voidgetCellBroadcastSmsConfig(android.os.Message response)

        Rlog.e(LOG_TAG, "Error! This functionality is not implemented for Volte.");
    
public android.telephony.CellLocationgetCellLocation()

        return null;
    
public java.util.ListgetCurrentDataConnectionList()

        return null;
    
public DataActivityStategetDataActivityState()

        return DataActivityState.NONE;
    
public voidgetDataCallList(android.os.Message response)

    
public PhoneConstants.DataStategetDataConnectionState()

        return PhoneConstants.DataState.DISCONNECTED;
    
public PhoneConstants.DataStategetDataConnectionState(java.lang.String apnType)

        return PhoneConstants.DataState.DISCONNECTED;
    
public booleangetDataEnabled()

        return false;
    
public booleangetDataRoamingEnabled()

        return false;
    
public java.lang.StringgetDeviceId()

        return null;
    
public java.lang.StringgetDeviceSvn()

        return null;
    
public java.lang.StringgetEsn()

        Rlog.e(LOG_TAG, "[VoltePhone] getEsn() is a CDMA method");
        return "0";
    
public java.lang.StringgetGroupIdLevel1()

        return null;
    
public com.android.internal.telephony.IccCardgetIccCard()

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

        return null;
    
public com.android.internal.telephony.IccPhoneBookInterfaceManagergetIccPhoneBookInterfaceManager()

        return null;
    
public booleangetIccRecordsLoaded()

        return false;
    
public java.lang.StringgetIccSerialNumber()

        return null;
    
public java.lang.StringgetImei()

        return null;
    
public java.lang.StringgetLine1AlphaTag()

        return null;
    
public java.lang.StringgetLine1Number()

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

        // FIXME: what's this for Volte?
        return null;
    
public java.lang.StringgetMeid()

        Rlog.e(LOG_TAG, "[VoltePhone] getMeid() is a CDMA method");
        return "0";
    
public booleangetMessageWaitingIndicator()

        return false;
    
public voidgetNeighboringCids(android.os.Message response)

    
public voidgetOutgoingCallerIdDisplay(android.os.Message onComplete)

        // FIXME: what to reply?
        AsyncResult.forMessage(onComplete, null, null);
        onComplete.sendToTarget();
    
public java.util.ListgetPendingMmiCodes()

        return new ArrayList<MmiCode>(0);
    
public com.android.internal.telephony.PhoneSubInfogetPhoneSubInfo()

        return null;
    
public intgetPhoneType()

        return PhoneConstants.PHONE_TYPE_IMS;
    
public android.telephony.ServiceStategetServiceState()

        // FIXME: we may need to provide this when data connectivity is lost
        // or when server is down
        ServiceState s = new ServiceState();
        s.setState(ServiceState.STATE_IN_SERVICE);
        return s;
    
public android.telephony.SignalStrengthgetSignalStrength()

        return new SignalStrength();
    
public PhoneConstants.StategetState()

        return mState;
    
public java.lang.StringgetSubscriberId()

        return null;
    
public java.lang.StringgetVoiceMailAlphaTag()

        return null;
    
public java.lang.StringgetVoiceMailNumber()

        return null;
    
public booleanhandleInCallMmiCommands(java.lang.String dialString)

        return false;
    
public booleanhandlePinMmi(java.lang.String dialString)

        return false;
    
public booleanisDataConnectivityPossible()

        return false;
    
booleanisInCall()

        Call.State foregroundCallState = getForegroundCall().getState();
        Call.State backgroundCallState = getBackgroundCall().getState();
        Call.State ringingCallState = getRingingCall().getState();

       return (foregroundCallState.isAlive() || backgroundCallState.isAlive()
               || ringingCallState.isAlive());
    
public voidmigrateFrom(com.android.internal.telephony.PhoneBase from)

        super.migrateFrom(from);
        migrate(mRingbackRegistrants, ((ImsPhoneBase)from).mRingbackRegistrants);
    
public booleanneedsOtaServiceProvisioning()

        // FIXME: what's this for Volte?
        return false;
    
public voidnotifyCallForwardingIndicator()

        mNotifier.notifyCallForwardingChanged(this);
    
voidnotifyDisconnect(com.android.internal.telephony.Connection cn)

        mDisconnectRegistrants.notifyResult(cn);
    
voidnotifyPhoneStateChanged()
Notify any interested party of a Phone state change {@link com.android.internal.telephony.PhoneConstants.State}

        mNotifier.notifyPhoneState(this);
    
voidnotifyPreciseCallStateChanged()
Notify registrants of a change in the call state. This notifies changes in {@link com.android.internal.telephony.Call.State}. Use this when changes in the precise call state are needed, else use notifyPhoneStateChanged.

        /* we'd love it if this was package-scoped*/
        super.notifyPreciseCallStateChangedP();
    
voidnotifyServiceStateChanged(android.telephony.ServiceState ss)

        super.notifyServiceStateChangedP(ss);
    
voidnotifySuppServiceFailed(SuppService code)

        mSuppServiceFailedRegistrants.notifyResult(code);
    
voidnotifyUnknownConnection()

        mUnknownConnectionRegistrants.notifyResult(this);
    
public voidonTtyModeReceived(int mode)

        AsyncResult result = new AsyncResult(null, Integer.valueOf(mode), null);
        mTtyModeReceivedRegistrants.notifyRegistrants(result);
    
protected voidonUpdateIccAvailability()

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

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

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

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

        mTtyModeReceivedRegistrants.addUnique(h, what, obj);
    
public voidsaveClirSetting(int commandInterfaceCLIRMode)

    
public voidselectNetworkManually(com.android.internal.telephony.OperatorInfo network, android.os.Message response)

    
public voidsendUssdResponse(java.lang.String ussdMessge)

    
public voidsetCallForwardingOption(int commandInterfaceCFAction, int commandInterfaceCFReason, java.lang.String dialingNumber, int timerSeconds, android.os.Message onComplete)

    
public voidsetCallWaiting(boolean enable, android.os.Message onComplete)

        Rlog.e(LOG_TAG, "call waiting not supported");
    
public voidsetCellBroadcastSmsConfig(int[] configValuesArray, android.os.Message response)

        Rlog.e(LOG_TAG, "Error! This functionality is not implemented for Volte.");
    
public voidsetDataEnabled(boolean enable)

    
public voidsetDataRoamingEnabled(boolean enable)

    
public booleansetLine1Number(java.lang.String alphaTag, java.lang.String number, android.os.Message onComplete)

        // FIXME: what to reply for Volte?
        return false;
    
public voidsetNetworkSelectionModeAutomatic(android.os.Message response)

    
public voidsetOutgoingCallerIdDisplay(int commandInterfaceCLIRMode, android.os.Message onComplete)

        // FIXME: what's this for Volte?
        AsyncResult.forMessage(onComplete, null, null);
        onComplete.sendToTarget();
    
public voidsetRadioPower(boolean power)

    
public voidsetVoiceMailNumber(java.lang.String alphaTag, java.lang.String voiceMailNumber, android.os.Message onComplete)

        // FIXME: what to reply for Volte?
        AsyncResult.forMessage(onComplete, null, null);
        onComplete.sendToTarget();
    
protected voidstartOnHoldTone()

        AsyncResult result = new AsyncResult(null, Boolean.TRUE, null);
        mOnHoldRegistrants.notifyRegistrants(result);
    
protected voidstartRingbackTone()

        AsyncResult result = new AsyncResult(null, Boolean.TRUE, null);
        mRingbackRegistrants.notifyRegistrants(result);
    
protected voidstopOnHoldTone()

        AsyncResult result = new AsyncResult(null, Boolean.FALSE, null);
        mOnHoldRegistrants.notifyRegistrants(result);
    
protected voidstopRingbackTone()

        AsyncResult result = new AsyncResult(null, Boolean.FALSE, null);
        mRingbackRegistrants.notifyRegistrants(result);
    
public voidunregisterForOnHoldTone(android.os.Handler h)

        mOnHoldRegistrants.remove(h);
    
public voidunregisterForRingbackTone(android.os.Handler h)

        mRingbackRegistrants.remove(h);
    
public voidunregisterForSuppServiceNotification(android.os.Handler h)

    
public voidunregisterForTtyModeReceived(android.os.Handler h)

        mTtyModeReceivedRegistrants.remove(h);
    
booleanupdateCurrentCarrierInProvider()

        return false;
    
voidupdatePhoneState()

        PhoneConstants.State oldState = mState;

        if (getRingingCall().isRinging()) {
            mState = PhoneConstants.State.RINGING;
        } else if (getForegroundCall().isIdle()
                && getBackgroundCall().isIdle()) {
            mState = PhoneConstants.State.IDLE;
        } else {
            mState = PhoneConstants.State.OFFHOOK;
        }

        if (mState != oldState) {
            Rlog.d(LOG_TAG, " ^^^ new phone state: " + mState);
            notifyPhoneStateChanged();
        }
    
public voidupdateServiceLocation()