FileDocCategorySizeDatePackage
SipPhoneBase.javaAPI DocAndroid 5.1 API14164Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.sip

SipPhoneBase

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

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


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

        Rlog.e(LOG_TAG, "Error! This functionality is not implemented for SIP.");
    
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 voidgetAvailableNetworks(android.os.Message response)

    
public abstract com.android.internal.telephony.CallgetBackgroundCall()

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 SIP.");
    
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, "[SipPhone] getEsn() is a CDMA method");
        return "0";
    
public abstract com.android.internal.telephony.CallgetForegroundCall()

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 SIP?
        return null;
    
public java.lang.StringgetMeid()

        Rlog.e(LOG_TAG, "[SipPhone] 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_SIP;
    
public abstract com.android.internal.telephony.CallgetRingingCall()

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());
    
voidmigrateFrom(com.android.internal.telephony.sip.SipPhoneBase from)

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

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

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

        mDisconnectRegistrants.notifyResult(cn);
    
voidnotifyNewRingingConnection(com.android.internal.telephony.Connection c)

        super.notifyNewRingingConnectionP(c);
    
voidnotifyPhoneStateChanged()
SIP phones do not have a subscription id, so do not notify of specific phone state changes.

        // Do nothing.
    
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);
    
protected voidonUpdateIccAvailability()

    
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 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 SIP.");
    
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 SIP?
        return false;
    
public voidsetNetworkSelectionModeAutomatic(android.os.Message response)

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

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

        // FIXME: what's this for SIP?
        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 SIP?
        AsyncResult.forMessage(onComplete, null, null);
        onComplete.sendToTarget();
    
protected voidstartRingbackTone()

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

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

        mRingbackRegistrants.remove(h);
    
public voidunregisterForSuppServiceNotification(android.os.Handler 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()