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; }
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; }
return 0;
return mInput;
return mTextMsg;
return mBrowserSettings;
return mCallSettings;
return AppInterface.CommandType.fromInt(mCmdDet.typeOfCommand);
return mMenu;
return mSetupEventListSettings;
return mToneSettings;
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; }