FileDocCategorySizeDatePackage
CatCmdMessage.javaAPI DocAndroid 5.1 API7651Thu Mar 12 22:22:54 GMT 2015com.android.internal.telephony.cat

CatCmdMessage

public class CatCmdMessage extends Object implements android.os.Parcelable
Class used to pass CAT messages from telephony to application. Application should call getXXX() to get commands's specific values.

Fields Summary
CommandDetails
mCmdDet
private TextMessage
mTextMsg
private Menu
mMenu
private Input
mInput
private BrowserSettings
mBrowserSettings
private ToneSettings
mToneSettings
private CallSettings
mCallSettings
private SetupEventListSettings
mSetupEventListSettings
public static final Parcelable.Creator
CREATOR
Constructors Summary
CatCmdMessage(CommandParams cmdParams)

    

      
        mCmdDet = cmdParams.mCmdDet;
        switch(getCmdType()) {
        case SET_UP_MENU:
        case SELECT_ITEM:
            mMenu = ((SelectItemParams) cmdParams).mMenu;
            break;
        case DISPLAY_TEXT:
        case SET_UP_IDLE_MODE_TEXT:
        case SEND_DTMF:
        case SEND_SMS:
        case SEND_SS:
        case SEND_USSD:
            mTextMsg = ((DisplayTextParams) cmdParams).mTextMsg;
            break;
        case GET_INPUT:
        case GET_INKEY:
            mInput = ((GetInputParams) cmdParams).mInput;
            break;
        case LAUNCH_BROWSER:
            mTextMsg = ((LaunchBrowserParams) cmdParams).mConfirmMsg;
            mBrowserSettings = new BrowserSettings();
            mBrowserSettings.url = ((LaunchBrowserParams) cmdParams).mUrl;
            mBrowserSettings.mode = ((LaunchBrowserParams) cmdParams).mMode;
            break;
        case PLAY_TONE:
            PlayToneParams params = (PlayToneParams) cmdParams;
            mToneSettings = params.mSettings;
            mTextMsg = params.mTextMsg;
            break;
        case GET_CHANNEL_STATUS:
            mTextMsg = ((CallSetupParams) cmdParams).mConfirmMsg;
            break;
        case SET_UP_CALL:
            mCallSettings = new CallSettings();
            mCallSettings.confirmMsg = ((CallSetupParams) cmdParams).mConfirmMsg;
            mCallSettings.callMsg = ((CallSetupParams) cmdParams).mCallMsg;
            break;
        case OPEN_CHANNEL:
        case CLOSE_CHANNEL:
        case RECEIVE_DATA:
        case SEND_DATA:
            BIPClientParams param = (BIPClientParams) cmdParams;
            mTextMsg = param.mTextMsg;
            break;
        case SET_UP_EVENT_LIST:
            mSetupEventListSettings = new SetupEventListSettings();
            mSetupEventListSettings.eventList = ((SetEventListParams) cmdParams).mEventInfo;
            break;
        case PROVIDE_LOCAL_INFORMATION:
        case REFRESH:
        default:
            break;
        }
    
public CatCmdMessage(android.os.Parcel in)

        mCmdDet = in.readParcelable(null);
        mTextMsg = in.readParcelable(null);
        mMenu = in.readParcelable(null);
        mInput = in.readParcelable(null);
        switch (getCmdType()) {
        case LAUNCH_BROWSER:
            mBrowserSettings = new BrowserSettings();
            mBrowserSettings.url = in.readString();
            mBrowserSettings.mode = LaunchBrowserMode.values()[in.readInt()];
            break;
        case PLAY_TONE:
            mToneSettings = in.readParcelable(null);
            break;
        case SET_UP_CALL:
            mCallSettings = new CallSettings();
            mCallSettings.confirmMsg = in.readParcelable(null);
            mCallSettings.callMsg = in.readParcelable(null);
            break;
        case SET_UP_EVENT_LIST:
            mSetupEventListSettings = new SetupEventListSettings();
            int length = in.readInt();
            mSetupEventListSettings.eventList = new int[length];
            for (int i = 0; i < length; i++) {
                mSetupEventListSettings.eventList[i] = in.readInt();
            }
            break;
        default:
            break;
        }
    
Methods Summary
public intdescribeContents()


    
       
        return 0;
    
public InputgeInput()

        return mInput;
    
public TextMessagegeTextMessage()

        return mTextMsg;
    
public com.android.internal.telephony.cat.CatCmdMessage$BrowserSettingsgetBrowserSettings()

        return mBrowserSettings;
    
public com.android.internal.telephony.cat.CatCmdMessage$CallSettingsgetCallSettings()

        return mCallSettings;
    
public AppInterface.CommandTypegetCmdType()

        return AppInterface.CommandType.fromInt(mCmdDet.typeOfCommand);
    
public MenugetMenu()

        return mMenu;
    
public com.android.internal.telephony.cat.CatCmdMessage$SetupEventListSettingsgetSetEventList()

        return mSetupEventListSettings;
    
public ToneSettingsgetToneSettings()

        return mToneSettings;
    
public voidwriteToParcel(android.os.Parcel dest, int flags)

        dest.writeParcelable(mCmdDet, 0);
        dest.writeParcelable(mTextMsg, 0);
        dest.writeParcelable(mMenu, 0);
        dest.writeParcelable(mInput, 0);
        switch(getCmdType()) {
        case LAUNCH_BROWSER:
            dest.writeString(mBrowserSettings.url);
            dest.writeInt(mBrowserSettings.mode.ordinal());
            break;
        case PLAY_TONE:
            dest.writeParcelable(mToneSettings, 0);
            break;
        case SET_UP_CALL:
            dest.writeParcelable(mCallSettings.confirmMsg, 0);
            dest.writeParcelable(mCallSettings.callMsg, 0);
            break;
        case SET_UP_EVENT_LIST:
            dest.writeIntArray(mSetupEventListSettings.eventList);
            break;
        default:
            break;
        }