summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikayla Ray <mikayla@livioconnect.com>2015-06-09 17:34:00 -0400
committerMikayla Ray <mikayla@livioconnect.com>2015-06-09 17:34:00 -0400
commit0944fce35998802602f204adb2e8986b09b05015 (patch)
treef170adabd2593f19264514352b2a10f9f598387c
parent7452dda2bd9839c885b4f6f162a588a2dc13a510 (diff)
parente272dadfadce8fb0e7f34de22f8a7b23e11d6b37 (diff)
downloadsdl_android-0944fce35998802602f204adb2e8986b09b05015.tar.gz
Merged develop into unit tests branch.
-rw-r--r--CONTRIBUTING.md31
-rw-r--r--README.md18
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/SdlConnection/ISdlConnectionListener.java4
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java61
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlSession.java5
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/protocol/ProtocolMessage.java4
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/protocol/WiProProtocol.java26
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameData.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameType.java4
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/protocol/enums/FunctionID.java287
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/protocol/enums/SessionType.java15
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/RPCRequestFactory.java12
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/RPCResponse.java10
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/RPCStreamController.java32
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java411
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommand.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AirbagStatus.java65
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Alert.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java25
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BeltStatus.java121
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BodyInformation.java17
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java19
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java25
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DIDResult.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFile.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java25
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumber.java51
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java23
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java15
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ECallInfo.java25
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EmergencyEvent.java33
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GPSData.java18
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GenericResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCs.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java10
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java46
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMICapabilities.java49
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java15
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Image.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ImageField.java15
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/KeyboardProperties.java31
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFiles.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/MyKey.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java19
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java19
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnCommand.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java14
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java27
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHashChange.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java15
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java19
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java3
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnStreamRPC.java47
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSystemRequest.java71
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTouchEvent.java19
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java46
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java27
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java19
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFile.java54
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDID.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java3
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java25
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java123
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java10
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocation.java29
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocationResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Show.java10
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Slider.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SliderResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SoftButton.java16
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Speak.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java41
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java10
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java21
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequest.java21
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java6
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TTSChunk.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TextField.java17
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TireStatus.java8
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TouchEvent.java31
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java11
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java10
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java21
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java6
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java2
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java17
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java9
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java7
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/RequestType.java59
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/Result.java44
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java3
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java27
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java6
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/streaming/AbstractPacketizer.java6
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/streaming/StreamPacketizer.java45
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/streaming/StreamRPCPacketizer.java211
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/trace/SdlTrace.java98
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/util/Base64.java111
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/util/ByteEnumer.java18
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/util/Mime.java183
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/util/NativeLogTool.java54
-rw-r--r--sdl_android_lib/src/com/smartdevicelink/util/StringEnumer.java47
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/Test.java4
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/Validator.java21
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/protocol/enums/SessionTypeTests.java8
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/datatypes/TouchEventTest.java6
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java14
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddCommandTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ListFilesTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PutFileTests.java14
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ReadDidTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java18
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SliderTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SpeakTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java2
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/streaming/AbstractPacketizerTests.java3
-rw-r--r--sdl_android_tests/src/com/smartdevicelink/test/streaming/StreamRPCPacketizerTests.java2
259 files changed, 1875 insertions, 2002 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 899abaf49..5949da48d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -1,16 +1,29 @@
-# Contributing to sdl_android
+# Contributing to SDL Projects
-Third party contributions are essential for making this repository great. However, we do have a few guidelines we need contributors to follow.
+Third party contributions are essential for making SDL great. However, we do have a few guidelines we need contributors to follow.
+
+### Issues
+If writing a bug report, please make sure <a href="http://yourbugreportneedsmore.info" target="_blank">it has enough info</a>. Include all relevant information.
+
+If requesting a feature, understand that we appreciate the input! However, it may not immediately fit our roadmap, and it may take a while for us to get to your request.
### Gitflow
-We use Gitflow as our branch management system. Please read up on it [here](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow). The main points you should know are:
+We use <a href="http://nvie.com/posts/a-successful-git-branching-model/">Gitflow</a> as our branch management system. Please follow gitflow's guidelines while contributing to any SDL project.
+### Pull Requests
+* Please follow the repository's for all code and documentation.
* All feature branches should be based on `develop` and have the format `feature/branch_name`.
-* Minor bug fixes should be based on `master` and have the format `hotfix/branch_name`.
-* All commits should involve logical units. Please do not put all changed code in one commit, unless it is a very minor change.
-* Work in progress pull requests should have "[WIP]" in front of the Pull Request title. When you are ready to merge, remove this tag and @mention `smartdevicelink/developers` to get it scheduled for review.
-* If applicable, follow [this Pull Request's format](https://github.com/smartdevicelink/SmartDeviceLink-iOS/pull/45).
-* Please document all code written. Write [JavaDoc style documentation](http://www.oracle.com/technetwork/articles/java/index-137868.html) for methods, and use inline code comments where it makes sense, i.e. for non-obvious code chunks.
+* Minor bug fixes, that is bug fixes that do not change, add, or remove any public API, should be based on `master` and have the format `hotfix/branch_name`.
+* All pull requests should implement a single feature or fix a single bug. Pull Requests that involve multiple changes (it is our discretion what precisely this means) will be rejected with a reason.
+* All commits should separated into logical units, i.e. unrelated changes should be in different commits within a pull request.
+* Work in progress pull requests should have "[WIP]" in front of the Pull Request title. When you believe the pull request is ready to merge, remove this tag and @mention the appropriate SDL team to schedule a review.
+* All new code *must* include unit tests. Bug fixes should have a test that fails previously and now passes. All new features should be covered. If your code does not have tests, or regresses old tests, it will be rejected.
+* A great example of a <a href="https://github.com/smartdevicelink/SmartDeviceLink-iOS/pull/45" "_target>pull request can be found here</a>.
### Contributor's License Agreement (CLA)
-Coming Soon! We unfortunately cannot accept third party contributions until this is ready. \ No newline at end of file
+In order to accept Pull Requests from contributors, you must first sign [the Contributor's License Agreement](https://docs.google.com/forms/d/1VNR8EUd5b46cQ7uNbCq1fJmnu0askNpUp5dudLKRGpU/viewform). If you need to make a change to information that you entered, [please contact us](mailto:justin@livio.io).
+
+### Repository Specific Guidelines
+ * <a href="https://github.com/smartdevicelink/sdl_android/wiki/Style-Guide" target="blank">Android Style Guide</a>
+ * Please document all code written. Write [JavaDoc style documentation](http://www.oracle.com/technetwork/articles/java/index-137868.html) for methods, and use inline code comments where it makes sense, i.e. for non-obvious code chunks.
+
diff --git a/README.md b/README.md
index b9a47c7a5..9849a118e 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,19 @@
-sdl_android
-===========
+##### Note: Please use the [develop](https://github.com/smartdevicelink/sdl_android/tree/develop) branch of sdl_android for the most stable versions.
-SmartDeviceLink Android Proxy
+# SmartDeviceLink (SDL)
+
+SmartDeviceLink (SDL) is a standard set of protocols and messages that connect applications on a smartphone to a vehicle head unit. This messaging enables a consumer to interact with their application using common in-vehicle interfaces such as a touch screen display, embedded voice recognition, steering wheel controls and various vehicle knobs and buttons. There are three main components that make up the SDL ecosystem.
+
+ * The [Core](https://github.com/smartdevicelink/sdl_core) component is the software which Vehicle Manufacturers (OEMs) implement in their vehicle head units. Integrating this component into their head unit and HMI based on a set of guidelines and templates enables access to various smartphone applications.
+ * The optional [SDL Server](https://github.com/smartdevicelink/sdl_server) can be used by Vehicle OEMs to update application policies and gather usage information for connected applications.
+ * The [iOS](https://github.com/smartdevicelink/sdl_ios) and [Android](https://github.com/smartdevicelink/sdl_android) libraries are implemented by app developers into their applications to enable command and control via the connected head unit.
+
+Pull Requests Welcome!
+##Mobile Proxy
+
+The mobile library component of SDL is meant to run on the end user’s smart-device from within SDL enabled apps. The library allows the apps to connect to SDL enabled head-units and hardware through bluetooth, USB, and TCP. Once the library establishes a connection between the smart device and head-unit through the preferred method of transport, the two components are able to communicate using the SDL defined protocol. The app integrating this library project is then able to expose its functionality to the head-unit through text, media, and other interactive elements.
+
+##SmartDeviceLink Android
We're still working on creating documentation for each of these individual repositories, but in the meantime, you can find more information about SmartDeviceLink [here](https://github.com/smartdevicelink/sdl_core/blob/master/README.md) and [here](http://projects.genivi.org/smartdevicelink/about).
diff --git a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/ISdlConnectionListener.java b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/ISdlConnectionListener.java
index 7ccf2d939..8e0170447 100644
--- a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/ISdlConnectionListener.java
+++ b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/ISdlConnectionListener.java
@@ -3,6 +3,7 @@ package com.smartdevicelink.SdlConnection;
import com.smartdevicelink.protocol.ProtocolMessage;
import com.smartdevicelink.protocol.enums.SessionType;
+
public interface ISdlConnectionListener {
public void onTransportDisconnected(String info);
@@ -21,5 +22,6 @@ public interface ISdlConnectionListener {
public void onProtocolError(String info, Exception e);
- public void onHeartbeatTimedOut(byte sessionID);
+ public void onHeartbeatTimedOut(byte sessionID);
+
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java
index ab275b919..c51e46f93 100644
--- a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java
+++ b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlConnection.java
@@ -5,7 +5,8 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
-import java.util.Vector;
+import java.util.concurrent.CopyOnWriteArrayList;
+
import android.util.Log;
import com.smartdevicelink.exception.SdlException;
import com.smartdevicelink.protocol.AbstractProtocol;
@@ -31,8 +32,7 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
Object TRANSPORT_REFERENCE_LOCK = new Object();
Object PROTOCOL_REFERENCE_LOCK = new Object();
- private Object SESSION_LOCK = new Object();
- private Vector<SdlSession> listenerList = new Vector<SdlSession>();
+ private CopyOnWriteArrayList<SdlSession> listenerList = new CopyOnWriteArrayList<SdlSession>();
/**
* Constructor.
@@ -250,12 +250,10 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
}
return null;
}
-
-
-
+
public void startRPCStream(InputStream is, RPCRequest request, SessionType sType, byte rpcSessionID, byte wiproVersion) {
try {
- mPacketizer = new StreamRPCPacketizer(this, is, request, sType, rpcSessionID, wiproVersion);
+ mPacketizer = new StreamRPCPacketizer(null, this, is, request, sType, rpcSessionID, wiproVersion, 0);
mPacketizer.start();
} catch (Exception e) {
Log.e("SdlConnection", "Unable to start streaming:" + e.toString());
@@ -266,7 +264,7 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
try {
OutputStream os = new PipedOutputStream();
InputStream is = new PipedInputStream((PipedOutputStream) os);
- mPacketizer = new StreamRPCPacketizer(this, is, request, sType, rpcSessionID, wiproVersion);
+ mPacketizer = new StreamRPCPacketizer(null, this, is, request, sType, rpcSessionID, wiproVersion, 0);
mPacketizer.start();
return os;
} catch (Exception e) {
@@ -274,8 +272,24 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
}
return null;
}
-
- public void stopStream()
+
+ public void pauseRPCStream()
+ {
+ if (mPacketizer != null)
+ {
+ mPacketizer.pause();
+ }
+ }
+
+ public void resumeRPCStream()
+ {
+ if (mPacketizer != null)
+ {
+ mPacketizer.resume();
+ }
+ }
+
+ public void stopRPCStream()
{
if (mPacketizer != null)
{
@@ -283,7 +297,6 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
}
}
-
@Override
public void sendStreamPacket(ProtocolMessage pm) {
sendMessage(pm);
@@ -305,11 +318,7 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
}
}
void registerSession(SdlSession registerListener) throws SdlException {
- synchronized (SESSION_LOCK) {
- if (!listenerList.contains(registerListener)) {
- listenerList.add(registerListener); //TODO: check if we need to sort the list.
- }
- }
+ listenerList.addIfAbsent(registerListener);
if (!this.getIsConnected()) {
this.startTransport();
@@ -324,12 +333,8 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
}
public void unregisterSession(SdlSession registerListener) {
- synchronized (SESSION_LOCK) {
- listenerList.remove(registerListener);
-
-
+ listenerList.remove(registerListener);
closeConnection(listenerList.size() == 0, registerListener.getSessionId());
- }
}
@@ -353,13 +358,9 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
@Override
public void onTransportError(String info, Exception e) {
- SdlSession mySession = null;
- for (int z=0; z<listenerList.size(); z++) {
-
- mySession = listenerList.get(0);
- if (mySession == null) continue;
- mySession.onTransportError(info, e);
- }
+ for (SdlSession session : listenerList) {
+ session.onTransportError(info, e);
+ }
}
@Override
@@ -411,7 +412,7 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
session.onHeartbeatTimedOut(sessionID);
}
- }
+ }
}
public int getRegisterCount() {
@@ -439,6 +440,4 @@ public class SdlConnection implements IProtocolListener, ITransportListener, ISt
mySession._heartbeatMonitor.notifyTransportActivity();
}
}
-
-
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlSession.java b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlSession.java
index c90ce2318..0e2d4c8fb 100644
--- a/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlSession.java
+++ b/sdl_android_lib/src/com/smartdevicelink/SdlConnection/SdlSession.java
@@ -213,8 +213,5 @@ public class SdlSession implements ISdlConnectionListener, IHeartbeatMonitorList
public void onProtocolSessionNACKed(SessionType sessionType,
byte sessionID, byte version, String correlationID) {
this.sessionListener.onProtocolSessionNACKed(sessionType, sessionID, version, correlationID);
- }
-
-
-
+ }
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/protocol/ProtocolMessage.java b/sdl_android_lib/src/com/smartdevicelink/protocol/ProtocolMessage.java
index b33c89631..c63f560d5 100644
--- a/sdl_android_lib/src/com/smartdevicelink/protocol/ProtocolMessage.java
+++ b/sdl_android_lib/src/com/smartdevicelink/protocol/ProtocolMessage.java
@@ -55,6 +55,10 @@ public class ProtocolMessage {
return _bulkData;
}
+ public void setBulkDataNoCopy(byte[] bulkData) {
+ this._bulkData = bulkData;
+ }
+
public void setBulkData(byte[] bulkData) {
if (this._bulkData != null)
this._bulkData = null;
diff --git a/sdl_android_lib/src/com/smartdevicelink/protocol/WiProProtocol.java b/sdl_android_lib/src/com/smartdevicelink/protocol/WiProProtocol.java
index 2f591fdb2..7a214fb72 100644
--- a/sdl_android_lib/src/com/smartdevicelink/protocol/WiProProtocol.java
+++ b/sdl_android_lib/src/com/smartdevicelink/protocol/WiProProtocol.java
@@ -93,7 +93,7 @@ public class WiProProtocol extends AbstractProtocol {
if (_version > 1 && sessionType != SessionType.NAV) {
if (protocolMsg.getBulkData() != null) {
data = new byte[12 + protocolMsg.getJsonSize() + protocolMsg.getBulkData().length];
- sessionType = SessionType.Bulk_Data;
+ sessionType = SessionType.BULK_DATA;
} else data = new byte[12 + protocolMsg.getJsonSize()];
BinaryFrameHeader binFrameHeader = new BinaryFrameHeader();
binFrameHeader = ProtocolFrameHeaderFactory.createBinaryFrameHeader(protocolMsg.getRPCType(), protocolMsg.getFunctionID(), protocolMsg.getCorrID(), protocolMsg.getJsonSize());
@@ -172,6 +172,15 @@ public class WiProProtocol extends AbstractProtocol {
}
public void HandleReceivedBytes(byte[] receivedBytes, int receivedBytesLength) {
+
+ byte[] remainingBytes = processReceivedBytes(receivedBytes, receivedBytesLength);
+ while (remainingBytes != null)
+ {
+ remainingBytes = processReceivedBytes(remainingBytes, remainingBytes.length);
+ }
+ }
+
+ private byte[] processReceivedBytes(byte[] receivedBytes, int receivedBytesLength) {
int receivedBytesReadPos = 0;
//Check for a version difference
@@ -200,7 +209,7 @@ public class WiProProtocol extends AbstractProtocol {
System.arraycopy(receivedBytes, receivedBytesReadPos,
_headerBuf, _headerBufWritePos, receivedBytesLength);
_headerBufWritePos += receivedBytesLength;
- return;
+ return null;
} else {
// If I got the size, allocate the buffer
System.arraycopy(receivedBytes, receivedBytesReadPos,
@@ -229,7 +238,7 @@ public class WiProProtocol extends AbstractProtocol {
Log.e("HandleReceivedBytes", "headerBytesNeeded: " + headerBytesNeeded);
handleProtocolError("Error handling protocol message from sdl, header invalid.",
new SdlException("Error handling protocol message from sdl, header invalid.", SdlExceptionCause.INVALID_HEADER));
- return;
+ return null;
}
_dataBufWritePos = 0;
}
@@ -254,7 +263,7 @@ public class WiProProtocol extends AbstractProtocol {
handleProtocolError("Error handling protocol message from sdl, header invalid.",
new SdlException("Error handling protocol message from sdl, data buffer is null.", SdlExceptionCause.DATA_BUFFER_NULL));
- return;
+ return null;
}
int bytesLeft = receivedBytesLength - receivedBytesReadPos;
@@ -264,7 +273,7 @@ public class WiProProtocol extends AbstractProtocol {
System.arraycopy(receivedBytes, receivedBytesReadPos, _dataBuf,
_dataBufWritePos, bytesLeft);
_dataBufWritePos += bytesLeft;
- return;
+ return null;
} else {
// Fill the buffer and call the handler!
System.arraycopy(receivedBytes, receivedBytesReadPos, _dataBuf, _dataBufWritePos, bytesNeeded);
@@ -287,9 +296,10 @@ public class WiProProtocol extends AbstractProtocol {
byte[] moreBytes = new byte[moreBytesLeft];
System.arraycopy(receivedBytes, receivedBytesReadPos,
moreBytes, 0, moreBytesLeft);
- HandleReceivedBytes(moreBytes, moreBytesLeft);
+ return moreBytes;
}
}
+ return null;
}
protected MessageFrameAssembler getFrameAssemblerForFrame(ProtocolFrameHeader header) {
@@ -444,7 +454,7 @@ public class WiProProtocol extends AbstractProtocol {
ProtocolMessage message = new ProtocolMessage();
if (header.getSessionType() == SessionType.RPC) {
message.setMessageType(MessageType.RPC);
- } else if (header.getSessionType() == SessionType.Bulk_Data) {
+ } else if (header.getSessionType() == SessionType.BULK_DATA) {
message.setMessageType(MessageType.BULK);
} // end-if
message.setSessionType(header.getSessionType());
@@ -493,7 +503,7 @@ public class WiProProtocol extends AbstractProtocol {
@Override
public void SendHeartBeat(byte sessionID) {
- final ProtocolFrameHeader heartbeat = ProtocolFrameHeaderFactory.createHeartbeat(SessionType.Heartbeat, sessionID, _version);
+ final ProtocolFrameHeader heartbeat = ProtocolFrameHeaderFactory.createHeartbeat(SessionType.CONTROL, sessionID, _version);
sendFrameToTransport(heartbeat);
}
} // end-class \ No newline at end of file
diff --git a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameData.java b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameData.java
index a9c8c45d8..bff606c3b 100644
--- a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameData.java
+++ b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameData.java
@@ -37,6 +37,6 @@ public class FrameData extends ByteEnumer {
}
public static FrameData[] values() {
- return (FrameData[]) theList.toArray();
+ return theList.toArray(new FrameData[theList.size()]);
}
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java
index 49eef1a25..de47188c1 100644
--- a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java
+++ b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameDataControlFrameType.java
@@ -37,9 +37,10 @@ public class FrameDataControlFrameType extends ByteEnumer {
public static FrameDataControlFrameType valueOf(String passedButton) {
return (FrameDataControlFrameType) get(theList, passedButton);
- } // end-method
+ }
public static FrameDataControlFrameType[] values() {
- return (FrameDataControlFrameType[]) theList.toArray();
- } // end-method
-} // end-class \ No newline at end of file
+ return theList.toArray(new FrameDataControlFrameType[theList.size()]);
+ }
+
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameType.java b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameType.java
index 908ee45c2..d724807d0 100644
--- a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameType.java
+++ b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FrameType.java
@@ -32,6 +32,6 @@ public class FrameType extends ByteEnumer {
}
public static FrameType[] values() {
- return (FrameType[]) theList.toArray();
+ return theList.toArray(new FrameType[theList.size()]);
}
-} \ No newline at end of file
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FunctionID.java b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FunctionID.java
index e3e017114..04517d329 100644
--- a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FunctionID.java
+++ b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/FunctionID.java
@@ -1,186 +1,135 @@
package com.smartdevicelink.protocol.enums;
+import java.util.EnumSet;
import java.util.HashMap;
-import java.util.Map;
-
-public class FunctionID {
- private static Map<String, Integer> functionIDMap = null;
- public static final String SYNC_P_DATA = "SyncPData";
- public static final String SHOW_CONSTANT_TBT = "ShowConstantTBT";
- public static final String ALERT_MANEUVER = "AlertManeuver";
- public static final String UPDATE_TURN_LIST = "UpdateTurnList";
- public static final String ON_SYNC_P_DATA = "OnSyncPData";
- public static final String REGISTER_APP_INTERFACE = "RegisterAppInterface";
- public static final String UNREGISTER_APP_INTERFACE = "UnregisterAppInterface";
- public static final String ALERT = "Alert";
- public static final String SHOW = "Show";
- public static final String SPEAK = "Speak";
- public static final String ADD_COMMAND = "AddCommand";
- public static final String DELETE_COMMAND = "DeleteCommand";
- public static final String ADD_SUB_MENU = "AddSubMenu";
- public static final String DELETE_SUB_MENU = "DeleteSubMenu";
- public static final String CREATE_INTERACTION_CHOICE_SET = "CreateInteractionChoiceSet";
- public static final String DELETE_INTERACTION_CHOICE_SET = "DeleteInteractionChoiceSet";
- public static final String PERFORM_INTERACTION = "PerformInteraction";
- public static final String ENCODED_SYNC_P_DATA = "EncodedSyncPData";
- public static final String SUBSCRIBE_BUTTON = "SubscribeButton";
- public static final String UNSUBSCRIBE_BUTTON = "UnsubscribeButton";
- public static final String SUBSCRIBE_VEHICLE_DATA = "SubscribeVehicleData";
- public static final String UNSUBSCRIBE_VEHICLE_DATA = "UnsubscribeVehicleData";
- public static final String SET_MEDIA_CLOCK_TIMER = "SetMediaClockTimer";
- public static final String SET_GLOBAL_PROPERTIES = "SetGlobalProperties";
- public static final String GENERIC_RESPONSE = "GenericResponse";
- public static final String SCROLLABLE_MESSAGE = "ScrollableMessage";
- public static final String GET_DTCS = "GetDTCs";
- public static final String DIAGNOSTIC_MESSAGE = "DiagnosticMessage";
- public static final String SYSTEM_REQUEST = "SystemRequest";
- public static final String READ_DID = "ReadDID";
- public static final String ON_VEHICLE_DATA = "OnVehicleData";
- public static final String PUT_FILE = "PutFile";
- public static final String DELETE_FILE = "DeleteFile";
- public static final String LIST_FILES = "ListFiles";
- public static final String GET_VEHICLE_DATA = "GetVehicleData";
- public static final String RESET_GLOBAL_PROPERTIES = "ResetGlobalProperties";
- public static final String SET_APP_ICON = "SetAppIcon";
- public static final String CHANGE_REGISTRATION = "ChangeRegistration";
- public static final String SET_DISPLAY_LAYOUT = "SetDisplayLayout";
- public static final String ON_LANGUAGE_CHANGE = "OnLanguageChange";
- public static final String PERFORM_AUDIO_PASS_THRU = "PerformAudioPassThru";
- public static final String END_AUDIO_PASS_THRU = "EndAudioPassThru";
- public static final String ON_AUDIO_PASS_THRU = "OnAudioPassThru";
- public static final String ON_COMMAND = "OnCommand";
- public static final String ON_BUTTON_PRESS = "OnButtonPress";
- public static final String ON_BUTTON_EVENT = "OnButtonEvent";
- public static final String ON_HMI_STATUS = "OnHMIStatus";
- public static final String ON_TBT_CLIENT_STATE = "OnTBTClientState";
- public static final String ON_ENCODED_SYNC_P_DATA = "OnEncodedSyncPData";
- public static final String ON_DRIVER_DISTRACTION = "OnDriverDistraction";
- public static final String ON_APP_INTERFACE_UNREGISTERED = "OnAppInterfaceUnregistered";
- public static final String ON_KEYBOARD_INPUT = "OnKeyboardInput";
- public static final String ON_TOUCH_EVENT = "OnTouchEvent";
- public static final String ON_SYSTEM_REQUEST = "OnSystemRequest";
- public static final String ON_HASH_CHANGE = "OnHashChange";
- public static final String ON_PERMISSIONS_CHANGE = "OnPermissionsChange";
- public static final String SLIDER = "Slider";
- public static final String ON_LOCK_SCREEN_STATUS = "OnLockScreenStatus";
- public static final String ON_SDL_CHOICE_CHOSEN = "OnSdlChoiceChosen";
-
- public static final String SEND_LOCATION = "SendLocation";
-
- public FunctionID() {
+import java.util.Iterator;
+import java.util.Map.Entry;
+
+public enum FunctionID{
+ // DEPRECATED FUNCTIONS
+ SYNC_P_DATA(65537, "SyncPData"),
+ ON_SYNC_P_DATA(98305, "OnSyncPData"),
+ ENCODED_SYNC_P_DATA(65536, "EncodedSyncPData"),
+ ON_ENCODED_SYNC_P_DATA(98304, "OnEncodedSyncPData"),
+
+ // REQUESTS & RESPONSES
+ REGISTER_APP_INTERFACE(1, "RegisterAppInterface"),
+ UNREGISTER_APP_INTERFACE(2, "UnregisterAppInterface"),
+ SET_GLOBAL_PROPERTIES(3, "SetGlobalProperties"),
+ RESET_GLOBAL_PROPERTIES(4, "ResetGlobalProperties"),
+ ADD_COMMAND(5, "AddCommand"),
+ DELETE_COMMAND(6, "DeleteCommand"),
+ ADD_SUB_MENU(7, "AddSubMenu"),
+ DELETE_SUB_MENU(8, "DeleteSubMenu"),
+ CREATE_INTERACTION_CHOICE_SET(9, "CreateInteractionChoiceSet"),
+ PERFORM_INTERACTION(10, "PerformInteraction"),
+ DELETE_INTERACTION_CHOICE_SET(11, "DeleteInteractionChoiceSet"),
+ ALERT(12, "Alert"),
+ SHOW(13, "Show"),
+ SPEAK(14, "Speak"),
+ SET_MEDIA_CLOCK_TIMER(15, "SetMediaClockTimer"),
+ PERFORM_AUDIO_PASS_THRU(16, "PerformAudioPassThru"),
+ END_AUDIO_PASS_THRU(17, "EndAudioPassThru"),
+ SUBSCRIBE_BUTTON(18, "SubscribeButton"),
+ UNSUBSCRIBE_BUTTON(19, "UnsubscribeButton"),
+ SUBSCRIBE_VEHICLE_DATA(20, "SubscribeVehicleData"),
+ UNSUBSCRIBE_VEHICLE_DATA(21, "UnsubscribeVehicleData"),
+ GET_VEHICLE_DATA(22, "GetVehicleData"),
+ READ_DID(23, "ReadDID"),
+ GET_DTCS(24, "GetDTCs"),
+ SCROLLABLE_MESSAGE(25, "ScrollableMessage"),
+ SLIDER(26, "Slider"),
+ SHOW_CONSTANT_TBT(27, "ShowConstantTBT"),
+ ALERT_MANEUVER(28, "AlertManeuver"),
+ UPDATE_TURN_LIST(29, "UpdateTurnList"),
+ CHANGE_REGISTRATION(30, "ChangeRegistration"),
+ GENERIC_RESPONSE(31, "GenericResponse"),
+ PUT_FILE(32, "PutFile"),
+ DELETE_FILE(33, "DeleteFile"),
+ LIST_FILES(34, "ListFiles"),
+ SET_APP_ICON(35, "SetAppIcon"),
+ SET_DISPLAY_LAYOUT(36, "SetDisplayLayout"),
+ DIAGNOSTIC_MESSAGE(37, "DiagnosticMessage"),
+ SYSTEM_REQUEST(38, "SystemRequest"),
+ SEND_LOCATION(39, "SendLocation"),
+ DIAL_NUMBER(40, "DialNumber"),
+
+ // NOTIFICATIONS
+ ON_HMI_STATUS(32768, "OnHMIStatus"),
+ ON_APP_INTERFACE_UNREGISTERED(32769, "OnAppInterfaceUnregistered"),
+ ON_BUTTON_EVENT(32770, "OnButtonEvent"),
+ ON_BUTTON_PRESS(32771, "OnButtonPress"),
+ ON_VEHICLE_DATA(32772, "OnVehicleData"),
+ ON_COMMAND(32773, "OnCommand"),
+ ON_TBT_CLIENT_STATE(32774, "OnTBTClientState"),
+ ON_DRIVER_DISTRACTION(32775, "OnDriverDistraction"),
+ ON_PERMISSIONS_CHANGE(32776, "OnPermissionsChange"),
+ ON_AUDIO_PASS_THRU(32777, "OnAudioPassThru"),
+ ON_LANGUAGE_CHANGE(32778, "OnLanguageChange"),
+ ON_KEYBOARD_INPUT(32779, "OnKeyboardInput"),
+ ON_TOUCH_EVENT(32780, "OnTouchEvent"),
+ ON_SYSTEM_REQUEST(32781, "OnSystemRequest"),
+ ON_HASH_CHANGE(32782, "OnHashChange"),
+
+ // MOCKED FUNCTIONS (NOT SENT FROM HEAD-UNIT)
+ ON_LOCK_SCREEN_STATUS(-1, "OnLockScreenStatus"),
+ ON_SDL_CHOICE_CHOSEN(-1, "OnSdlChoiceChosen"),
+ ON_STREAM_RPC(-1, "OnStreamRPC"),
+ STREAM_RPC(-1, "StreamRPC"),
+
+ ;
+
+ public static final int INVALID_ID = -1;
+
+ private static HashMap<String, Integer> functionMap;
+
+ private final int ID;
+ private final String JSON_NAME;
+
+ private FunctionID(int id, String jsonName){
+ this.ID = id;
+ this.JSON_NAME = jsonName;
}
- static public String getFunctionName(int i) {
- if (null == functionIDMap) {
- initFunctionIds();
+ public int getId(){
+ return this.ID;
+ }
+
+ @Override
+ public String toString(){
+ return this.JSON_NAME;
+ }
+
+ private static void initFunctionMap(){
+ functionMap = new HashMap<String, Integer>(values().length);
+
+ for(FunctionID value : EnumSet.allOf(FunctionID.class)){
+ functionMap.put(value.toString(), value.getId());
}
+ }
- for (Map.Entry<String, Integer> entry : functionIDMap.entrySet()) {
- if (i == entry.getValue()) {
- return entry.getKey();
+ public static String getFunctionName(int i){
+ if(functionMap == null){
+ initFunctionMap();
+ }
+
+ Iterator<Entry<String, Integer>> iterator = functionMap.entrySet().iterator();
+ while(iterator.hasNext()){
+ Entry<String, Integer> thisEntry = iterator.next();
+ if(Integer.valueOf(i).equals(thisEntry.getValue())){
+ return thisEntry.getKey();
}
}
return null;
}
- static public int getFunctionID(String functionName) {
- if (null == functionIDMap) {
- initFunctionIds();
+ public static int getFunctionId(String functionName){
+ if(functionMap == null){
+ initFunctionMap();
}
- final Integer functionID = functionIDMap.get(functionName);
- return (functionID != null) ? functionID : -1;
- }
-
- static public void initFunctionIds() {
-
- functionIDMap = new HashMap<String, Integer>(60) {/**
- *
- */
- private static final long serialVersionUID = 6301013743706264910L;
-
- {
- /*
- Base Request / Response RPCs
- Range = 0x 0000 0001 - 0x 0000 7FFF
- */
- put(FunctionID.REGISTER_APP_INTERFACE, 1);
- put(FunctionID.UNREGISTER_APP_INTERFACE, 2);
- put(FunctionID.SET_GLOBAL_PROPERTIES, 3);
- put(FunctionID.RESET_GLOBAL_PROPERTIES, 4);
- put(FunctionID.ADD_COMMAND, 5);
- put(FunctionID.DELETE_COMMAND, 6);
- put(FunctionID.ADD_SUB_MENU, 7);
- put(FunctionID.DELETE_SUB_MENU, 8);
- put(FunctionID.CREATE_INTERACTION_CHOICE_SET, 9);
- put(FunctionID.PERFORM_INTERACTION, 10);
- put(FunctionID.DELETE_INTERACTION_CHOICE_SET, 11);
- put(FunctionID.ALERT, 12);
- put(FunctionID.SHOW, 13);
- put(FunctionID.SPEAK, 14);
- put(FunctionID.SET_MEDIA_CLOCK_TIMER, 15);
- put(FunctionID.PERFORM_AUDIO_PASS_THRU, 16);
- put(FunctionID.END_AUDIO_PASS_THRU, 17);
- put(FunctionID.SUBSCRIBE_BUTTON, 18);
- put(FunctionID.UNSUBSCRIBE_BUTTON, 19);
- put(FunctionID.SUBSCRIBE_VEHICLE_DATA, 20);
- put(FunctionID.UNSUBSCRIBE_VEHICLE_DATA, 21);
- put(FunctionID.GET_VEHICLE_DATA, 22);
- put(FunctionID.READ_DID, 23);
- put(FunctionID.GET_DTCS, 24);
- put(FunctionID.SCROLLABLE_MESSAGE, 25);
- put(FunctionID.SLIDER, 26);
- put(FunctionID.SHOW_CONSTANT_TBT, 27);
- put(FunctionID.ALERT_MANEUVER, 28);
- put(FunctionID.UPDATE_TURN_LIST, 29);
- put(FunctionID.CHANGE_REGISTRATION, 30);
- put(FunctionID.GENERIC_RESPONSE, 31);
- put(FunctionID.PUT_FILE, 32);
- put(FunctionID.DELETE_FILE, 33);
- put(FunctionID.LIST_FILES, 34);
- put(FunctionID.SET_APP_ICON, 35);
- put(FunctionID.SET_DISPLAY_LAYOUT, 36);
- put(FunctionID.DIAGNOSTIC_MESSAGE, 37);
- put(FunctionID.SYSTEM_REQUEST, 38);
- put(FunctionID.SEND_LOCATION, 39);
-
- /*
- Base Notifications
- Range = 0x 0000 8000 - 0x 0000 FFFF
- */
- put(FunctionID.ON_HMI_STATUS, 32768);
- put(FunctionID.ON_APP_INTERFACE_UNREGISTERED, 32769);
- put(FunctionID.ON_BUTTON_EVENT, 32770);
- put(FunctionID.ON_BUTTON_PRESS, 32771);
- put(FunctionID.ON_VEHICLE_DATA, 32772);
- put(FunctionID.ON_COMMAND, 32773);
- put(FunctionID.ON_TBT_CLIENT_STATE, 32774);
- put(FunctionID.ON_DRIVER_DISTRACTION, 32775);
- put(FunctionID.ON_PERMISSIONS_CHANGE, 32776);
- put(FunctionID.ON_AUDIO_PASS_THRU, 32777);
- put(FunctionID.ON_LANGUAGE_CHANGE, 32778);
- put(FunctionID.ON_SYSTEM_REQUEST, 32781);
- put(FunctionID.ON_HASH_CHANGE, 32782);
-
- /*
- Ford Specific Request / Response RPCs
- Range = 0x 0001 0000 - 0x 0001 7FFF
- */
- put(FunctionID.ENCODED_SYNC_P_DATA, 65536);
- put(FunctionID.SYNC_P_DATA, 65537);
-
- /*
- Ford Specific Notifications
- Range = 0x 0001 8000 - 0x 0001 FFFF
- */
- put(FunctionID.ON_ENCODED_SYNC_P_DATA, 98304);
- put(FunctionID.ON_SYNC_P_DATA, 98305);
-
- // OnKeyboardInput
- put(FunctionID.ON_KEYBOARD_INPUT, 32779);
- // OnTouchEvent
- put(FunctionID.ON_TOUCH_EVENT, 32780);
- }};
+ Integer result = functionMap.get(functionName);
+ return ( result == null ) ? INVALID_ID : result;
}
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/SessionType.java b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/SessionType.java
index c0f4a7e13..f6cd888b4 100644
--- a/sdl_android_lib/src/com/smartdevicelink/protocol/enums/SessionType.java
+++ b/sdl_android_lib/src/com/smartdevicelink/protocol/enums/SessionType.java
@@ -12,22 +12,19 @@ public class SessionType extends ByteEnumer {
byte i = 0x00;
- protected SessionType(byte value, String name) {
- super(value, name);
- }
-
- public final static SessionType Heartbeat = new SessionType((byte) 0x00, "Heartbeat_Service");
+ protected SessionType(byte value, String name) {super(value, name);}
+ public final static SessionType CONTROL = new SessionType((byte) 0, "CONTROL");
public final static SessionType RPC = new SessionType((byte)0x07, "RPC");
public final static SessionType PCM = new SessionType((byte)0x0A, "PCM");
public final static SessionType NAV = new SessionType((byte)0x0B, "NAV");
- public final static SessionType Bulk_Data = new SessionType((byte)0xF, "Bulk_Data");
+ public final static SessionType BULK_DATA = new SessionType((byte)0xF, "BULK_DATA");
static {
theList.addElement(RPC);
theList.addElement(PCM);
theList.addElement(NAV);
- theList.addElement(Bulk_Data);
- theList.addElement(Heartbeat);
+ theList.addElement(BULK_DATA);
+ theList.addElement(CONTROL);
}
public static SessionType valueOf(byte passedButton) {
@@ -35,6 +32,6 @@ public class SessionType extends ByteEnumer {
}
public static SessionType[] values() {
- return (SessionType[]) theList.toArray();
+ return theList.toArray(new SessionType[theList.size()]);
}
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/RPCRequestFactory.java b/sdl_android_lib/src/com/smartdevicelink/proxy/RPCRequestFactory.java
index 66f55e298..126305d22 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/RPCRequestFactory.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/RPCRequestFactory.java
@@ -520,6 +520,18 @@ public class RPCRequestFactory {
putFile.setLength(iLength);
return putFile;
}
+
+ public static PutFile buildPutFile(String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Integer iCorrelationID) {
+ PutFile putFile = new PutFile();
+ putFile.setCorrelationID(iCorrelationID);
+ putFile.setSdlFileName(sdlFileName);
+ putFile.setFileType(fileType);
+ putFile.setPersistentFile(bPersistentFile);
+ putFile.setSystemFile(bSystemFile);
+ putFile.setOffset(iOffset);
+ putFile.setLength(iLength);
+ return putFile;
+ }
public static RegisterAppInterface buildRegisterAppInterface(String appName, String appID) {
return buildRegisterAppInterface(appName, false, appID);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/RPCResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/RPCResponse.java
index 25db3b57e..1cde8cdb3 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/RPCResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/RPCResponse.java
@@ -4,8 +4,8 @@
package com.smartdevicelink.proxy;
import java.util.Hashtable;
+
import com.smartdevicelink.proxy.rpc.enums.Result;
-import com.smartdevicelink.util.DebugTool;
/**
* Result sent by SDL after an RPC is processed, consists of four parts:
@@ -130,13 +130,7 @@ public class RPCResponse extends RPCMessage {
if (obj instanceof Result) {
return (Result) obj;
} else if (obj instanceof String) {
- Result theCode = null;
- try {
- theCode = Result.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + RPCResponse.KEY_RESULT_CODE, e);
- }
- return theCode;
+ return Result.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/RPCStreamController.java b/sdl_android_lib/src/com/smartdevicelink/proxy/RPCStreamController.java
new file mode 100644
index 000000000..0e2af0bc6
--- /dev/null
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/RPCStreamController.java
@@ -0,0 +1,32 @@
+package com.smartdevicelink.proxy;
+
+import com.smartdevicelink.streaming.StreamRPCPacketizer;
+
+public class RPCStreamController {
+ private StreamRPCPacketizer rpcPacketizer;
+ private Integer iCorrelationID;
+
+ public RPCStreamController(StreamRPCPacketizer rpcPacketizer, Integer iCorrelationID)
+ {
+ this.rpcPacketizer = rpcPacketizer;
+ this.iCorrelationID = iCorrelationID;
+ }
+
+ public Integer getCorrelationID()
+ {
+ return iCorrelationID;
+ }
+
+ public void pause()
+ {
+ rpcPacketizer.pause();
+ }
+ public void resume()
+ {
+ rpcPacketizer.resume();
+ }
+ public void stop()
+ {
+ rpcPacketizer.onPutFileStreamError(null, "Stop Putfile Stream Requested");
+ }
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java b/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java
index 31df008de..8053d870d 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/SdlProxyBase.java
@@ -7,6 +7,7 @@ import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
@@ -21,6 +22,7 @@ import java.net.URL;
import java.util.Hashtable;
import java.util.List;
import java.util.Vector;
+import java.util.concurrent.CopyOnWriteArrayList;
import android.app.Service;
import android.content.Context;
@@ -54,6 +56,7 @@ import com.smartdevicelink.proxy.callbacks.OnError;
import com.smartdevicelink.proxy.callbacks.OnProxyClosed;
import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
import com.smartdevicelink.proxy.interfaces.IProxyListenerBase;
+import com.smartdevicelink.proxy.interfaces.IPutFileResponseListener;
import com.smartdevicelink.proxy.rpc.*;
import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
@@ -80,6 +83,7 @@ import com.smartdevicelink.proxy.rpc.enums.SystemContext;
import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
+import com.smartdevicelink.streaming.StreamRPCPacketizer;
import com.smartdevicelink.trace.SdlTrace;
import com.smartdevicelink.trace.TraceDeviceInfo;
import com.smartdevicelink.trace.enums.InterfaceActivityDirection;
@@ -193,13 +197,39 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
protected List<Integer> _diagModes = null;
protected Boolean firstTimeFull = true;
protected String _proxyVersionInfo = null;
- protected Boolean _bResumeSuccess = false;
+ protected Boolean _bResumeSuccess = false;
+
+ private CopyOnWriteArrayList<IPutFileResponseListener> _putFileListenerList = new CopyOnWriteArrayList<IPutFileResponseListener>();
protected byte _wiproVersion = 1;
// Interface broker
private SdlInterfaceBroker _interfaceBroker = null;
+ private void notifyPutFileStreamError(Exception e, String info)
+ {
+ for (IPutFileResponseListener _putFileListener : _putFileListenerList) {
+ _putFileListener.onPutFileStreamError(e, info);
+ }
+ }
+
+ private void notifyPutFileStreamResponse(PutFileResponse msg)
+ {
+ for (IPutFileResponseListener _putFileListener : _putFileListenerList) {
+ _putFileListener.onPutFileResponse(msg);
+ }
+ }
+
+ public void addPutFileResponseListener(IPutFileResponseListener _putFileListener)
+ {
+ _putFileListenerList.addIfAbsent(_putFileListener);
+ }
+
+ public void remPutFileResponseListener(IPutFileResponseListener _putFileListener)
+ {
+ _putFileListenerList.remove(_putFileListener);
+ }
+
// Private Class to Interface with SdlConnection
private class SdlInterfaceBroker implements ISdlConnectionListener {
@@ -207,6 +237,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
public void onTransportDisconnected(String info) {
// proxyOnTransportDisconnect is called to alert the proxy that a requested
// disconnect has completed
+ notifyPutFileStreamError(null, info);
if (_advancedLifecycleManagementEnabled) {
// If ALM, nothing is required to be done here
@@ -220,6 +251,8 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
public void onTransportError(String info, Exception e) {
DebugTool.logError("Transport failure: " + info, e);
+ notifyPutFileStreamError(e, info);
+
if (_advancedLifecycleManagementEnabled) {
// Cycle the proxy
cycleProxy(SdlDisconnectedReason.TRANSPORT_ERROR);
@@ -287,6 +320,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
@Override
public void onProtocolError(String info, Exception e) {
+ notifyPutFileStreamError(e, info);
passErrorToProxyListener(info, e);
}
@@ -304,7 +338,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
}
-
+
/**
* Constructor.
*
@@ -902,7 +936,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
sendRPCRequestPrivate(mySystemRequest);
Log.i("sendOnSystemRequestToUrl", "sent to sdl");
- updateBroadcastIntent(sendIntent2, "RPC_NAME", FunctionID.SYSTEM_REQUEST);
+ updateBroadcastIntent(sendIntent2, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
updateBroadcastIntent(sendIntent2, "TYPE", RPCMessage.KEY_REQUEST);
updateBroadcastIntent(sendIntent2, "CORRID", mySystemRequest.getCorrelationID());
}
@@ -1012,6 +1046,8 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
else
_appInterfaceRegisterd = false;
+ _putFileListenerList.clear();
+
_sdlIntefaceAvailablity = SdlInterfaceAvailability.SDL_INTERFACE_UNAVAILABLE;
// Setup SdlConnection
@@ -1259,7 +1295,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
if (functionName != null) {
hashTemp.put(RPCMessage.KEY_FUNCTION_NAME, functionName);
} else {
- DebugTool.logWarning("Dispatch Incoming Message - function name is null unknown RPC. FunctionID: " + message.getFunctionID());
+ DebugTool.logWarning("Dispatch Incoming Message - function name is null unknown RPC. FunctionId: " + message.getFunctionID());
return;
}
if (message.getRPCType() == 0x00) {
@@ -1425,7 +1461,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
pm.setSessionID(sdlSession.getSessionId());
pm.setMessageType(MessageType.RPC);
pm.setSessionType(SessionType.RPC);
- pm.setFunctionID(FunctionID.getFunctionID(request.getFunctionName()));
+ pm.setFunctionID(FunctionID.getFunctionId(request.getFunctionName()));
if (request.getCorrelationID() == null)
{
//Log error here
@@ -1461,14 +1497,14 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
// The app should not receive a response for a request it did not send
if ((new RPCResponse(hash)).getCorrelationID() == REGISTER_APP_INTERFACE_CORRELATION_ID
&& _advancedLifecycleManagementEnabled
- && functionName.equals(FunctionID.REGISTER_APP_INTERFACE)) {
+ && functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
final RegisterAppInterfaceResponse msg = new RegisterAppInterfaceResponse(hash);
if (msg.getSuccess()) {
_appInterfaceRegisterd = true;
}
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.REGISTER_APP_INTERFACE);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.REGISTER_APP_INTERFACE.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
@@ -1551,7 +1587,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
}
} else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
- && functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA)) {
+ && functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
Log.i("pt", "POLICIES_CORRELATION_ID SystemRequest Notification (Legacy)");
@@ -1572,13 +1608,13 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
}
else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
- && functionName.equals(FunctionID.ENCODED_SYNC_P_DATA)) {
+ && functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
Log.i("pt", "POLICIES_CORRELATION_ID SystemRequest Response (Legacy)");
final SystemRequestResponse msg = new SystemRequestResponse(hash);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
@@ -1587,11 +1623,11 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
sendBroadcastIntent(sendIntent);
}
else if ((new RPCResponse(hash)).getCorrelationID() == POLICIES_CORRELATION_ID
- && functionName.equals(FunctionID.SYSTEM_REQUEST)) {
+ && functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
final SystemRequestResponse msg = new SystemRequestResponse(hash);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
@@ -1600,7 +1636,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
updateBroadcastIntent(sendIntent, "DATA", serializeJSON(msg));
sendBroadcastIntent(sendIntent);
}
- else if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE)) {
+ else if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
// UnregisterAppInterface
_appInterfaceRegisterd = false;
synchronized(APP_INTERFACE_REGISTERED_LOCK) {
@@ -1608,7 +1644,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
final UnregisterAppInterfaceResponse msg = new UnregisterAppInterfaceResponse(hash);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
@@ -1620,7 +1656,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
return;
}
- if (functionName.equals(FunctionID.REGISTER_APP_INTERFACE)) {
+ if (functionName.equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
final RegisterAppInterfaceResponse msg = new RegisterAppInterfaceResponse(hash);
if (msg.getSuccess()) {
_appInterfaceRegisterd = true;
@@ -1697,7 +1733,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
}
}
- } else if (functionName.equals(FunctionID.SPEAK)) {
+ } else if (functionName.equals(FunctionID.SPEAK.toString())) {
// SpeakResponse
final SpeakResponse msg = new SpeakResponse(hash);
@@ -1712,7 +1748,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSpeakResponse(msg);
}
- } else if (functionName.equals(FunctionID.ALERT)) {
+ } else if (functionName.equals(FunctionID.ALERT.toString())) {
// AlertResponse
final AlertResponse msg = new AlertResponse(hash);
@@ -1727,7 +1763,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onAlertResponse(msg);
}
- } else if (functionName.equals(FunctionID.SHOW)) {
+ } else if (functionName.equals(FunctionID.SHOW.toString())) {
// ShowResponse
final ShowResponse msg = new ShowResponse(hash);
@@ -1742,7 +1778,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onShowResponse((ShowResponse)msg);
}
- } else if (functionName.equals(FunctionID.ADD_COMMAND)) {
+ } else if (functionName.equals(FunctionID.ADD_COMMAND.toString())) {
// AddCommand
final AddCommandResponse msg = new AddCommandResponse(hash);
@@ -1757,7 +1793,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onAddCommandResponse((AddCommandResponse)msg);
}
- } else if (functionName.equals(FunctionID.DELETE_COMMAND)) {
+ } else if (functionName.equals(FunctionID.DELETE_COMMAND.toString())) {
// DeleteCommandResponse
final DeleteCommandResponse msg = new DeleteCommandResponse(hash);
@@ -1772,7 +1808,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onDeleteCommandResponse((DeleteCommandResponse)msg);
}
- } else if (functionName.equals(FunctionID.ADD_SUB_MENU)) {
+ } else if (functionName.equals(FunctionID.ADD_SUB_MENU.toString())) {
// AddSubMenu
final AddSubMenuResponse msg = new AddSubMenuResponse(hash);
@@ -1787,7 +1823,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onAddSubMenuResponse((AddSubMenuResponse)msg);
}
- } else if (functionName.equals(FunctionID.DELETE_SUB_MENU)) {
+ } else if (functionName.equals(FunctionID.DELETE_SUB_MENU.toString())) {
// DeleteSubMenu
final DeleteSubMenuResponse msg = new DeleteSubMenuResponse(hash);
@@ -1802,7 +1838,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onDeleteSubMenuResponse((DeleteSubMenuResponse)msg);
}
- } else if (functionName.equals(FunctionID.SUBSCRIBE_BUTTON)) {
+ } else if (functionName.equals(FunctionID.SUBSCRIBE_BUTTON.toString())) {
// SubscribeButton
final SubscribeButtonResponse msg = new SubscribeButtonResponse(hash);
@@ -1817,7 +1853,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSubscribeButtonResponse((SubscribeButtonResponse)msg);
}
- } else if (functionName.equals(FunctionID.UNSUBSCRIBE_BUTTON)) {
+ } else if (functionName.equals(FunctionID.UNSUBSCRIBE_BUTTON.toString())) {
// UnsubscribeButton
final UnsubscribeButtonResponse msg = new UnsubscribeButtonResponse(hash);
@@ -1832,7 +1868,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onUnsubscribeButtonResponse((UnsubscribeButtonResponse)msg);
}
- } else if (functionName.equals(FunctionID.SET_MEDIA_CLOCK_TIMER)) {
+ } else if (functionName.equals(FunctionID.SET_MEDIA_CLOCK_TIMER.toString())) {
// SetMediaClockTimer
final SetMediaClockTimerResponse msg = new SetMediaClockTimerResponse(hash);
@@ -1847,12 +1883,12 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSetMediaClockTimerResponse((SetMediaClockTimerResponse)msg);
}
- } else if (functionName.equals(FunctionID.ENCODED_SYNC_P_DATA)) {
+ } else if (functionName.equals(FunctionID.ENCODED_SYNC_P_DATA.toString())) {
final SystemRequestResponse msg = new SystemRequestResponse(hash);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.SYSTEM_REQUEST.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
@@ -1871,7 +1907,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSystemRequestResponse(msg);
}
- } else if (functionName.equals(FunctionID.CREATE_INTERACTION_CHOICE_SET)) {
+ } else if (functionName.equals(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString())) {
// CreateInteractionChoiceSet
final CreateInteractionChoiceSetResponse msg = new CreateInteractionChoiceSetResponse(hash);
@@ -1886,7 +1922,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onCreateInteractionChoiceSetResponse((CreateInteractionChoiceSetResponse)msg);
}
- } else if (functionName.equals(FunctionID.DELETE_INTERACTION_CHOICE_SET)) {
+ } else if (functionName.equals(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString())) {
// DeleteInteractionChoiceSet
final DeleteInteractionChoiceSetResponse msg = new DeleteInteractionChoiceSetResponse(hash);
@@ -1901,7 +1937,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onDeleteInteractionChoiceSetResponse((DeleteInteractionChoiceSetResponse)msg);
}
- } else if (functionName.equals(FunctionID.PERFORM_INTERACTION)) {
+ } else if (functionName.equals(FunctionID.PERFORM_INTERACTION.toString())) {
// PerformInteraction
final PerformInteractionResponse msg = new PerformInteractionResponse(hash);
@@ -1916,7 +1952,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onPerformInteractionResponse((PerformInteractionResponse)msg);
}
- } else if (functionName.equals(FunctionID.SET_GLOBAL_PROPERTIES)) {
+ } else if (functionName.equals(FunctionID.SET_GLOBAL_PROPERTIES.toString())) {
// SetGlobalPropertiesResponse
final SetGlobalPropertiesResponse msg = new SetGlobalPropertiesResponse(hash);
@@ -1931,7 +1967,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSetGlobalPropertiesResponse((SetGlobalPropertiesResponse)msg);
}
- } else if (functionName.equals(FunctionID.RESET_GLOBAL_PROPERTIES)) {
+ } else if (functionName.equals(FunctionID.RESET_GLOBAL_PROPERTIES.toString())) {
// ResetGlobalProperties
final ResetGlobalPropertiesResponse msg = new ResetGlobalPropertiesResponse(hash);
@@ -1946,7 +1982,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onResetGlobalPropertiesResponse((ResetGlobalPropertiesResponse)msg);
}
- } else if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE)) {
+ } else if (functionName.equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
// UnregisterAppInterface
_appInterfaceRegisterd = false;
@@ -1957,7 +1993,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
final UnregisterAppInterfaceResponse msg = new UnregisterAppInterfaceResponse(hash);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_RESPONSE);
updateBroadcastIntent(sendIntent, "SUCCESS", msg.getSuccess());
updateBroadcastIntent(sendIntent, "COMMENT1", msg.getInfo());
@@ -1987,7 +2023,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
notifyProxyClosed("UnregisterAppInterfaceResponse", null, SdlDisconnectedReason.APP_INTERFACE_UNREG);
- } else if (functionName.equals(FunctionID.GENERIC_RESPONSE)) {
+ } else if (functionName.equals(FunctionID.GENERIC_RESPONSE.toString())) {
// GenericResponse (Usually and error)
final GenericResponse msg = new GenericResponse(hash);
if (_callbackToUIThread) {
@@ -2001,7 +2037,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onGenericResponse((GenericResponse)msg);
}
- } else if (functionName.equals(FunctionID.SLIDER)) {
+ } else if (functionName.equals(FunctionID.SLIDER.toString())) {
// Slider
final SliderResponse msg = new SliderResponse(hash);
if (_callbackToUIThread) {
@@ -2015,7 +2051,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSliderResponse((SliderResponse)msg);
}
- } else if (functionName.equals(FunctionID.PUT_FILE)) {
+ } else if (functionName.equals(FunctionID.PUT_FILE.toString())) {
// PutFile
final PutFileResponse msg = new PutFileResponse(hash);
if (_callbackToUIThread) {
@@ -2024,12 +2060,14 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
@Override
public void run() {
_proxyListener.onPutFileResponse((PutFileResponse)msg);
+ notifyPutFileStreamResponse(msg);
}
});
} else {
_proxyListener.onPutFileResponse((PutFileResponse)msg);
+ notifyPutFileStreamResponse(msg);
}
- } else if (functionName.equals(FunctionID.DELETE_FILE)) {
+ } else if (functionName.equals(FunctionID.DELETE_FILE.toString())) {
// DeleteFile
final DeleteFileResponse msg = new DeleteFileResponse(hash);
if (_callbackToUIThread) {
@@ -2043,7 +2081,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onDeleteFileResponse((DeleteFileResponse)msg);
}
- } else if (functionName.equals(FunctionID.LIST_FILES)) {
+ } else if (functionName.equals(FunctionID.LIST_FILES.toString())) {
// ListFiles
final ListFilesResponse msg = new ListFilesResponse(hash);
if (_callbackToUIThread) {
@@ -2057,7 +2095,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onListFilesResponse((ListFilesResponse)msg);
}
- } else if (functionName.equals(FunctionID.SET_APP_ICON)) {
+ } else if (functionName.equals(FunctionID.SET_APP_ICON.toString())) {
// SetAppIcon
final SetAppIconResponse msg = new SetAppIconResponse(hash);
if (_callbackToUIThread) {
@@ -2071,7 +2109,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSetAppIconResponse((SetAppIconResponse)msg);
}
- } else if (functionName.equals(FunctionID.SCROLLABLE_MESSAGE)) {
+ } else if (functionName.equals(FunctionID.SCROLLABLE_MESSAGE.toString())) {
// ScrollableMessage
final ScrollableMessageResponse msg = new ScrollableMessageResponse(hash);
if (_callbackToUIThread) {
@@ -2085,7 +2123,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onScrollableMessageResponse((ScrollableMessageResponse)msg);
}
- } else if (functionName.equals(FunctionID.CHANGE_REGISTRATION)) {
+ } else if (functionName.equals(FunctionID.CHANGE_REGISTRATION.toString())) {
// ChangeLanguageRegistration
final ChangeRegistrationResponse msg = new ChangeRegistrationResponse(hash);
if (_callbackToUIThread) {
@@ -2099,7 +2137,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onChangeRegistrationResponse((ChangeRegistrationResponse)msg);
}
- } else if (functionName.equals(FunctionID.SET_DISPLAY_LAYOUT)) {
+ } else if (functionName.equals(FunctionID.SET_DISPLAY_LAYOUT.toString())) {
// SetDisplayLayout
final SetDisplayLayoutResponse msg = new SetDisplayLayoutResponse(hash);
@@ -2122,7 +2160,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSetDisplayLayoutResponse((SetDisplayLayoutResponse)msg);
}
- } else if (functionName.equals(FunctionID.PERFORM_AUDIO_PASS_THRU)) {
+ } else if (functionName.equals(FunctionID.PERFORM_AUDIO_PASS_THRU.toString())) {
// PerformAudioPassThru
final PerformAudioPassThruResponse msg = new PerformAudioPassThruResponse(hash);
if (_callbackToUIThread) {
@@ -2136,7 +2174,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onPerformAudioPassThruResponse((PerformAudioPassThruResponse)msg);
}
- } else if (functionName.equals(FunctionID.END_AUDIO_PASS_THRU)) {
+ } else if (functionName.equals(FunctionID.END_AUDIO_PASS_THRU.toString())) {
// EndAudioPassThru
final EndAudioPassThruResponse msg = new EndAudioPassThruResponse(hash);
if (_callbackToUIThread) {
@@ -2150,7 +2188,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onEndAudioPassThruResponse((EndAudioPassThruResponse)msg);
}
- } else if (functionName.equals(FunctionID.SUBSCRIBE_VEHICLE_DATA)) {
+ } else if (functionName.equals(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString())) {
// SubscribeVehicleData
final SubscribeVehicleDataResponse msg = new SubscribeVehicleDataResponse(hash);
if (_callbackToUIThread) {
@@ -2164,7 +2202,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onSubscribeVehicleDataResponse((SubscribeVehicleDataResponse)msg);
}
- } else if (functionName.equals(FunctionID.UNSUBSCRIBE_VEHICLE_DATA)) {
+ } else if (functionName.equals(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString())) {
// UnsubscribeVehicleData
final UnsubscribeVehicleDataResponse msg = new UnsubscribeVehicleDataResponse(hash);
if (_callbackToUIThread) {
@@ -2178,7 +2216,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onUnsubscribeVehicleDataResponse((UnsubscribeVehicleDataResponse)msg);
}
- } else if (functionName.equals(FunctionID.GET_VEHICLE_DATA)) {
+ } else if (functionName.equals(FunctionID.GET_VEHICLE_DATA.toString())) {
// GetVehicleData
final GetVehicleDataResponse msg = new GetVehicleDataResponse(hash);
if (_callbackToUIThread) {
@@ -2192,7 +2230,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onGetVehicleDataResponse((GetVehicleDataResponse)msg);
}
- } else if (functionName.equals(FunctionID.READ_DID)) {
+ } else if (functionName.equals(FunctionID.READ_DID.toString())) {
final ReadDIDResponse msg = new ReadDIDResponse(hash);
if (_callbackToUIThread) {
// Run in UI thread
@@ -2205,7 +2243,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onReadDIDResponse((ReadDIDResponse)msg);
}
- } else if (functionName.equals(FunctionID.GET_DTCS)) {
+ } else if (functionName.equals(FunctionID.GET_DTCS.toString())) {
final GetDTCsResponse msg = new GetDTCsResponse(hash);
if (_callbackToUIThread) {
// Run in UI thread
@@ -2218,7 +2256,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onGetDTCsResponse((GetDTCsResponse)msg);
}
- } else if (functionName.equals(FunctionID.DIAGNOSTIC_MESSAGE)) {
+ } else if (functionName.equals(FunctionID.DIAGNOSTIC_MESSAGE.toString())) {
final DiagnosticMessageResponse msg = new DiagnosticMessageResponse(hash);
if (_callbackToUIThread) {
// Run in UI thread
@@ -2232,7 +2270,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
_proxyListener.onDiagnosticMessageResponse((DiagnosticMessageResponse)msg);
}
}
- else if (functionName.equals(FunctionID.SYSTEM_REQUEST)) {
+ else if (functionName.equals(FunctionID.SYSTEM_REQUEST.toString())) {
final SystemRequestResponse msg = new SystemRequestResponse(hash);
if (_callbackToUIThread) {
@@ -2247,6 +2285,36 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
_proxyListener.onSystemRequestResponse((SystemRequestResponse)msg);
}
}
+ else if (functionName.equals(FunctionID.SEND_LOCATION.toString())) {
+
+ final SendLocationResponse msg = new SendLocationResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onSendLocationResponse(msg);
+ }
+ });
+ } else {
+ _proxyListener.onSendLocationResponse(msg);
+ }
+ }
+ else if (functionName.equals(FunctionID.DIAL_NUMBER.toString())) {
+
+ final DialNumberResponse msg = new DialNumberResponse(hash);
+ if (_callbackToUIThread) {
+ // Run in UI thread
+ _mainUIHandler.post(new Runnable() {
+ @Override
+ public void run() {
+ _proxyListener.onDialNumberResponse(msg);
+ }
+ });
+ } else {
+ _proxyListener.onDialNumberResponse(msg);
+ }
+ }
else {
if (_sdlMsgVersion != null) {
DebugTool.logError("Unrecognized response Message: " + functionName.toString() +
@@ -2257,7 +2325,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} // end-if
} else if (messageType.equals(RPCMessage.KEY_NOTIFICATION)) {
SdlTrace.logRPCEvent(InterfaceActivityDirection.Receive, new RPCNotification(rpcMsg), SDL_LIB_TRACE_KEY);
- if (functionName.equals(FunctionID.ON_HMI_STATUS)) {
+ if (functionName.equals(FunctionID.ON_HMI_STATUS.toString())) {
// OnHMIStatus
final OnHMIStatus msg = new OnHMIStatus(hash);
@@ -2286,7 +2354,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
_proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
}
}
- } else if (functionName.equals(FunctionID.ON_COMMAND)) {
+ } else if (functionName.equals(FunctionID.ON_COMMAND.toString())) {
// OnCommand
final OnCommand msg = new OnCommand(hash);
@@ -2301,7 +2369,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnCommand((OnCommand)msg);
}
- } else if (functionName.equals(FunctionID.ON_DRIVER_DISTRACTION)) {
+ } else if (functionName.equals(FunctionID.ON_DRIVER_DISTRACTION.toString())) {
// OnDriverDistration
final OnDriverDistraction msg = new OnDriverDistraction(hash);
@@ -2331,12 +2399,12 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
_proxyListener.onOnDriverDistraction(msg);
_proxyListener.onOnLockScreenNotification(sdlSession.getLockScreenMan().getLockObj());
}
- } else if (functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA)) {
+ } else if (functionName.equals(FunctionID.ON_ENCODED_SYNC_P_DATA.toString())) {
final OnSystemRequest msg = new OnSystemRequest(hash);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.ON_SYSTEM_REQUEST);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.ON_SYSTEM_REQUEST.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_NOTIFICATION);
// If url is null, then send notification to the app, otherwise, send to URL
@@ -2372,7 +2440,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
handleOffboardTransmissionThread.start();
}
}
- } else if (functionName.equals(FunctionID.ON_PERMISSIONS_CHANGE)) {
+ } else if (functionName.equals(FunctionID.ON_PERMISSIONS_CHANGE.toString())) {
//OnPermissionsChange
final OnPermissionsChange msg = new OnPermissionsChange(hash);
@@ -2387,7 +2455,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnPermissionsChange(msg);
}
- } else if (functionName.equals(FunctionID.ON_TBT_CLIENT_STATE)) {
+ } else if (functionName.equals(FunctionID.ON_TBT_CLIENT_STATE.toString())) {
// OnTBTClientState
final OnTBTClientState msg = new OnTBTClientState(hash);
@@ -2402,7 +2470,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnTBTClientState(msg);
}
- } else if (functionName.equals(FunctionID.ON_BUTTON_PRESS)) {
+ } else if (functionName.equals(FunctionID.ON_BUTTON_PRESS.toString())) {
// OnButtonPress
final OnButtonPress msg = new OnButtonPress(hash);
@@ -2417,7 +2485,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnButtonPress((OnButtonPress)msg);
}
- } else if (functionName.equals(FunctionID.ON_BUTTON_EVENT)) {
+ } else if (functionName.equals(FunctionID.ON_BUTTON_EVENT.toString())) {
// OnButtonEvent
final OnButtonEvent msg = new OnButtonEvent(hash);
@@ -2432,7 +2500,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnButtonEvent((OnButtonEvent)msg);
}
- } else if (functionName.equals(FunctionID.ON_LANGUAGE_CHANGE)) {
+ } else if (functionName.equals(FunctionID.ON_LANGUAGE_CHANGE.toString())) {
// OnLanguageChange
final OnLanguageChange msg = new OnLanguageChange(hash);
@@ -2447,7 +2515,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnLanguageChange((OnLanguageChange)msg);
}
- } else if (functionName.equals(FunctionID.ON_HASH_CHANGE)) {
+ } else if (functionName.equals(FunctionID.ON_HASH_CHANGE.toString())) {
// OnLanguageChange
final OnHashChange msg = new OnHashChange(hash);
@@ -2470,7 +2538,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
_lastHashID = msg.getHashID();
}
}
- } else if (functionName.equals(FunctionID.ON_SYSTEM_REQUEST)) {
+ } else if (functionName.equals(FunctionID.ON_SYSTEM_REQUEST.toString())) {
// OnSystemRequest
final OnSystemRequest msg = new OnSystemRequest(hash);
@@ -2501,7 +2569,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnSystemRequest((OnSystemRequest)msg);
}
- } else if (functionName.equals(FunctionID.ON_AUDIO_PASS_THRU)) {
+ } else if (functionName.equals(FunctionID.ON_AUDIO_PASS_THRU.toString())) {
// OnAudioPassThru
final OnAudioPassThru msg = new OnAudioPassThru(hash);
if (_callbackToUIThread) {
@@ -2515,7 +2583,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} else {
_proxyListener.onOnAudioPassThru((OnAudioPassThru)msg);
}
- } else if (functionName.equals(FunctionID.ON_VEHICLE_DATA)) {
+ } else if (functionName.equals(FunctionID.ON_VEHICLE_DATA.toString())) {
// OnVehicleData
final OnVehicleData msg = new OnVehicleData(hash);
if (_callbackToUIThread) {
@@ -2530,7 +2598,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
_proxyListener.onOnVehicleData((OnVehicleData)msg);
}
}
- else if (functionName.equals(FunctionID.ON_APP_INTERFACE_UNREGISTERED)) {
+ else if (functionName.equals(FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString())) {
// OnAppInterfaceUnregistered
_appInterfaceRegisterd = false;
@@ -2541,7 +2609,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
final OnAppInterfaceUnregistered msg = new OnAppInterfaceUnregistered(hash);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.ON_APP_INTERFACE_UNREGISTERED);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_NOTIFICATION);
updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
sendBroadcastIntent(sendIntent);
@@ -2564,7 +2632,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
notifyProxyClosed("OnAppInterfaceUnregistered", null, SdlDisconnectedReason.APP_INTERFACE_UNREG);
}
}
- else if (functionName.equals(FunctionID.ON_KEYBOARD_INPUT)) {
+ else if (functionName.equals(FunctionID.ON_KEYBOARD_INPUT.toString())) {
final OnKeyboardInput msg = new OnKeyboardInput(hash);
if (_callbackToUIThread) {
// Run in UI thread
@@ -2578,7 +2646,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
_proxyListener.onOnKeyboardInput((OnKeyboardInput)msg);
}
}
- else if (functionName.equals(FunctionID.ON_TOUCH_EVENT)) {
+ else if (functionName.equals(FunctionID.ON_TOUCH_EVENT.toString())) {
final OnTouchEvent msg = new OnTouchEvent(hash);
if (_callbackToUIThread) {
// Run in UI thread
@@ -2641,15 +2709,15 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
// Throw exception if RPCRequest is sent when SDL is unavailable
- if (!_appInterfaceRegisterd && !request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE)) {
+ if (!_appInterfaceRegisterd && !request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString())) {
SdlTrace.logProxyEvent("Application attempted to send an RPCRequest (non-registerAppInterface), before the interface was registerd.", SDL_LIB_TRACE_KEY);
throw new SdlException("SDL is currently unavailable. RPC Requests cannot be sent.", SdlExceptionCause.SDL_UNAVAILABLE);
}
if (_advancedLifecycleManagementEnabled) {
- if (request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE)
- || request.getFunctionName().equals(FunctionID.UNREGISTER_APP_INTERFACE)) {
+ if (request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString())
+ || request.getFunctionName().equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
SdlTrace.logProxyEvent("Application attempted to send a RegisterAppInterface or UnregisterAppInterface while using ALM.", SDL_LIB_TRACE_KEY);
throw new SdlException("The RPCRequest, " + request.getFunctionName() +
@@ -2718,6 +2786,115 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
}
}
+
+ private FileInputStream getFileInputStream(String sLocalFile)
+ {
+ FileInputStream is = null;
+ try
+ {
+ is = new FileInputStream(sLocalFile);
+ }
+ catch (IOException e1)
+ {
+ e1.printStackTrace();
+ }
+ return is;
+ }
+
+ private Long getFileInputStreamSize(FileInputStream is)
+ {
+ Long lSize = null;
+
+ try
+ {
+ lSize = is.getChannel().size();
+ }
+ catch (IOException e)
+ {
+ e.printStackTrace();
+ }
+ return lSize;
+ }
+
+ private void closeFileInputStream(FileInputStream is)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private RPCStreamController startRPCStream(String sLocalFile, PutFile request, SessionType sType, byte rpcSessionID, byte wiproVersion)
+ {
+ if (sdlSession == null) return null;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return null;
+
+ FileInputStream is = getFileInputStream(sLocalFile);
+ if (is == null) return null;
+
+ Integer iSize = Integer.valueOf(getFileInputStreamSize(is).intValue());
+ if (iSize == null)
+ {
+ closeFileInputStream(is);
+ return null;
+ }
+
+ try {
+ StreamRPCPacketizer rpcPacketizer = new StreamRPCPacketizer((SdlProxyBase<IProxyListenerBase>) this, sdlConn, is, request, sType, rpcSessionID, wiproVersion, iSize);
+ rpcPacketizer.start();
+ RPCStreamController streamController = new RPCStreamController(rpcPacketizer, request.getCorrelationID());
+ return streamController;
+ } catch (Exception e) {
+ Log.e("SyncConnection", "Unable to start streaming:" + e.toString());
+ return null;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private RPCStreamController startRPCStream(InputStream is, PutFile request, SessionType sType, byte rpcSessionID, byte wiproVersion)
+ {
+ if (sdlSession == null) return null;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return null;
+ Long iSize = request.getLength();
+
+ if (request.getLength() == null)
+ {
+ return null;
+ }
+
+ try {
+ StreamRPCPacketizer rpcPacketizer = new StreamRPCPacketizer((SdlProxyBase<IProxyListenerBase>) this, sdlConn, is, request, sType, rpcSessionID, wiproVersion, iSize);
+ rpcPacketizer.start();
+ RPCStreamController streamController = new RPCStreamController(rpcPacketizer, request.getCorrelationID());
+ return streamController;
+ } catch (Exception e) {
+ Log.e("SyncConnection", "Unable to start streaming:" + e.toString());
+ return null;
+ }
+ }
+
+ private RPCStreamController startPutFileStream(String sPath, PutFile msg) {
+ if (sdlSession == null) return null;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return null;
+ return startRPCStream(sPath, msg, SessionType.RPC, sdlSession.getSessionId(), _wiproVersion);
+ }
+
+ private RPCStreamController startPutFileStream(InputStream is, PutFile msg) {
+ if (sdlSession == null) return null;
+ SdlConnection sdlConn = sdlSession.getSdlConnection();
+ if (sdlConn == null) return null;
+ if (is == null) return null;
+ startRPCStream(is, msg, SessionType.RPC, sdlSession.getSessionId(), _wiproVersion);
+ return null;
+ }
public boolean startRPCStream(InputStream is, RPCRequest msg) {
if (sdlSession == null) return false;
@@ -2737,11 +2914,10 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
public void endRPCStream() {
if (sdlSession == null) return;
SdlConnection sdlConn = sdlSession.getSdlConnection();
- if (sdlConn == null) return;
- sdlConn.stopStream();
+ if (sdlConn == null) return;
+ sdlConn.stopRPCStream();
}
-
public boolean startH264(InputStream is) {
if (sdlSession == null) return false;
@@ -2789,7 +2965,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
if (sdlConn == null) return;
sdlConn.endService(SessionType.NAV, sdlSession.getSessionId());
}
-
+
public boolean startPCM(InputStream is) {
if (sdlSession == null) return false;
SdlConnection sdlConn = sdlSession.getSdlConnection();
@@ -3603,7 +3779,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.REGISTER_APP_INTERFACE);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.REGISTER_APP_INTERFACE.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_REQUEST);
updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
@@ -3918,7 +4094,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
RPCRequestFactory.buildUnregisterAppInterface(correlationID);
Intent sendIntent = createBroadcastIntent();
- updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE);
+ updateBroadcastIntent(sendIntent, "RPC_NAME", FunctionID.UNREGISTER_APP_INTERFACE.toString());
updateBroadcastIntent(sendIntent, "TYPE", RPCMessage.KEY_REQUEST);
updateBroadcastIntent(sendIntent, "CORRID", msg.getCorrelationID());
updateBroadcastIntent(sendIntent, "DATA",serializeJSON(msg));
@@ -4151,14 +4327,14 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* Used to push a binary stream of file data onto the module from a mobile device.
* Responses are captured through callback on IProxyListener.
*
- * @param is - The input stream of byte data that PutFileStream will read from
+ * @param is - The input stream of byte data that putFileStream will read from
* @param sdlFileName - The file reference name used by the putFile RPC.
* @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of the file.
* A value greater than zero is used for resuming partial data chunks.
* @param iLength - The total length of the file being sent.
* @throws SdlException
*/
- public void PutFileStream(InputStream is, String sdlFileName, Integer iOffset, Integer iLength) throws SdlException
+ public void putFileStream(InputStream is, String sdlFileName, Integer iOffset, Integer iLength) throws SdlException
{
PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength);
startRPCStream(is, msg);
@@ -4175,8 +4351,8 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
*
* @return OutputStream - The output stream of byte data that is written to by the app developer
* @throws SdlException
- */
- public OutputStream PutFileStream(String sdlFileName, Integer iOffset, Integer iLength) throws SdlException
+ */
+ public OutputStream putFileStream(String sdlFileName, Integer iOffset, Integer iLength) throws SdlException
{
PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength);
return startRPCStream(msg);
@@ -4187,18 +4363,18 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* Responses are captured through callback on IProxyListener.
*
* @param is - The input stream of byte data that PutFileStream will read from
- * @param syncFileName - The file reference name used by the putFile RPC.
+ * @param sdlFileName - The file reference name used by the putFile RPC.
* @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of the file.
* A value greater than zero is used for resuming partial data chunks.
* @param iLength - The total length of the file being sent.
* @param fileType - The selected file type -- see the FileType enumeration for details
* @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
* @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
- * @throws SyncException
- */
- public void PutFileStream(InputStream is, String syncFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException
+ * @throws SdlException
+ */
+ public void putFileStream(InputStream is, String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException
{
- PutFile msg = RPCRequestFactory.buildPutFile(syncFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile);
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile);
startRPCStream(is, msg);
}
@@ -4206,7 +4382,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* Used to push a binary stream of file data onto the module from a mobile device.
* Responses are captured through callback on IProxyListener.
*
- * @param syncFileName - The file reference name used by the putFile RPC.
+ * @param sdlFileName - The file reference name used by the putFile RPC.
* @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
* A value greater than zero is used for resuming partial data chunks.
* @param iLength - The total length of the file being sent.
@@ -4214,17 +4390,59 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
* @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
* @return OutputStream - The output stream of byte data that is written to by the app developer
- * @throws SyncException
- */
- public OutputStream PutFileStream(String syncFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException
+ * @throws SdlException
+ */
+ public OutputStream putFileStream(String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile) throws SdlException
{
- PutFile msg = RPCRequestFactory.buildPutFile(syncFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile);
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile);
return startRPCStream(msg);
}
+
+ /**
+ * Used to push a stream of putfile RPC's containing binary data from a mobile device to the module.
+ * Responses are captured through callback on IProxyListener.
+ *
+ * @param sPath - The physical file path on the mobile device.
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param fileType - The selected file type -- see the FileType enumeration for details
+ * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
+ * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
+ * @param correlationID - A unique ID that correlates each RPCRequest and RPCResponse.
+ * @return RPCStreamController - If the putFileStream was not started successfully null is returned, otherwise a valid object reference is returned
+ * @throws SdlException
+ */
+ public RPCStreamController putFileStream(String sPath, String sdlFileName, Integer iOffset, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Integer iCorrelationID) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, 0, fileType, bPersistentFile, bSystemFile, iCorrelationID);
+ return startPutFileStream(sPath, msg);
+ }
/**
+ * Used to push a stream of putfile RPC's containing binary data from a mobile device to the module.
+ * Responses are captured through callback on IProxyListener.
*
- * Used to end an existing PutFileStream that was previously initiated with any PutFileStream method.
+ * @param is - The input stream of byte data that putFileStream will read from.
+ * @param sdlFileName - The file reference name used by the putFile RPC.
+ * @param iOffset - The data offset in bytes, a value of zero is used to indicate data starting from the beginging of a file.
+ * A value greater than zero is used for resuming partial data chunks.
+ * @param fileType - The selected file type -- see the FileType enumeration for details
+ * @param bPersistentFile - Indicates if the file is meant to persist between sessions / ignition cycles.
+ * @param bSystemFile - Indicates if the file is meant to be passed thru core to elsewhere on the system.
+ * @param correlationID - A unique ID that correlates each RPCRequest and RPCResponse.
+ * @return RPCStreamController - If the putFileStream was not started successfully null is returned, otherwise a valid object reference is returned
+ * @throws SdlException
+ */
+ public RPCStreamController putFileStream(InputStream is, String sdlFileName, Integer iOffset, Integer iLength, FileType fileType, Boolean bPersistentFile, Boolean bSystemFile, Integer iCorrelationID) throws SdlException
+ {
+ PutFile msg = RPCRequestFactory.buildPutFile(sdlFileName, iOffset, iLength, fileType, bPersistentFile, bSystemFile, iCorrelationID);
+ return startPutFileStream(is, msg);
+ }
+
+ /**
+ *
+ * Used to end an existing putFileStream that was previously initiated with any putFileStream method.
*
*/
public void endPutFileStream()
@@ -4322,6 +4540,11 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
return sdlSession.getCurrentTransportType();
}
+ public IProxyListenerBase getProxyListener()
+ {
+ return _proxyListener;
+ }
+
public String getAppName()
{
return _applicationName;
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java b/sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
index 3a3fd0e15..ce5423b2c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
@@ -10,6 +10,7 @@ import com.smartdevicelink.proxy.rpc.DeleteFileResponse;
import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSetResponse;
import com.smartdevicelink.proxy.rpc.DeleteSubMenuResponse;
import com.smartdevicelink.proxy.rpc.DiagnosticMessageResponse;
+import com.smartdevicelink.proxy.rpc.DialNumberResponse;
import com.smartdevicelink.proxy.rpc.EndAudioPassThruResponse;
import com.smartdevicelink.proxy.rpc.GenericResponse;
import com.smartdevicelink.proxy.rpc.GetDTCsResponse;
@@ -28,6 +29,7 @@ import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
import com.smartdevicelink.proxy.rpc.OnPermissionsChange;
import com.smartdevicelink.proxy.rpc.OnSystemRequest;
import com.smartdevicelink.proxy.rpc.OnTBTClientState;
+import com.smartdevicelink.proxy.rpc.OnStreamRPC;
import com.smartdevicelink.proxy.rpc.OnTouchEvent;
import com.smartdevicelink.proxy.rpc.OnVehicleData;
import com.smartdevicelink.proxy.rpc.PerformAudioPassThruResponse;
@@ -36,6 +38,7 @@ import com.smartdevicelink.proxy.rpc.PutFileResponse;
import com.smartdevicelink.proxy.rpc.ReadDIDResponse;
import com.smartdevicelink.proxy.rpc.ResetGlobalPropertiesResponse;
import com.smartdevicelink.proxy.rpc.ScrollableMessageResponse;
+import com.smartdevicelink.proxy.rpc.SendLocationResponse;
import com.smartdevicelink.proxy.rpc.SetAppIconResponse;
import com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse;
import com.smartdevicelink.proxy.rpc.SetGlobalPropertiesResponse;
@@ -43,6 +46,7 @@ import com.smartdevicelink.proxy.rpc.SetMediaClockTimerResponse;
import com.smartdevicelink.proxy.rpc.ShowResponse;
import com.smartdevicelink.proxy.rpc.SliderResponse;
import com.smartdevicelink.proxy.rpc.SpeakResponse;
+import com.smartdevicelink.proxy.rpc.StreamRPCResponse;
import com.smartdevicelink.proxy.rpc.SubscribeButtonResponse;
import com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse;
import com.smartdevicelink.proxy.rpc.SystemRequestResponse;
@@ -75,6 +79,9 @@ public interface IProxyListenerBase {
*/
public void onProxyClosed(String info, Exception e, SdlDisconnectedReason reason);
+ public void onOnStreamRPC(OnStreamRPC notification);
+
+ public void onStreamRPCResponse(StreamRPCResponse response);
/**
* onProxyError() being called indicates that the SDL Proxy experenced an error.
*
@@ -296,4 +303,8 @@ public interface IProxyListenerBase {
public void onGetDTCsResponse(GetDTCsResponse response);
public void onOnLockScreenNotification(OnLockScreenStatus notification);
+
+ public void onDialNumberResponse(DialNumberResponse response);
+
+ public void onSendLocationResponse(SendLocationResponse response);
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java b/sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java
new file mode 100644
index 000000000..7929e86e6
--- /dev/null
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/interfaces/IPutFileResponseListener.java
@@ -0,0 +1,9 @@
+package com.smartdevicelink.proxy.interfaces;
+
+import com.smartdevicelink.proxy.rpc.PutFileResponse;
+
+public interface IPutFileResponseListener {
+ public void onPutFileResponse(PutFileResponse response);
+
+ public void onPutFileStreamError(Exception e, String info);
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommand.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommand.java
index 1f4bd8bea..3ecac23c5 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommand.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommand.java
@@ -53,7 +53,7 @@ public class AddCommand extends RPCRequest {
* Constructs a new AddCommand object
*/
public AddCommand() {
- super(FunctionID.ADD_COMMAND);
+ super(FunctionID.ADD_COMMAND.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java
index 26011f2e2..5d64cf6c8 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddCommandResponse.java
@@ -13,7 +13,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class AddCommandResponse extends RPCResponse {
public AddCommandResponse() {
- super(FunctionID.ADD_COMMAND);
+ super(FunctionID.ADD_COMMAND.toString());
}
public AddCommandResponse(Hashtable<String, Object> hash) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java
index 469ae5223..9985fab61 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenu.java
@@ -29,7 +29,7 @@ public class AddSubMenu extends RPCRequest {
* Constructs a new AddSubMenu object
*/
public AddSubMenu() {
- super(FunctionID.ADD_SUB_MENU);
+ super(FunctionID.ADD_SUB_MENU.toString());
}
/**
* Constructs a new AddSubMenu object indicated by the Hashtable parameter
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java
index c021ed20f..c43317628 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AddSubMenuResponse.java
@@ -12,7 +12,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class AddSubMenuResponse extends RPCResponse {
public AddSubMenuResponse() {
- super(FunctionID.ADD_SUB_MENU);
+ super(FunctionID.ADD_SUB_MENU.toString());
}
public AddSubMenuResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AirbagStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AirbagStatus.java
index 3f28eeae3..13028f257 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AirbagStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AirbagStatus.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
-import com.smartdevicelink.util.DebugTool;
public class AirbagStatus extends RPCStruct {
public static final String KEY_DRIVER_AIRBAG_DEPLOYED = "driverAirbagDeployed";
@@ -33,13 +32,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -55,13 +48,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_SIDE_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -77,13 +64,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_CURTAIN_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -99,13 +80,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PASSENGER_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -121,13 +96,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PASSENGER_CURTAIN_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -143,13 +112,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_KNEE_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -165,13 +128,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PASSENGER_SIDE_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -187,13 +144,7 @@ public class AirbagStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PASSENGER_KNEE_AIRBAG_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Alert.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Alert.java
index d65c83084..dad62cad5 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Alert.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Alert.java
@@ -52,7 +52,7 @@ public class Alert extends RPCRequest {
* Constructs a new Alert object
*/
public Alert() {
- super(FunctionID.ALERT);
+ super(FunctionID.ALERT.toString());
}
/**
* Constructs a new Alert object indicated by the Hashtable parameter
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java
index 791c89a1b..9aab52589 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuver.java
@@ -28,7 +28,7 @@ public class AlertManeuver extends RPCRequest{
* Constructs a new AlertManeuver object
*/
public AlertManeuver(){
- super(FunctionID.ALERT_MANEUVER);
+ super(FunctionID.ALERT_MANEUVER.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java
index 24d5dc710..6ed8ca1a4 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertManeuverResponse.java
@@ -16,7 +16,7 @@ public class AlertManeuverResponse extends RPCResponse{
* Constructs a new AlertManeuverResponse object
*/
public AlertManeuverResponse() {
- super(FunctionID.ALERT_MANEUVER);
+ super(FunctionID.ALERT_MANEUVER.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertResponse.java
index 221ae43ca..fc01fbe63 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AlertResponse.java
@@ -17,7 +17,7 @@ public class AlertResponse extends RPCResponse {
* Constructs a new AlertResponse object
*/
public AlertResponse() {
- super(FunctionID.ALERT);
+ super(FunctionID.ALERT.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java
index 93274a341..0db1c6c8b 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/AudioPassThruCapabilities.java
@@ -6,7 +6,6 @@ import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.AudioType;
import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
-import com.smartdevicelink.util.DebugTool;
/**
* Describes different audio type configurations for PerformAudioPassThru, e.g. {8kHz,8-bit,PCM}
@@ -81,13 +80,7 @@ public class AudioPassThruCapabilities extends RPCStruct {
if (obj instanceof SamplingRate) {
return (SamplingRate) obj;
} else if (obj instanceof String) {
- SamplingRate theCode = null;
- try {
- theCode = SamplingRate.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SAMPLING_RATE, e);
- }
- return theCode;
+ return SamplingRate.valueForString((String) obj);
}
return null;
}
@@ -113,13 +106,7 @@ public class AudioPassThruCapabilities extends RPCStruct {
if (obj instanceof BitsPerSample) {
return (BitsPerSample) obj;
} else if (obj instanceof String) {
- BitsPerSample theCode = null;
- try {
- theCode = BitsPerSample.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BITS_PER_SAMPLE, e);
- }
- return theCode;
+ return BitsPerSample.valueForString((String) obj);
}
return null;
}
@@ -145,13 +132,7 @@ public class AudioPassThruCapabilities extends RPCStruct {
if (obj instanceof AudioType) {
return (AudioType) obj;
} else if (obj instanceof String) {
- AudioType theCode = null;
- try {
- theCode = AudioType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AUDIO_TYPE, e);
- }
- return theCode;
+ return AudioType.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BeltStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BeltStatus.java
index 4b303983f..ccf15c855 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BeltStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BeltStatus.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
-import com.smartdevicelink.util.DebugTool;
public class BeltStatus extends RPCStruct {
public static final String KEY_DRIVER_BELT_DEPLOYED = "driverBeltDeployed";
@@ -40,13 +39,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_BELT_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -62,13 +55,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PASSENGER_BELT_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -84,13 +71,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PASSENGER_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -106,13 +87,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -128,13 +103,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LEFT_ROW_2_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -150,13 +119,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PASSENGER_CHILD_DETECTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -172,13 +135,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RIGHT_ROW_2_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -194,13 +151,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MIDDLE_ROW_2_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -216,13 +167,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MIDDLE_ROW_3_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -238,13 +183,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LEFT_ROW_3_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -260,13 +199,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RIGHT_ROW_3_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -282,13 +215,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_REAR_INFLATABLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -304,13 +231,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RIGHT_REAR_INFLATABLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -326,13 +247,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MIDDLE_ROW_1_BELT_DEPLOYED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -348,13 +263,7 @@ public class BeltStatus extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MIDDLE_ROW_1_BUCKLE_BELTED, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BodyInformation.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BodyInformation.java
index 2afed4d8c..5b9b984d8 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BodyInformation.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/BodyInformation.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.IgnitionStableStatus;
import com.smartdevicelink.proxy.rpc.enums.IgnitionStatus;
-import com.smartdevicelink.util.DebugTool;
public class BodyInformation extends RPCStruct {
public static final String KEY_PARK_BRAKE_ACTIVE = "parkBrakeActive";
@@ -43,13 +42,7 @@ public class BodyInformation extends RPCStruct {
if (obj instanceof IgnitionStableStatus) {
return (IgnitionStableStatus) obj;
} else if (obj instanceof String) {
- IgnitionStableStatus theCode = null;
- try {
- theCode = IgnitionStableStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IGNITION_STABLE_STATUS, e);
- }
- return theCode;
+ return IgnitionStableStatus.valueForString((String) obj);
}
return null;
}
@@ -65,13 +58,7 @@ public class BodyInformation extends RPCStruct {
if (obj instanceof IgnitionStatus) {
return (IgnitionStatus) obj;
} else if (obj instanceof String) {
- IgnitionStatus theCode = null;
- try {
- theCode = IgnitionStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IGNITION_STATUS, e);
- }
- return theCode;
+ return IgnitionStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java
index 34f0124b9..f59848036 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ButtonCapabilities.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
/**
* Provides information about the capabilities of a SDL HMI button.
@@ -69,13 +68,7 @@ public class ButtonCapabilities extends RPCStruct {
if (obj instanceof ButtonName) {
return (ButtonName) obj;
} else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_NAME, e);
- }
- return theCode;
+ return ButtonName.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java
index 5ab4abe1b..1cf47841e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistration.java
@@ -7,7 +7,6 @@ import java.util.List;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.util.DebugTool;
/**
* If the app recognizes during the app registration that the Sdl HMI language
@@ -35,7 +34,7 @@ public class ChangeRegistration extends RPCRequest {
* Constructs a new ChangeRegistration object
*/
public ChangeRegistration() {
- super(FunctionID.CHANGE_REGISTRATION);
+ super(FunctionID.CHANGE_REGISTRATION.toString());
}
/**
@@ -74,13 +73,7 @@ public class ChangeRegistration extends RPCRequest {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LANGUAGE, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
@@ -109,13 +102,7 @@ public class ChangeRegistration extends RPCRequest {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HMI_DISPLAY_LANGUAGE, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java
index ad71f6561..0ab62ba49 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ChangeRegistrationResponse.java
@@ -16,7 +16,7 @@ public class ChangeRegistrationResponse extends RPCResponse {
* Constructs a new ChangeRegistrationResponse object
*/
public ChangeRegistrationResponse() {
- super(FunctionID.CHANGE_REGISTRATION);
+ super(FunctionID.CHANGE_REGISTRATION.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java
index 2ac4bd37e..6ea37a444 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ClusterModeStatus.java
@@ -6,7 +6,6 @@ import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.CarModeStatus;
import com.smartdevicelink.proxy.rpc.enums.PowerModeQualificationStatus;
import com.smartdevicelink.proxy.rpc.enums.PowerModeStatus;
-import com.smartdevicelink.util.DebugTool;
public class ClusterModeStatus extends RPCStruct {
public static final String KEY_POWER_MODE_ACTIVE = "powerModeActive";
@@ -41,13 +40,7 @@ public class ClusterModeStatus extends RPCStruct {
if (obj instanceof PowerModeQualificationStatus) {
return (PowerModeQualificationStatus) obj;
} else if (obj instanceof String) {
- PowerModeQualificationStatus theCode = null;
- try {
- theCode = PowerModeQualificationStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_POWER_MODE_QUALIFICATION_STATUS, e);
- }
- return theCode;
+ return PowerModeQualificationStatus.valueForString((String) obj);
}
return null;
}
@@ -63,13 +56,7 @@ public class ClusterModeStatus extends RPCStruct {
if (obj instanceof CarModeStatus) {
return (CarModeStatus) obj;
} else if (obj instanceof String) {
- CarModeStatus theCode = null;
- try {
- theCode = CarModeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_CAR_MODE_STATUS, e);
- }
- return theCode;
+ return CarModeStatus.valueForString((String) obj);
}
return null;
}
@@ -85,13 +72,7 @@ public class ClusterModeStatus extends RPCStruct {
if (obj instanceof PowerModeStatus) {
return (PowerModeStatus) obj;
} else if (obj instanceof String) {
- PowerModeStatus theCode = null;
- try {
- theCode = PowerModeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_POWER_MODE_STATUS, e);
- }
- return theCode;
+ return PowerModeStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java
index 53fee6201..45c2901de 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSet.java
@@ -28,7 +28,7 @@ public class CreateInteractionChoiceSet extends RPCRequest {
* Constructs a new CreateInteractionChoiceSet object
*/
public CreateInteractionChoiceSet() {
- super(FunctionID.CREATE_INTERACTION_CHOICE_SET);
+ super(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString());
}
/**
* Constructs a new CreateInteractionChoiceSet object indicated by the
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java
index 7edc84294..d5a417090 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/CreateInteractionChoiceSetResponse.java
@@ -14,7 +14,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class CreateInteractionChoiceSetResponse extends RPCResponse {
public CreateInteractionChoiceSetResponse() {
- super(FunctionID.CREATE_INTERACTION_CHOICE_SET);
+ super(FunctionID.CREATE_INTERACTION_CHOICE_SET.toString());
}
public CreateInteractionChoiceSetResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DIDResult.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DIDResult.java
index c4d5d2f3d..0420aac2c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DIDResult.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DIDResult.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
-import com.smartdevicelink.util.DebugTool;
public class DIDResult extends RPCStruct {
public static final String KEY_RESULT_CODE = "resultCode";
@@ -27,13 +26,7 @@ public class DIDResult extends RPCStruct {
if (obj instanceof VehicleDataResultCode) {
return (VehicleDataResultCode) obj;
} else if (obj instanceof String) {
- VehicleDataResultCode theCode = null;
- try {
- theCode = VehicleDataResultCode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RESULT_CODE, e);
- }
- return theCode;
+ return VehicleDataResultCode.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java
index 2aa701afe..bf32d6996 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommand.java
@@ -26,7 +26,7 @@ public class DeleteCommand extends RPCRequest {
* Constructs a new DeleteCommand object
*/
public DeleteCommand() {
- super(FunctionID.DELETE_COMMAND);
+ super(FunctionID.DELETE_COMMAND.toString());
}
/**
* Constructs a new DeleteCommand object indicated by the Hashtable
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java
index ace0f8beb..b6bcc9e7d 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteCommandResponse.java
@@ -13,7 +13,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class DeleteCommandResponse extends RPCResponse {
public DeleteCommandResponse() {
- super(FunctionID.DELETE_COMMAND);
+ super(FunctionID.DELETE_COMMAND.toString());
}
public DeleteCommandResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFile.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFile.java
index ebb134a7a..b2bc91a99 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFile.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFile.java
@@ -21,7 +21,7 @@ public class DeleteFile extends RPCRequest {
* Constructs a new DeleteFile object
*/
public DeleteFile() {
- super(FunctionID.DELETE_FILE);
+ super(FunctionID.DELETE_FILE.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
index 5d09572b0..ad54b2a14 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
@@ -14,7 +14,7 @@ public class DeleteFileResponse extends RPCResponse {
public static final String KEY_SPACE_AVAILABLE = "spaceAvailable";
public DeleteFileResponse() {
- super(FunctionID.DELETE_FILE);
+ super(FunctionID.DELETE_FILE.toString());
}
public DeleteFileResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java
index df80e02c2..0d7d610d7 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSet.java
@@ -27,7 +27,7 @@ public class DeleteInteractionChoiceSet extends RPCRequest {
* Constructs a new DeleteInteractionChoiceSet object
*/
public DeleteInteractionChoiceSet() {
- super(FunctionID.DELETE_INTERACTION_CHOICE_SET);
+ super(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString());
}
/**
* Constructs a new DeleteInteractionChoiceSet object indicated by the
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java
index 6c41b23ef..5f29ed567 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteInteractionChoiceSetResponse.java
@@ -13,7 +13,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class DeleteInteractionChoiceSetResponse extends RPCResponse {
public DeleteInteractionChoiceSetResponse() {
- super(FunctionID.DELETE_INTERACTION_CHOICE_SET);
+ super(FunctionID.DELETE_INTERACTION_CHOICE_SET.toString());
}
public DeleteInteractionChoiceSetResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java
index 154ba6668..bd7fc216b 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenu.java
@@ -25,7 +25,7 @@ public class DeleteSubMenu extends RPCRequest {
* Constructs a new DeleteSubMenu object
*/
public DeleteSubMenu() {
- super(FunctionID.DELETE_SUB_MENU);
+ super(FunctionID.DELETE_SUB_MENU.toString());
}
/**
* Constructs a new DeleteSubMenu object indicated by the Hashtable parameter<p>
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java
index cf24f0e16..c13e37131 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeleteSubMenuResponse.java
@@ -13,7 +13,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class DeleteSubMenuResponse extends RPCResponse {
public DeleteSubMenuResponse() {
- super(FunctionID.DELETE_SUB_MENU);
+ super(FunctionID.DELETE_SUB_MENU.toString());
}
public DeleteSubMenuResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java
index bfa36e3f5..ca110a8b3 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DeviceStatus.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.DeviceLevelStatus;
import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
-import com.smartdevicelink.util.DebugTool;
/**
* Describes the status related to a connected mobile device or SDL and if or how it is represented in the vehicle.
@@ -239,13 +238,7 @@ public class DeviceStatus extends RPCStruct {
if (obj instanceof DeviceLevelStatus) {
return (DeviceLevelStatus) obj;
} else if (obj instanceof String) {
- DeviceLevelStatus theCode = null;
- try {
- theCode = DeviceLevelStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BATT_LEVEL_STATUS, e);
- }
- return theCode;
+ return DeviceLevelStatus.valueForString((String) obj);
}
return null;
}
@@ -311,13 +304,7 @@ public class DeviceStatus extends RPCStruct {
if (obj instanceof DeviceLevelStatus) {
return (DeviceLevelStatus) obj;
} else if (obj instanceof String) {
- DeviceLevelStatus theCode = null;
- try {
- theCode = DeviceLevelStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SIGNAL_LEVEL_STATUS, e);
- }
- return theCode;
+ return DeviceLevelStatus.valueForString((String) obj);
}
return null;
}
@@ -343,13 +330,7 @@ public class DeviceStatus extends RPCStruct {
if (obj instanceof PrimaryAudioSource) {
return (PrimaryAudioSource) obj;
} else if (obj instanceof String) {
- PrimaryAudioSource theCode = null;
- try {
- theCode = PrimaryAudioSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PRIMARY_AUDIO_SOURCE, e);
- }
- return theCode;
+ return PrimaryAudioSource.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java
index 2aa37445b..e5b8e8c45 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessage.java
@@ -12,7 +12,7 @@ public class DiagnosticMessage extends RPCRequest {
public static final String KEY_MESSAGE_DATA = "messageData";
public DiagnosticMessage() {
- super(FunctionID.DIAGNOSTIC_MESSAGE);
+ super(FunctionID.DIAGNOSTIC_MESSAGE.toString());
}
public DiagnosticMessage(Hashtable<String, Object> hash) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
index 742270845..57e5bc98b 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
@@ -10,7 +10,7 @@ public class DiagnosticMessageResponse extends RPCResponse {
public static final String KEY_MESSAGE_DATA_RESULT = "messageDataResult";
public DiagnosticMessageResponse() {
- super(FunctionID.DIAGNOSTIC_MESSAGE);
+ super(FunctionID.DIAGNOSTIC_MESSAGE.toString());
}
public DiagnosticMessageResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumber.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumber.java
new file mode 100644
index 000000000..76fbc02d1
--- /dev/null
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumber.java
@@ -0,0 +1,51 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+/**
+ * Dials a phone number and switches to phone application.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+public class DialNumber extends RPCRequest {
+ public static final String KEY_NUMBER = "number";
+
+
+ public DialNumber(){
+ super(FunctionID.DIAL_NUMBER.toString());
+ }
+
+ public DialNumber(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets a number to dial
+ *
+ * @param number
+ * a phone number is a string, which can be up to 40 chars.
+ * <p>
+ * <b>Notes: </b>Maxlength=40<p>
+ * All characters shall be stripped from string except digits 0-9 and * # , ; +
+ */
+ public void setNumber(String number) {
+ if (number != null) {
+ number = number.replaceAll("[^0-9*#,;+]", ""); //This will sanitize the input
+ parameters.put(KEY_NUMBER, number);
+ } else {
+ parameters.remove(KEY_NUMBER);
+ }
+ }
+
+ /**
+ * Gets a number to dial
+ *
+ * @return String - a String value representing a number to dial
+ */
+ public String getNumber() {
+ return (String) parameters.get(KEY_NUMBER);
+ }
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java
new file mode 100644
index 000000000..613755442
--- /dev/null
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DialNumberResponse.java
@@ -0,0 +1,23 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+/**
+ * Dial Number Response is sent, when DialNumber has been called
+ *
+ * @since SmartDeviceLink 4.0
+ */
+public class DialNumberResponse extends RPCResponse {
+
+ public DialNumberResponse() {
+ super(FunctionID.DIAL_NUMBER.toString());
+ }
+
+ public DialNumberResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
index cc2558d67..1a44ad601 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
@@ -77,13 +77,7 @@ public class DisplayCapabilities extends RPCStruct {
if (obj instanceof DisplayType) {
return (DisplayType) obj;
} else if (obj instanceof String) {
- DisplayType theCode = null;
- try {
- theCode = DisplayType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DISPLAY_TYPE, e);
- }
- return theCode;
+ return DisplayType.valueForString((String) obj);
}
return null;
}
@@ -197,12 +191,7 @@ public class DisplayCapabilities extends RPCStruct {
List<MediaClockFormat> newList = new ArrayList<MediaClockFormat>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- MediaClockFormat toAdd = null;
- try {
- toAdd = MediaClockFormat.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse MediaClockFormat from " + getClass().getSimpleName() + "." + KEY_MEDIA_CLOCK_FORMATS, e);
- }
+ MediaClockFormat toAdd = MediaClockFormat.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ECallInfo.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ECallInfo.java
index 7e6ce1d2c..21173c487 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ECallInfo.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ECallInfo.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.ECallConfirmationStatus;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataNotificationStatus;
-import com.smartdevicelink.util.DebugTool;
public class ECallInfo extends RPCStruct {
public static final String KEY_E_CALL_NOTIFICATION_STATUS = "eCallNotificationStatus";
@@ -29,13 +28,7 @@ public class ECallInfo extends RPCStruct {
if (obj instanceof VehicleDataNotificationStatus) {
return (VehicleDataNotificationStatus) obj;
} else if (obj instanceof String) {
- VehicleDataNotificationStatus theCode = null;
- try {
- theCode = VehicleDataNotificationStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_E_CALL_NOTIFICATION_STATUS, e);
- }
- return theCode;
+ return VehicleDataNotificationStatus.valueForString((String) obj);
}
return null;
}
@@ -51,13 +44,7 @@ public class ECallInfo extends RPCStruct {
if (obj instanceof VehicleDataNotificationStatus) {
return (VehicleDataNotificationStatus) obj;
} else if (obj instanceof String) {
- VehicleDataNotificationStatus theCode = null;
- try {
- theCode = VehicleDataNotificationStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AUX_E_CALL_NOTIFICATION_STATUS, e);
- }
- return theCode;
+ return VehicleDataNotificationStatus.valueForString((String) obj);
}
return null;
}
@@ -73,13 +60,7 @@ public class ECallInfo extends RPCStruct {
if (obj instanceof ECallConfirmationStatus) {
return (ECallConfirmationStatus) obj;
} else if (obj instanceof String) {
- ECallConfirmationStatus theCode = null;
- try {
- theCode = ECallConfirmationStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_E_CALL_CONFIRMATION_STATUS, e);
- }
- return theCode;
+ return ECallConfirmationStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EmergencyEvent.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EmergencyEvent.java
index 4df528b08..77fa72e5b 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EmergencyEvent.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EmergencyEvent.java
@@ -6,7 +6,6 @@ import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.EmergencyEventType;
import com.smartdevicelink.proxy.rpc.enums.FuelCutoffStatus;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
-import com.smartdevicelink.util.DebugTool;
public class EmergencyEvent extends RPCStruct {
public static final String KEY_EMERGENCY_EVENT_TYPE = "emergencyEventType";
@@ -32,13 +31,7 @@ public class EmergencyEvent extends RPCStruct {
if (obj instanceof EmergencyEventType) {
return (EmergencyEventType) obj;
} else if (obj instanceof String) {
- EmergencyEventType theCode = null;
- try {
- theCode = EmergencyEventType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EMERGENCY_EVENT_TYPE, e);
- }
- return theCode;
+ return EmergencyEventType.valueForString((String) obj);
}
return null;
}
@@ -54,13 +47,7 @@ public class EmergencyEvent extends RPCStruct {
if (obj instanceof FuelCutoffStatus) {
return (FuelCutoffStatus) obj;
} else if (obj instanceof String) {
- FuelCutoffStatus theCode = null;
- try {
- theCode = FuelCutoffStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_CUTOFF_STATUS, e);
- }
- return theCode;
+ return FuelCutoffStatus.valueForString((String) obj);
}
return null;
}
@@ -76,13 +63,7 @@ public class EmergencyEvent extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ROLLOVER_EVENT, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -108,13 +89,7 @@ public class EmergencyEvent extends RPCStruct {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_MULTIPLE_EVENTS, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java
index 1020a4281..8a6793691 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThru.java
@@ -21,7 +21,7 @@ public class EndAudioPassThru extends RPCRequest {
* Constructs a new EndAudioPassThru object
*/
public EndAudioPassThru() {
- super(FunctionID.END_AUDIO_PASS_THRU);
+ super(FunctionID.END_AUDIO_PASS_THRU.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java
index d29cbccfa..4f7a09f7b 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/EndAudioPassThruResponse.java
@@ -16,7 +16,7 @@ public class EndAudioPassThruResponse extends RPCResponse {
* Constructs a new EndAudioPassThruResponse object
*/
public EndAudioPassThruResponse() {
- super(FunctionID.END_AUDIO_PASS_THRU);
+ super(FunctionID.END_AUDIO_PASS_THRU.toString());
}
public EndAudioPassThruResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GPSData.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GPSData.java
index c21839e7d..e21f694c1 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GPSData.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GPSData.java
@@ -5,9 +5,7 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.CompassDirection;
import com.smartdevicelink.proxy.rpc.enums.Dimension;
-import com.smartdevicelink.util.DebugTool;
import com.smartdevicelink.util.SdlDataTypeConverter;
-
/**
* Describes the GPS data. Not all data will be available on all carlines.
* <p><b>Parameter List
@@ -350,13 +348,7 @@ public class GPSData extends RPCStruct {
if (obj instanceof CompassDirection) {
return (CompassDirection) obj;
} else if (obj instanceof String) {
- CompassDirection theCode = null;
- try {
- theCode = CompassDirection.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_COMPASS_DIRECTION, e);
- }
- return theCode;
+ return CompassDirection.valueForString((String) obj);
}
return null;
}
@@ -474,13 +466,7 @@ public class GPSData extends RPCStruct {
if (obj instanceof Dimension) {
return (Dimension) obj;
} else if (obj instanceof String) {
- Dimension theCode = null;
- try {
- theCode = Dimension.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DIMENSION, e);
- }
- return theCode;
+ return Dimension.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GenericResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GenericResponse.java
index 4c2b1238e..e231dd04d 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GenericResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GenericResponse.java
@@ -13,7 +13,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class GenericResponse extends RPCResponse {
public GenericResponse() {
- super(FunctionID.GENERIC_RESPONSE);
+ super(FunctionID.GENERIC_RESPONSE.toString());
}
public GenericResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCs.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCs.java
index 65deeaaa0..967c62cbb 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCs.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCs.java
@@ -22,7 +22,7 @@ public class GetDTCs extends RPCRequest {
* Constructs a new GetDTCs object
*/
public GetDTCs() {
- super(FunctionID.GET_DTCS);
+ super(FunctionID.GET_DTCS.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
index 8d19df40d..b3c49b251 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
@@ -17,7 +17,7 @@ public class GetDTCsResponse extends RPCResponse{
public static final String KEY_DTC = "dtc";
public GetDTCsResponse(){
- super(FunctionID.GET_DTCS);
+ super(FunctionID.GET_DTCS.toString());
}
public GetDTCsResponse(Hashtable<String, Object> hash){
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java
index 42840de97..b3d2e6189 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleData.java
@@ -33,7 +33,7 @@ public class GetVehicleData extends RPCRequest {
public static final String KEY_MY_KEY = "myKey";
public GetVehicleData() {
- super(FunctionID.GET_VEHICLE_DATA);
+ super(FunctionID.GET_VEHICLE_DATA.toString());
}
public GetVehicleData(Hashtable<String, Object> hash) {
super(hash);
@@ -80,15 +80,11 @@ public class GetVehicleData extends RPCRequest {
}
@Deprecated
public void setFuelLevel_State(Boolean fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevel_State);
- } else {
- parameters.remove(KEY_FUEL_LEVEL_STATE);
- }
+ setFuelLevelState(fuelLevel_State);
}
@Deprecated
public Boolean getFuelLevel_State() {
- return (Boolean) parameters.get(KEY_FUEL_LEVEL_STATE);
+ return getFuelLevelState();
}
public void setFuelLevelState(Boolean fuelLevelState) {
if (fuelLevelState != null) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
index 8338b1ef5..3ae2b54d8 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
@@ -41,7 +41,7 @@ public class GetVehicleDataResponse extends RPCResponse {
public GetVehicleDataResponse() {
- super(FunctionID.GET_VEHICLE_DATA);
+ super(FunctionID.GET_VEHICLE_DATA.toString());
}
public GetVehicleDataResponse(Hashtable<String, Object> hash) {
super(hash);
@@ -103,27 +103,11 @@ public class GetVehicleDataResponse extends RPCResponse {
}
@Deprecated
public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevel_State);
- } else {
- parameters.remove(KEY_FUEL_LEVEL_STATE);
- }
+ setFuelLevelState(fuelLevel_State);
}
@Deprecated
public ComponentVolumeStatus getFuelLevel_State() {
- Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
- if (obj instanceof ComponentVolumeStatus) {
- return (ComponentVolumeStatus) obj;
- } else if (obj instanceof String) {
- ComponentVolumeStatus theCode = null;
- try {
- theCode = ComponentVolumeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL_STATE, e);
- }
- return theCode;
- }
- return null;
+ return getFuelLevelState();
}
public void setFuelLevelState(ComponentVolumeStatus fuelLevelState) {
if (fuelLevelState != null) {
@@ -191,13 +175,7 @@ public class GetVehicleDataResponse extends RPCResponse {
if (obj instanceof PRNDL) {
return (PRNDL) obj;
} else if (obj instanceof String) {
- PRNDL theCode = null;
- try {
- theCode = PRNDL.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PRNDL, e);
- }
- return theCode;
+ return PRNDL.valueForString((String) obj);
}
return null;
}
@@ -307,13 +285,7 @@ public class GetVehicleDataResponse extends RPCResponse {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_BRAKING, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -329,13 +301,7 @@ public class GetVehicleDataResponse extends RPCResponse {
if (obj instanceof WiperStatus) {
return (WiperStatus) obj;
} else if (obj instanceof String) {
- WiperStatus theCode = null;
- try {
- theCode = WiperStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_WIPER_STATUS, e);
- }
- return theCode;
+ return WiperStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMICapabilities.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMICapabilities.java
new file mode 100644
index 000000000..efc94f57c
--- /dev/null
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMICapabilities.java
@@ -0,0 +1,49 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.proxy.RPCStruct;
+
+public class HMICapabilities extends RPCStruct{
+ public static final String KEY_NAVIGATION = "navigation";
+ public static final String KEY_PHONE_CALL = "phoneCall";
+
+ public HMICapabilities() { }
+
+ public HMICapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public boolean isNavigationAvailable(){
+ Object available = store.get(KEY_NAVIGATION);
+ if(available == null){
+ return false;
+ }
+ return (Boolean)available;
+ }
+
+ public void setNavigationAvilable(Boolean available){
+ if (available) {
+ store.put(KEY_NAVIGATION, available);
+ } else {
+ store.remove(KEY_NAVIGATION);
+ }
+ }
+
+ public boolean isPhoneCallAvailable(){
+ Object available = store.get(KEY_PHONE_CALL);
+ if(available == null){
+ return false;
+ }
+ return (Boolean)available;
+ }
+
+ public void setPhoneCallAvilable(Boolean available){
+ if (available) {
+ store.put(KEY_PHONE_CALL, available);
+ } else {
+ store.remove(KEY_PHONE_CALL);
+ }
+ }
+
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java
index 710769840..629fb7b79 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HMIPermissions.java
@@ -6,7 +6,6 @@ import java.util.List;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.util.DebugTool;
/**
* Defining sets of HMI levels, which are permitted or prohibited for a given RPC.
* <p><b>Parameter List
@@ -74,12 +73,7 @@ public class HMIPermissions extends RPCStruct {
List<HMILevel> newList = new ArrayList<HMILevel>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- HMILevel toAdd = null;
- try {
- toAdd = HMILevel.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ALLOWED, e);
- }
+ HMILevel toAdd = HMILevel.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
@@ -119,12 +113,7 @@ public class HMIPermissions extends RPCStruct {
List<HMILevel> newList = new ArrayList<HMILevel>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- HMILevel toAdd = null;
- try {
- toAdd = HMILevel.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_USER_DISALLOWED, e);
- }
+ HMILevel toAdd = HMILevel.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java
index 87f1f65b9..70f3fd76f 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/HeadLampStatus.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.AmbientLightStatus;
-import com.smartdevicelink.util.DebugTool;
public class HeadLampStatus extends RPCStruct {
public static final String KEY_AMBIENT_LIGHT_SENSOR_STATUS = "ambientLightSensorStatus";
@@ -27,13 +26,7 @@ public class HeadLampStatus extends RPCStruct {
if (obj instanceof AmbientLightStatus) {
return (AmbientLightStatus) obj;
} else if (obj instanceof String) {
- AmbientLightStatus theCode = null;
- try {
- theCode = AmbientLightStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AMBIENT_LIGHT_SENSOR_STATUS, e);
- }
- return theCode;
+ return AmbientLightStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Image.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Image.java
index 869601f47..d46607923 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Image.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Image.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.ImageType;
-import com.smartdevicelink.util.DebugTool;
/**
*Specifies, which image shall be used, e.g. in Alerts or on Softbuttons provided the display supports it.
@@ -94,13 +93,7 @@ public class Image extends RPCStruct {
if (obj instanceof ImageType) {
return (ImageType) obj;
} else if (obj instanceof String) {
- ImageType theCode = null;
- try {
- theCode = ImageType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IMAGE_TYPE, e);
- }
- return theCode;
+ return ImageType.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ImageField.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ImageField.java
index bad10b8c1..528b23425 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ImageField.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ImageField.java
@@ -25,13 +25,7 @@ public class ImageField extends RPCStruct {
if (obj instanceof ImageFieldName) {
return (ImageFieldName) obj;
} else if (obj instanceof String) {
- ImageFieldName theCode = null;
- try {
- theCode = ImageFieldName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_NAME, e);
- }
- return theCode;
+ return ImageFieldName.valueForString((String) obj);
}
return null;
}
@@ -55,12 +49,7 @@ public class ImageField extends RPCStruct {
List<FileType> newList = new ArrayList<FileType>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- FileType theCode = null;
- try {
- theCode = FileType.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_IMAGE_TYPE_SUPPORTED, e);
- }
+ FileType theCode = FileType.valueForString(strFormat);
if (theCode != null) {
newList.add(theCode);
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/KeyboardProperties.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
index e50fc3f62..4e5652581 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/KeyboardProperties.java
@@ -7,7 +7,6 @@ import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.KeyboardLayout;
import com.smartdevicelink.proxy.rpc.enums.KeypressMode;
import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.util.DebugTool;
public class KeyboardProperties extends RPCStruct {
public static final String KEY_KEYPRESS_MODE = "keypressMode";
@@ -34,15 +33,7 @@ public class KeyboardProperties extends RPCStruct {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError(
- "Failed to parse " + getClass().getSimpleName() + "." +
- KEY_LANGUAGE, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
@@ -60,15 +51,7 @@ public class KeyboardProperties extends RPCStruct {
if (obj instanceof KeyboardLayout) {
return (KeyboardLayout) obj;
} else if (obj instanceof String) {
- KeyboardLayout theCode = null;
- try {
- theCode = KeyboardLayout.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError(
- "Failed to parse " + getClass().getSimpleName() + "." +
- KEY_KEYBOARD_LAYOUT, e);
- }
- return theCode;
+ return KeyboardLayout.valueForString((String) obj);
}
return null;
}
@@ -86,15 +69,7 @@ public class KeyboardProperties extends RPCStruct {
if (obj instanceof KeypressMode) {
return (KeypressMode) obj;
} else if (obj instanceof String) {
- KeypressMode theCode = null;
- try {
- theCode = KeypressMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError(
- "Failed to parse " + getClass().getSimpleName() + "." +
- KEY_KEYPRESS_MODE, e);
- }
- return theCode;
+ return KeypressMode.valueForString((String) obj);
}
return KEYPRESS_MODE_DEFAULT;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFiles.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFiles.java
index dba3f973e..f135eaa9e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFiles.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFiles.java
@@ -18,7 +18,7 @@ public class ListFiles extends RPCRequest {
* Constructs a new ListFiles object
*/
public ListFiles() {
- super(FunctionID.LIST_FILES);
+ super(FunctionID.LIST_FILES.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
index 1284f1cbf..2c7a62e3e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
@@ -19,7 +19,7 @@ public class ListFilesResponse extends RPCResponse {
* Constructs a new ListFilesResponse object
*/
public ListFilesResponse() {
- super(FunctionID.LIST_FILES);
+ super(FunctionID.LIST_FILES.toString());
}
public ListFilesResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/MyKey.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/MyKey.java
index c1ed28300..96d05dcec 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/MyKey.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/MyKey.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataStatus;
-import com.smartdevicelink.util.DebugTool;
public class MyKey extends RPCStruct {
public static final String KEY_E_911_OVERRIDE = "e911Override";
@@ -26,13 +25,7 @@ public class MyKey extends RPCStruct {
if (obj instanceof VehicleDataStatus) {
return (VehicleDataStatus) obj;
} else if (obj instanceof String) {
- VehicleDataStatus theCode = null;
- try {
- theCode = VehicleDataStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_E_911_OVERRIDE, e);
- }
- return theCode;
+ return VehicleDataStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java
index ec45bd9fa..21cb9bc52 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAppInterfaceUnregistered.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.AppInterfaceUnregisteredReason;
-import com.smartdevicelink.util.DebugTool;
/**
* <p>Notifies an application that its interface registration has been terminated. This means that all SDL resources
@@ -47,7 +46,7 @@ public class OnAppInterfaceUnregistered extends RPCNotification {
*Constructs a newly allocated OnAppInterfaceUnregistered object
*/
public OnAppInterfaceUnregistered() {
- super(FunctionID.ON_APP_INTERFACE_UNREGISTERED);
+ super(FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString());
}
/**
*<p>Constructs a newly allocated OnAppInterfaceUnregistered object indicated by the Hashtable parameter</p>
@@ -65,13 +64,7 @@ public class OnAppInterfaceUnregistered extends RPCNotification {
if (obj instanceof AppInterfaceUnregisteredReason) {
return (AppInterfaceUnregisteredReason) obj;
} else if (obj instanceof String) {
- AppInterfaceUnregisteredReason theCode = null;
- try {
- theCode = AppInterfaceUnregisteredReason.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_REASON, e);
- }
- return theCode;
+ return AppInterfaceUnregisteredReason.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java
index 3369c4020..421bbd933 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnAudioPassThru.java
@@ -45,7 +45,7 @@ public class OnAudioPassThru extends RPCNotification {
*Constructs a newly allocated OnCommand object
*/
public OnAudioPassThru() {
- super(FunctionID.ON_AUDIO_PASS_THRU);
+ super(FunctionID.ON_AUDIO_PASS_THRU.toString());
}
/**
*<p>Constructs a newly allocated OnAudioPassThru object indicated by the Hashtable parameter</p>
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java
index 3465965bd..3e5bf33f4 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonEvent.java
@@ -6,7 +6,6 @@ import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.ButtonEventMode;
import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
/**
* Notifies application that user has depressed or released a button to which
@@ -91,7 +90,7 @@ public class OnButtonEvent extends RPCNotification {
*Constructs a newly allocated OnButtonEvent object
*/
public OnButtonEvent() {
- super(FunctionID.ON_BUTTON_EVENT);
+ super(FunctionID.ON_BUTTON_EVENT.toString());
}
/**
* <p>
@@ -114,13 +113,7 @@ public class OnButtonEvent extends RPCNotification {
if (obj instanceof ButtonName) {
return (ButtonName) obj;
} else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BUTTON_NAME, e);
- }
- return theCode;
+ return ButtonName.valueForString((String) obj);
}
return null;
}
@@ -144,13 +137,7 @@ public class OnButtonEvent extends RPCNotification {
if (obj instanceof ButtonEventMode) {
return (ButtonEventMode) obj;
} else if (obj instanceof String) {
- ButtonEventMode theCode = null;
- try {
- theCode = ButtonEventMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BUTTON_EVENT_MODE, e);
- }
- return theCode;
+ return ButtonEventMode.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java
index 602574ae3..2d48b9635 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnButtonPress.java
@@ -6,7 +6,6 @@ import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.ButtonName;
import com.smartdevicelink.proxy.rpc.enums.ButtonPressMode;
-import com.smartdevicelink.util.DebugTool;
/**
* <p>
@@ -96,7 +95,7 @@ public class OnButtonPress extends RPCNotification {
*Constructs a newly allocated OnButtonPress object
*/
public OnButtonPress() {
- super(FunctionID.ON_BUTTON_PRESS);
+ super(FunctionID.ON_BUTTON_PRESS.toString());
}
/**
* <p>
@@ -119,13 +118,7 @@ public class OnButtonPress extends RPCNotification {
if (obj instanceof ButtonName) {
return (ButtonName) obj;
} else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BUTTON_NAME, e);
- }
- return theCode;
+ return ButtonName.valueForString((String) obj);
}
return null;
}
@@ -148,13 +141,7 @@ public class OnButtonPress extends RPCNotification {
if (obj instanceof ButtonPressMode) {
return (ButtonPressMode) obj;
} else if (obj instanceof String) {
- ButtonPressMode theCode = null;
- try {
- theCode = ButtonPressMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BUTTON_PRESS_MODE, e);
- }
- return theCode;
+ return ButtonPressMode.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnCommand.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnCommand.java
index f2aea7f2b..77632b8b2 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnCommand.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnCommand.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-import com.smartdevicelink.util.DebugTool;
/**
* This is called when a command was selected via VR after pressing the PTT button, or selected from the menu after
@@ -59,7 +58,7 @@ public class OnCommand extends RPCNotification {
*Constructs a newly allocated OnCommand object
*/
public OnCommand() {
- super(FunctionID.ON_COMMAND);
+ super(FunctionID.ON_COMMAND.toString());
}
/**
*<p>Constructs a newly allocated OnCommand object indicated by the Hashtable parameter</p>
@@ -95,13 +94,7 @@ public class OnCommand extends RPCNotification {
if (obj instanceof TriggerSource) {
return (TriggerSource) obj;
} else if (obj instanceof String) {
- TriggerSource theCode = null;
- try {
- theCode = TriggerSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TRIGGER_SOURCE, e);
- }
- return theCode;
+ return TriggerSource.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java
index 6f15de6a8..69280ad21 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnDriverDistraction.java
@@ -2,13 +2,9 @@ package com.smartdevicelink.proxy.rpc;
import java.util.Hashtable;
-
-
-
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.DriverDistractionState;
-import com.smartdevicelink.util.DebugTool;
/**
* <p>Notifies the application of the current driver distraction state (whether driver distraction rules are in effect, or
@@ -48,7 +44,7 @@ public class OnDriverDistraction extends RPCNotification {
*Constructs a newly allocated OnDriverDistraction object
*/
public OnDriverDistraction() {
- super(FunctionID.ON_DRIVER_DISTRACTION);
+ super(FunctionID.ON_DRIVER_DISTRACTION.toString());
}
/**
*<p>Constructs a newly allocated OnDriverDistraction object indicated by the Hashtable parameter</p>
@@ -66,13 +62,7 @@ public class OnDriverDistraction extends RPCNotification {
if (obj instanceof DriverDistractionState) {
return (DriverDistractionState)obj;
} else if(obj instanceof String) {
- DriverDistractionState theCode = null;
- try {
- theCode = DriverDistractionState.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_STATE, e);
- }
- return theCode;
+ return DriverDistractionState.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java
index 241fd4a72..31161f2f1 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHMIStatus.java
@@ -7,7 +7,6 @@ import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.SystemContext;
-import com.smartdevicelink.util.DebugTool;
/**
* <p>Notifies an application that HMI conditions have changed for the application. This indicates whether the application
* can speak phrases, display text, perform interactions, receive button presses and events, stream audio, etc. This
@@ -73,7 +72,7 @@ public class OnHMIStatus extends RPCNotification {
*Constructs a newly allocated OnHMIStatus object
*/
public OnHMIStatus() {
- super(FunctionID.ON_HMI_STATUS);
+ super(FunctionID.ON_HMI_STATUS.toString());
}
/**
*<p>Constructs a newly allocated OnHMIStatus object indicated by the Hashtable parameter</p>
@@ -91,13 +90,7 @@ public class OnHMIStatus extends RPCNotification {
if (obj instanceof HMILevel) {
return (HMILevel) obj;
} else if (obj instanceof String) {
- HMILevel theCode = null;
- try {
- theCode = HMILevel.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HMI_LEVEL, e);
- }
- return theCode;
+ return HMILevel.valueForString((String) obj);
}
return null;
}
@@ -121,13 +114,7 @@ public class OnHMIStatus extends RPCNotification {
if (obj instanceof AudioStreamingState) {
return (AudioStreamingState) obj;
} else if (obj instanceof String) {
- AudioStreamingState theCode = null;
- try {
- theCode = AudioStreamingState.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AUDIO_STREAMING_STATE, e);
- }
- return theCode;
+ return AudioStreamingState.valueForString((String) obj);
}
return null;
}
@@ -151,13 +138,7 @@ public class OnHMIStatus extends RPCNotification {
if (obj instanceof SystemContext) {
return (SystemContext) obj;
} else if (obj instanceof String) {
- SystemContext theCode = null;
- try {
- theCode = SystemContext.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SYSTEM_CONTEXT, e);
- }
- return theCode;
+ return SystemContext.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHashChange.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHashChange.java
index 363fb8ee5..e806e5225 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHashChange.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnHashChange.java
@@ -9,7 +9,7 @@ public class OnHashChange extends RPCNotification {
public static final String KEY_HASH_ID = "hashID";
public OnHashChange() {
- super(FunctionID.ON_HASH_CHANGE);
+ super(FunctionID.ON_HASH_CHANGE.toString());
}
public OnHashChange(Hashtable<String, Object> hash) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java
index d345fd48d..4de2acf3f 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnKeyboardInput.java
@@ -1,11 +1,10 @@
package com.smartdevicelink.proxy.rpc;
+import java.util.Hashtable;
+
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.KeyboardEvent;
-import com.smartdevicelink.util.DebugTool;
-
-import java.util.Hashtable;
public class OnKeyboardInput extends RPCNotification {
@@ -13,7 +12,7 @@ public class OnKeyboardInput extends RPCNotification {
public static final String KEY_EVENT = "event";
public OnKeyboardInput() {
- super(FunctionID.ON_KEYBOARD_INPUT);
+ super(FunctionID.ON_KEYBOARD_INPUT.toString());
}
public OnKeyboardInput(Hashtable<String, Object> hash) {
@@ -25,13 +24,7 @@ public class OnKeyboardInput extends RPCNotification {
if (obj instanceof KeyboardEvent) {
return (KeyboardEvent) obj;
} else if (obj instanceof String) {
- KeyboardEvent theCode = null;
- try {
- theCode = KeyboardEvent.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_EVENT, e);
- }
- return theCode;
+ return KeyboardEvent.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java
index 44cabf2f0..4f39d55cb 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLanguageChange.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.util.DebugTool;
/**
* Provides information to what language the Sdl HMI language was changed
@@ -64,7 +63,7 @@ public class OnLanguageChange extends RPCNotification {
*Constructs a newly allocated OnCommand object
*/
public OnLanguageChange() {
- super(FunctionID.ON_LANGUAGE_CHANGE);
+ super(FunctionID.ON_LANGUAGE_CHANGE.toString());
}
/**
*<p>Constructs a newly allocated OnLanguageChange object indicated by the Hashtable parameter</p>
@@ -93,13 +92,7 @@ public class OnLanguageChange extends RPCNotification {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LANGUAGE, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
@@ -123,13 +116,7 @@ public class OnLanguageChange extends RPCNotification {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HMI_DISPLAY_LANGUAGE, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java
index 02c6d1cf2..1ad23994c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java
@@ -4,7 +4,6 @@ import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus;
-import com.smartdevicelink.proxy.rpc.OnHMIStatus;
public class OnLockScreenStatus extends RPCNotification {
public static final String KEY_DRIVER_DISTRACTION = "driverDistraction";
@@ -12,7 +11,7 @@ public class OnLockScreenStatus extends RPCNotification {
public static final String KEY_USER_SELECTED = "userSelected";
public OnLockScreenStatus() {
- super(FunctionID.ON_LOCK_SCREEN_STATUS);
+ super(FunctionID.ON_LOCK_SCREEN_STATUS.toString());
}
public Boolean getDriverDistractionStatus() {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java
index e4ae9d46e..4c88c9baa 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnPermissionsChange.java
@@ -54,7 +54,7 @@ public class OnPermissionsChange extends RPCNotification {
*Constructs a newly allocated OnCommand object
*/
public OnPermissionsChange() {
- super(FunctionID.ON_PERMISSIONS_CHANGE);
+ super(FunctionID.ON_PERMISSIONS_CHANGE.toString());
}
/**
*<p>Constructs a newly allocated OnPermissionsChange object indicated by the Hashtable parameter</p>
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java
index f82919922..a878ade77 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java
@@ -6,7 +6,6 @@ import java.util.List;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-import com.smartdevicelink.util.DebugTool;
public class OnSdlChoiceChosen extends RPCNotification {
public static final String KEY_SDL_CHOICE = "sdlChoice";
@@ -139,7 +138,7 @@ public class OnSdlChoiceChosen extends RPCNotification {
public OnSdlChoiceChosen() {
- super(FunctionID.ON_SDL_CHOICE_CHOSEN);
+ super(FunctionID.ON_SDL_CHOICE_CHOSEN.toString());
}
public OnSdlChoiceChosen(Hashtable<String, Object> hash){
super(hash);
@@ -159,13 +158,7 @@ public class OnSdlChoiceChosen extends RPCNotification {
if (obj instanceof TriggerSource) {
return (TriggerSource) obj;
} else if (obj instanceof String) {
- TriggerSource theCode = null;
- try {
- theCode = TriggerSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TRIGGER_SOURCE, e);
- }
- return theCode;
+ return TriggerSource.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnStreamRPC.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnStreamRPC.java
new file mode 100644
index 000000000..bb4bcc324
--- /dev/null
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnStreamRPC.java
@@ -0,0 +1,47 @@
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+
+public class OnStreamRPC extends RPCNotification {
+ public static final String KEY_FILENAME = "fileName";
+ public static final String KEY_BYTESCOMPLETE = "bytesComplete";
+ public static final String KEY_FILESIZE = "fileSize";
+
+ public OnStreamRPC() {
+ super(FunctionID.ON_STREAM_RPC.toString());
+ }
+
+ public void setFileName(String fileName) {
+ if (fileName != null) {
+ parameters.put(KEY_FILENAME, fileName);
+ } else {
+ parameters.remove(KEY_FILENAME);
+ }
+ }
+ public String getFileName() {
+ return (String) parameters.get(KEY_FILENAME);
+ }
+
+ public void setBytesComplete(Long bytesComplete) {
+ if (bytesComplete != null) {
+ parameters.put(KEY_BYTESCOMPLETE, bytesComplete);
+ } else {
+ parameters.remove(KEY_BYTESCOMPLETE);
+ }
+ }
+ public Long getBytesComplete() {
+ return (Long) parameters.get(KEY_BYTESCOMPLETE);
+ }
+
+ public void setFileSize(Long fileSize) {
+ if (fileSize != null) {
+ parameters.put(KEY_FILESIZE, fileSize);
+ } else {
+ parameters.remove(KEY_FILESIZE);
+ }
+ }
+ public Long getFileSize() {
+ return (Long) parameters.get(KEY_FILESIZE);
+ }
+} \ No newline at end of file
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSystemRequest.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
index caa99aefd..fa96cd1cf 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
@@ -14,7 +14,6 @@ import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.FileType;
import com.smartdevicelink.proxy.rpc.enums.RequestType;
-import com.smartdevicelink.util.DebugTool;
public class OnSystemRequest extends RPCNotification {
public static final String KEY_URL_V1 = "URL";
@@ -33,7 +32,7 @@ public class OnSystemRequest extends RPCNotification {
private Headers headers;
public OnSystemRequest() {
- super(FunctionID.ON_SYSTEM_REQUEST);
+ super(FunctionID.ON_SYSTEM_REQUEST.toString());
}
public OnSystemRequest(Hashtable<String, Object> hash) {
@@ -152,15 +151,7 @@ public class OnSystemRequest extends RPCNotification {
if (obj instanceof RequestType) {
return (RequestType) obj;
} else if (obj instanceof String) {
- RequestType theCode = null;
- try {
- theCode = RequestType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError(
- "Failed to parse " + getClass().getSimpleName() + "." +
- KEY_REQUEST_TYPE, e);
- }
- return theCode;
+ return RequestType.valueForString((String) obj);
}
return null;
}
@@ -203,15 +194,7 @@ public class OnSystemRequest extends RPCNotification {
if (obj instanceof FileType) {
return (FileType) obj;
} else if (obj instanceof String) {
- FileType theCode = null;
- try {
- theCode = FileType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError(
- "Failed to parse " + getClass().getSimpleName() + "." +
- KEY_FILE_TYPE, e);
- }
- return theCode;
+ return FileType.valueForString((String) obj);
}
return null;
}
@@ -224,18 +207,34 @@ public class OnSystemRequest extends RPCNotification {
}
}
- public Integer getOffset() {
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param offset
+ */
+ public void setOffset(Integer offset) {
+ if(offset == null){
+ setOffset((Long)null);
+ }else{
+ setOffset(offset.longValue());
+ }
+ }
+
+ public Long getOffset() {
final Object o = parameters.get(KEY_OFFSET);
- if (o == null) return null;
+ if (o == null){
+ return null;
+ }
if (o instanceof Integer) {
- return (Integer) o;
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
}
return null;
}
- public void setOffset(Integer offset) {
+ public void setOffset(Long offset) {
if (offset != null) {
parameters.put(KEY_OFFSET, offset);
} else {
@@ -264,18 +263,34 @@ public class OnSystemRequest extends RPCNotification {
parameters.remove(KEY_TIMEOUT);
}
}
-
- public Integer getLength() {
+
+ public Long getLength() {
final Object o = parameters.get(KEY_LENGTH);
- if (o == null) return null;
+ if (o == null){
+ return null;
+ }
if (o instanceof Integer) {
- return (Integer) o;
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
}
return null;
}
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param length
+ */
public void setLength(Integer length) {
+ if(length == null){
+ setLength((Long)null);
+ }else{
+ setLength(length.longValue());
+ }
+ }
+
+ public void setLength(Long length) {
if (length != null) {
parameters.put(KEY_LENGTH, length);
} else {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java
index c024e7637..26965c891 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTBTClientState.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.rpc.enums.TBTState;
-import com.smartdevicelink.util.DebugTool;
/**
* <p>Notifies the application of the current TBT client status on the module.</p>
@@ -45,7 +44,7 @@ public class OnTBTClientState extends RPCNotification {
*Constructs a newly allocated OnTBTClientState object
*/
public OnTBTClientState() {
- super(FunctionID.ON_TBT_CLIENT_STATE);
+ super(FunctionID.ON_TBT_CLIENT_STATE.toString());
}
/**
*<p>Constructs a newly allocated OnTBTClientState object indicated by the Hashtable parameter</p>
@@ -63,13 +62,7 @@ public class OnTBTClientState extends RPCNotification {
if (obj instanceof TBTState) {
return (TBTState)obj;
} else if(obj instanceof String) {
- TBTState theCode = null;
- try{
- theCode = TBTState.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_STATE, e);
- }
- return theCode;
+ return TBTState.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTouchEvent.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTouchEvent.java
index 5200ab1a3..47ecc30a3 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTouchEvent.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnTouchEvent.java
@@ -1,20 +1,19 @@
package com.smartdevicelink.proxy.rpc;
-import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.rpc.enums.TouchType;
-import com.smartdevicelink.util.DebugTool;
-
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+import com.smartdevicelink.proxy.rpc.enums.TouchType;
+
public class OnTouchEvent extends RPCNotification {
public static final String KEY_EVENT = "event";
public static final String KEY_TYPE = "type";
public OnTouchEvent() {
- super(FunctionID.ON_TOUCH_EVENT);
+ super(FunctionID.ON_TOUCH_EVENT.toString());
}
public OnTouchEvent(Hashtable<String, Object> hash) {
super(hash);
@@ -33,13 +32,7 @@ public class OnTouchEvent extends RPCNotification {
if (obj instanceof TouchType) {
return (TouchType) obj;
} else if (obj instanceof String) {
- TouchType theCode = null;
- try {
- theCode = TouchType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TYPE, e);
- }
- return theCode;
+ return TouchType.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java
index 56ba0e0d8..ec50e659e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/OnVehicleData.java
@@ -39,7 +39,7 @@ public class OnVehicleData extends RPCNotification {
public static final String KEY_MY_KEY = "myKey";
public OnVehicleData() {
- super(FunctionID.ON_VEHICLE_DATA);
+ super(FunctionID.ON_VEHICLE_DATA.toString());
}
public OnVehicleData(Hashtable<String, Object> hash) {
super(hash);
@@ -101,27 +101,11 @@ public class OnVehicleData extends RPCNotification {
}
@Deprecated
public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevel_State);
- } else {
- parameters.remove(KEY_FUEL_LEVEL_STATE);
- }
+ setFuelLevelState(fuelLevel_State);
}
@Deprecated
public ComponentVolumeStatus getFuelLevel_State() {
- Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
- if (obj instanceof ComponentVolumeStatus) {
- return (ComponentVolumeStatus) obj;
- } else if (obj instanceof String) {
- ComponentVolumeStatus theCode = null;
- try {
- theCode = ComponentVolumeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL_STATE, e);
- }
- return theCode;
- }
- return null;
+ return getFuelLevelState();
}
public void setFuelLevelState(ComponentVolumeStatus fuelLevelState) {
if (fuelLevelState != null) {
@@ -189,13 +173,7 @@ public class OnVehicleData extends RPCNotification {
if (obj instanceof PRNDL) {
return (PRNDL) obj;
} else if (obj instanceof String) {
- PRNDL theCode = null;
- try {
- theCode = PRNDL.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PRNDL, e);
- }
- return theCode;
+ return PRNDL.valueForString((String) obj);
}
return null;
}
@@ -305,13 +283,7 @@ public class OnVehicleData extends RPCNotification {
if (obj instanceof VehicleDataEventStatus) {
return (VehicleDataEventStatus) obj;
} else if (obj instanceof String) {
- VehicleDataEventStatus theCode = null;
- try {
- theCode = VehicleDataEventStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DRIVER_BRAKING, e);
- }
- return theCode;
+ return VehicleDataEventStatus.valueForString((String) obj);
}
return null;
}
@@ -327,13 +299,7 @@ public class OnVehicleData extends RPCNotification {
if (obj instanceof WiperStatus) {
return (WiperStatus) obj;
} else if (obj instanceof String) {
- WiperStatus theCode = null;
- try {
- theCode = WiperStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_WIPER_STATUS, e);
- }
- return theCode;
+ return WiperStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java
index b6c6f4fe9..4ba1658b2 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThru.java
@@ -9,7 +9,6 @@ import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.AudioType;
import com.smartdevicelink.proxy.rpc.enums.BitsPerSample;
import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
-import com.smartdevicelink.util.DebugTool;
/**
* This will open an audio pass thru session. By doing so the app can receive
@@ -37,7 +36,7 @@ public class PerformAudioPassThru extends RPCRequest {
* Constructs a new PerformAudioPassThru object
*/
public PerformAudioPassThru() {
- super(FunctionID.PERFORM_AUDIO_PASS_THRU);
+ super(FunctionID.PERFORM_AUDIO_PASS_THRU.toString());
}
/**
@@ -184,13 +183,7 @@ public class PerformAudioPassThru extends RPCRequest {
if (obj instanceof SamplingRate) {
return (SamplingRate) obj;
} else if (obj instanceof String) {
- SamplingRate theCode = null;
- try {
- theCode = SamplingRate.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SAMPLING_RATE, e);
- }
- return theCode;
+ return SamplingRate.valueForString((String) obj);
}
return null;
}
@@ -246,13 +239,7 @@ public class PerformAudioPassThru extends RPCRequest {
if (obj instanceof BitsPerSample) {
return (BitsPerSample) obj;
} else if (obj instanceof String) {
- BitsPerSample theCode = null;
- try {
- theCode = BitsPerSample.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BITS_PER_SAMPLE, e);
- }
- return theCode;
+ return BitsPerSample.valueForString((String) obj);
}
return null;
}
@@ -281,13 +268,7 @@ public class PerformAudioPassThru extends RPCRequest {
if (obj instanceof AudioType) {
return (AudioType) obj;
} else if (obj instanceof String) {
- AudioType theCode = null;
- try {
- theCode = AudioType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_AUDIO_TYPE, e);
- }
- return theCode;
+ return AudioType.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java
index f23513994..7ba905f96 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformAudioPassThruResponse.java
@@ -16,7 +16,7 @@ public class PerformAudioPassThruResponse extends RPCResponse {
* Constructs a new PerformAudioPassThruResponse object
*/
public PerformAudioPassThruResponse() {
- super(FunctionID.PERFORM_AUDIO_PASS_THRU);
+ super(FunctionID.PERFORM_AUDIO_PASS_THRU.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java
index 728b6a565..3c6ed46a5 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteraction.java
@@ -8,7 +8,6 @@ import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.InteractionMode;
import com.smartdevicelink.proxy.rpc.enums.LayoutMode;
-import com.smartdevicelink.util.DebugTool;
/**
* Performs an application-initiated interaction in which the user can select a
* {@linkplain Choice} from among the specified Choice Sets. For instance, an
@@ -39,7 +38,7 @@ public class PerformInteraction extends RPCRequest {
* Constructs a new PerformInteraction object
*/
public PerformInteraction() {
- super(FunctionID.PERFORM_INTERACTION);
+ super(FunctionID.PERFORM_INTERACTION.toString());
}
/**
* Constructs a new PerformInteraction object indicated by the Hashtable
@@ -133,13 +132,7 @@ public class PerformInteraction extends RPCRequest {
if (obj instanceof InteractionMode) {
return (InteractionMode) obj;
} else if (obj instanceof String) {
- InteractionMode theCode = null;
- try {
- theCode = InteractionMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_INTERACTION_MODE, e);
- }
- return theCode;
+ return InteractionMode.valueForString((String) obj);
}
return null;
}
@@ -379,13 +372,7 @@ public class PerformInteraction extends RPCRequest {
if (obj instanceof LayoutMode) {
return (LayoutMode) obj;
} else if (obj instanceof String) {
- LayoutMode theCode = null;
- try {
- theCode = LayoutMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_INTERACTION_LAYOUT, e);
- }
- return theCode;
+ return LayoutMode.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java
index 2aefd8bf3..c0c212a85 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PerformInteractionResponse.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCResponse;
import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-import com.smartdevicelink.util.DebugTool;
/**
* PerformInteraction Response is sent, when PerformInteraction has been called
@@ -21,7 +20,7 @@ public class PerformInteractionResponse extends RPCResponse {
* Constructs a new PerformInteractionResponse object
*/
public PerformInteractionResponse() {
- super(FunctionID.PERFORM_INTERACTION);
+ super(FunctionID.PERFORM_INTERACTION.toString());
}
/**
@@ -62,13 +61,7 @@ public class PerformInteractionResponse extends RPCResponse {
if (obj instanceof TriggerSource) {
return (TriggerSource) obj;
} else if (obj instanceof String) {
- TriggerSource theCode = null;
- try {
- theCode = TriggerSource.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TRIGGER_SOURCE, e);
- }
- return theCode;
+ return TriggerSource.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFile.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFile.java
index cc91682eb..2f76f862a 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFile.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFile.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.util.DebugTool;
/**
* Used to push a binary data onto the SDL module from a mobile device, such as
@@ -29,7 +28,7 @@ public class PutFile extends RPCRequest {
* Constructs a new PutFile object
*/
public PutFile() {
- super(FunctionID.PUT_FILE);
+ super(FunctionID.PUT_FILE.toString());
}
/**
@@ -92,13 +91,7 @@ public class PutFile extends RPCRequest {
if (obj instanceof FileType) {
return (FileType) obj;
} else if (obj instanceof String) {
- FileType theCode = null;
- try {
- theCode = FileType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FILE_TYPE, e);
- }
- return theCode;
+ return FileType.valueForString((String) obj);
}
return null;
}
@@ -141,7 +134,19 @@ public class PutFile extends RPCRequest {
return getBulkData();
}
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param offset
+ */
public void setOffset(Integer offset) {
+ if(offset == null){
+ setOffset((Long)null);
+ }else{
+ setOffset(offset.longValue());
+ }
+ }
+
+ public void setOffset(Long offset) {
if (offset != null) {
parameters.put(KEY_OFFSET, offset);
} else {
@@ -149,16 +154,34 @@ public class PutFile extends RPCRequest {
}
}
- public Integer getOffset() {
+ public Long getOffset() {
final Object o = parameters.get(KEY_OFFSET);
+ if (o == null){
+ return null;
+ }
if (o instanceof Integer) {
- return (Integer) o;
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
}
+
return null;
}
+ /**
+ * @deprecated as of SmartDeviceLink 4.0
+ * @param length
+ */
public void setLength(Integer length) {
+ if(length == null){
+ setLength((Long)null);
+ }else{
+ setLength(length.longValue());
+ }
+ }
+
+ public void setLength(Long length) {
if (length != null) {
parameters.put(KEY_LENGTH, length);
} else {
@@ -166,10 +189,15 @@ public class PutFile extends RPCRequest {
}
}
- public Integer getLength() {
+ public Long getLength() {
final Object o = parameters.get(KEY_LENGTH);
+ if (o == null){
+ return null;
+ }
if (o instanceof Integer) {
- return (Integer) o;
+ return ((Integer) o).longValue();
+ }else if(o instanceof Long){
+ return (Long) o;
}
return null;
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java
index d37b5b62e..88c0560b3 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/PutFileResponse.java
@@ -17,7 +17,7 @@ public class PutFileResponse extends RPCResponse {
* Constructs a new PutFileResponse object
*/
public PutFileResponse() {
- super(FunctionID.PUT_FILE);
+ super(FunctionID.PUT_FILE.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDID.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDID.java
index b3212eb09..f165ae050 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDID.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDID.java
@@ -26,7 +26,7 @@ public class ReadDID extends RPCRequest {
* Constructs a new ReadDID object
*/
public ReadDID() {
- super(FunctionID.READ_DID);
+ super(FunctionID.READ_DID.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java
index 8f3bd0f8a..b21395b48 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ReadDIDResponse.java
@@ -6,7 +6,6 @@ import java.util.List;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.rpc.DIDResult;
/**
* Read DID Response is sent, when ReadDID has been called
@@ -17,7 +16,7 @@ public class ReadDIDResponse extends RPCResponse {
public static final String KEY_DID_RESULT = "didResult";
public ReadDIDResponse() {
- super(FunctionID.READ_DID);
+ super(FunctionID.READ_DID.toString());
}
public ReadDIDResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java
index 0b01ba3a1..8af901be3 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterface.java
@@ -8,7 +8,6 @@ import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.util.DebugTool;
/**
* Registers the application's interface with SDL&reg;, declaring properties of
* the registration, including the messaging interface version, the app name,
@@ -97,7 +96,7 @@ public class RegisterAppInterface extends RPCRequest {
* Constructs a new RegisterAppInterface object
*/
public RegisterAppInterface() {
- super(FunctionID.REGISTER_APP_INTERFACE);
+ super(FunctionID.REGISTER_APP_INTERFACE.toString());
}
/**
* Constructs a new RegisterAppInterface object indicated by the Hashtable
@@ -367,13 +366,7 @@ public class RegisterAppInterface extends RPCRequest {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LANGUAGE_DESIRED, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
@@ -408,13 +401,7 @@ public class RegisterAppInterface extends RPCRequest {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HMI_DISPLAY_LANGUAGE_DESIRED, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
@@ -456,11 +443,7 @@ public class RegisterAppInterface extends RPCRequest {
List<AppHMIType> newList = new ArrayList<AppHMIType>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- AppHMIType toAdd = null;
- try {
- toAdd = AppHMIType.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_APP_HMI_TYPE, e); }
+ AppHMIType toAdd = AppHMIType.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
index 5ae153103..05a96160c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
@@ -12,7 +12,6 @@ import com.smartdevicelink.proxy.rpc.enums.Language;
import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
import com.smartdevicelink.proxy.rpc.enums.VrCapabilities;
-import com.smartdevicelink.util.DebugTool;
/**
* Register AppInterface Response is sent, when RegisterAppInterface has been called
@@ -20,25 +19,30 @@ import com.smartdevicelink.util.DebugTool;
* @since SmartDeviceLink 1.0
*/
public class RegisterAppInterfaceResponse extends RPCResponse {
- public static final String KEY_VEHICLE_TYPE = "vehicleType";
- public static final String KEY_SPEECH_CAPABILITIES = "speechCapabilities";
- public static final String KEY_VR_CAPABILITIES = "vrCapabilities";
+ public static final String KEY_VEHICLE_TYPE = "vehicleType";
+ public static final String KEY_SPEECH_CAPABILITIES = "speechCapabilities";
+ public static final String KEY_VR_CAPABILITIES = "vrCapabilities";
public static final String KEY_AUDIO_PASS_THRU_CAPABILITIES = "audioPassThruCapabilities";
- public static final String KEY_HMI_ZONE_CAPABILITIES = "hmiZoneCapabilities";
- public static final String KEY_PRERECORDED_SPEECH = "prerecordedSpeech";
- public static final String KEY_SUPPORTED_DIAG_MODES = "supportedDiagModes";
- public static final String KEY_SDL_MSG_VERSION = "syncMsgVersion";
- public static final String KEY_LANGUAGE = "language";
- public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
- public static final String KEY_DISPLAY_CAPABILITIES = "displayCapabilities";
- public static final String KEY_HMI_DISPLAY_LANGUAGE = "hmiDisplayLanguage";
- public static final String KEY_SOFT_BUTTON_CAPABILITIES = "softButtonCapabilities";
- public static final String KEY_PRESET_BANK_CAPABILITIES = "presetBankCapabilities";
+ public static final String KEY_HMI_ZONE_CAPABILITIES = "hmiZoneCapabilities";
+ public static final String KEY_PRERECORDED_SPEECH = "prerecordedSpeech";
+ public static final String KEY_SUPPORTED_DIAG_MODES = "supportedDiagModes";
+ public static final String KEY_SDL_MSG_VERSION = "syncMsgVersion";
+ public static final String KEY_LANGUAGE = "language";
+ public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
+ public static final String KEY_DISPLAY_CAPABILITIES = "displayCapabilities";
+ public static final String KEY_HMI_DISPLAY_LANGUAGE = "hmiDisplayLanguage";
+ public static final String KEY_SOFT_BUTTON_CAPABILITIES = "softButtonCapabilities";
+ public static final String KEY_PRESET_BANK_CAPABILITIES = "presetBankCapabilities";
+ public static final String KEY_HMI_CAPABILITIES = "hmiCapabilities"; //As of v4.0
+ public static final String KEY_SDL_VERSION = "sdlVersion"; //As of v4.0
+ public static final String KEY_SYSTEM_SOFTWARE_VERSION = "systemSoftwareVersion"; //As of v4.0
+
+
/**
* Constructs a new RegisterAppInterfaceResponse object
*/
public RegisterAppInterfaceResponse() {
- super(FunctionID.REGISTER_APP_INTERFACE);
+ super(FunctionID.REGISTER_APP_INTERFACE.toString());
}
/**
@@ -108,13 +112,7 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_LANGUAGE, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
@@ -150,13 +148,7 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
if (obj instanceof Language) {
return (Language) obj;
} else if (obj instanceof String) {
- Language theCode = null;
- try {
- theCode = Language.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HMI_DISPLAY_LANGUAGE, e);
- }
- return theCode;
+ return Language.valueForString((String) obj);
}
return null;
}
@@ -318,12 +310,7 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
List<HmiZoneCapabilities> newList = new ArrayList<HmiZoneCapabilities>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- HmiZoneCapabilities toAdd = null;
- try {
- toAdd = HmiZoneCapabilities.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_HMI_ZONE_CAPABILITIES, e);
- }
+ HmiZoneCapabilities toAdd = HmiZoneCapabilities.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
@@ -363,12 +350,7 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
List<SpeechCapabilities> newList = new ArrayList<SpeechCapabilities>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- SpeechCapabilities toAdd = null;
- try {
- toAdd = SpeechCapabilities.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SPEECH_CAPABILITIES, e);
- }
+ SpeechCapabilities toAdd = SpeechCapabilities.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
@@ -404,12 +386,7 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
List<PrerecordedSpeech> newList = new ArrayList<PrerecordedSpeech>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- PrerecordedSpeech toAdd = null;
- try {
- toAdd = PrerecordedSpeech.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PRERECORDED_SPEECH, e);
- }
+ PrerecordedSpeech toAdd = PrerecordedSpeech.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
@@ -447,12 +424,7 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
List<VrCapabilities> newList = new ArrayList<VrCapabilities>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- VrCapabilities toAdd = null;
- try {
- toAdd = VrCapabilities.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_VR_CAPABILITIES, e);
- }
+ VrCapabilities toAdd = VrCapabilities.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
@@ -566,5 +538,48 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
}
}
return null;
- }
+ }
+
+ public void setHmiCapabilities(HMICapabilities hmiCapabilities) {
+ if (hmiCapabilities != null) {
+ parameters.put(KEY_HMI_CAPABILITIES, hmiCapabilities);
+ }else{
+ parameters.remove(KEY_HMI_CAPABILITIES);
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ public HMICapabilities getHmiCapabilities() {
+ Object obj = parameters.get(KEY_HMI_CAPABILITIES);
+ if (obj instanceof HMICapabilities) {
+ return (HMICapabilities)obj;
+ } else if (obj instanceof Hashtable) {
+ return new HMICapabilities((Hashtable<String, Object>)obj);
+ }
+ return null;
+ }
+
+ public void setSdlVersion(String sdlVersion) {
+ if (sdlVersion != null) {
+ parameters.put(KEY_SDL_VERSION, sdlVersion);
+ }else{
+ parameters.remove(KEY_SDL_VERSION);
+ }
+ }
+
+ public String getSdlVersion() {
+ return (String) parameters.get(KEY_SDL_VERSION);
+ }
+
+ public void setSystemSoftwareVersion(String systemSoftwareVersion) {
+ if (systemSoftwareVersion != null) {
+ parameters.put(KEY_SYSTEM_SOFTWARE_VERSION, systemSoftwareVersion);
+ }else{
+ parameters.remove(KEY_SYSTEM_SOFTWARE_VERSION);
+ }
+ }
+
+ public String getSystemSoftwareVersion() {
+ return (String) parameters.get(KEY_SYSTEM_SOFTWARE_VERSION);
+ }
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java
index 855cd2672..1121ce2c8 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalProperties.java
@@ -7,7 +7,6 @@ import java.util.List;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.GlobalProperty;
-import com.smartdevicelink.util.DebugTool;
/**
* Resets the passed global properties to their default values as defined by
* SDL
@@ -30,7 +29,7 @@ public class ResetGlobalProperties extends RPCRequest {
* Constructs a new ResetGlobalProperties object
*/
public ResetGlobalProperties() {
- super(FunctionID.RESET_GLOBAL_PROPERTIES);
+ super(FunctionID.RESET_GLOBAL_PROPERTIES.toString());
}
/**
* Constructs a new ResetGlobalProperties object indicated by the Hashtable
@@ -62,12 +61,7 @@ public class ResetGlobalProperties extends RPCRequest {
List<GlobalProperty> newList = new ArrayList<GlobalProperty>();
for (Object hashObj : list) {
String strFormat = (String)hashObj;
- GlobalProperty toAdd = null;
- try {
- toAdd = GlobalProperty.valueForString(strFormat);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PROPERTIES, e);
- }
+ GlobalProperty toAdd = GlobalProperty.valueForString(strFormat);
if (toAdd != null) {
newList.add(toAdd);
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java
index 0fe7f0d80..3390fb814 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ResetGlobalPropertiesResponse.java
@@ -16,7 +16,7 @@ public class ResetGlobalPropertiesResponse extends RPCResponse {
* Constructs a new ResetGlobalPropertiesResponse object
*/
public ResetGlobalPropertiesResponse() {
- super(FunctionID.RESET_GLOBAL_PROPERTIES);
+ super(FunctionID.RESET_GLOBAL_PROPERTIES.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java
index 22eb073cf..3f9e75cce 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessage.java
@@ -25,7 +25,7 @@ public class ScrollableMessage extends RPCRequest {
* Constructs a new ScrollableMessage object
*/
public ScrollableMessage() {
- super(FunctionID.SCROLLABLE_MESSAGE);
+ super(FunctionID.SCROLLABLE_MESSAGE.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java
index f1f5b8a03..970782f35 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ScrollableMessageResponse.java
@@ -16,7 +16,7 @@ public class ScrollableMessageResponse extends RPCResponse {
* Constructs a new ScrollableMessageResponse object
*/
public ScrollableMessageResponse() {
- super(FunctionID.SCROLLABLE_MESSAGE);
+ super(FunctionID.SCROLLABLE_MESSAGE.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocation.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocation.java
index cd37eea74..0257a4c1c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocation.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocation.java
@@ -5,6 +5,7 @@ import java.util.List;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.util.SdlDataTypeConverter;
/**
@@ -27,7 +28,7 @@ public class SendLocation extends RPCRequest{
* Constructs a new SendLocation object
*/
public SendLocation(){
- super(FunctionID.SEND_LOCATION);
+ super(FunctionID.SEND_LOCATION.toString());
}
/**
@@ -44,17 +45,24 @@ public class SendLocation extends RPCRequest{
/**
* Getter for longitude of the location to send.
+ *
+ * <p><b>IMPORTANT NOTE:</b> A previous version of this method call returned a Float
+ * value, however, it has been changed to return a Double. This will compile,
+ * but cause a ClassCastException if your value is not also a Double type.
+ * @since SmartDeviceLink v4.0
+ *
* @return The longitude of the location
*/
- public Float getLongitudeDegrees(){
- return (Float) parameters.get(KEY_LON_DEGREES);
+ public Double getLongitudeDegrees(){
+ Object value = parameters.get(KEY_LON_DEGREES);
+ return SdlDataTypeConverter.objectToDouble(value);
}
/**
* Setter for longitude of the location to send.
* @param longitudeDegrees
*/
- public void setLongitudeDegrees(Float longitudeDegrees){
+ public void setLongitudeDegrees(Double longitudeDegrees){
if(longitudeDegrees != null){
parameters.put(KEY_LON_DEGREES, longitudeDegrees);
}
@@ -65,17 +73,24 @@ public class SendLocation extends RPCRequest{
/**
* Getter for latitude of the location to send.
+ *
+ * <p><b>IMPORTANT NOTE:</b> A previous version of this method call returned a Float
+ * value, however, it has been changed to return a Double. This will compile,
+ * but cause a ClassCastException if your value is not also a Double type.
+ * @since SmartDeviceLink v4.0
+ *
* @return The latitude of the location
*/
- public Float getLatitudeDegrees(){
- return (Float) parameters.get(KEY_LAT_DEGREES);
+ public Double getLatitudeDegrees(){
+ Object value = parameters.get(KEY_LAT_DEGREES);
+ return SdlDataTypeConverter.objectToDouble(value);
}
/**
* Setter for latitude of the location to send.
* @param latitudeDegrees
*/
- public void setLatitudeDegrees(Float latitudeDegrees){
+ public void setLatitudeDegrees(Double latitudeDegrees){
if(latitudeDegrees != null){
parameters.put(KEY_LAT_DEGREES, latitudeDegrees);
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocationResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocationResponse.java
index 32037188c..dcee04e9a 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocationResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SendLocationResponse.java
@@ -13,7 +13,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class SendLocationResponse extends RPCResponse{
public SendLocationResponse(){
- super(FunctionID.SEND_LOCATION);
+ super(FunctionID.SEND_LOCATION.toString());
}
public SendLocationResponse(Hashtable<String, Object> hash){
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java
index 4eb2ce3ec..1a5d5a22e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIcon.java
@@ -19,7 +19,7 @@ public class SetAppIcon extends RPCRequest {
* Constructs a new SetAppIcon object
*/
public SetAppIcon() {
- super(FunctionID.SET_APP_ICON);
+ super(FunctionID.SET_APP_ICON.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java
index 3af51b2a6..9d154bebf 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetAppIconResponse.java
@@ -8,7 +8,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class SetAppIconResponse extends RPCResponse {
public SetAppIconResponse() {
- super(FunctionID.SET_APP_ICON);
+ super(FunctionID.SET_APP_ICON.toString());
}
public SetAppIconResponse(Hashtable<String, Object> hash) {
super(hash);
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java
index d62d4f6a4..ec3b1e62e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayout.java
@@ -18,7 +18,7 @@ public class SetDisplayLayout extends RPCRequest {
* Constructs a new SetDisplayLayout object
*/
public SetDisplayLayout() {
- super(FunctionID.SET_DISPLAY_LAYOUT);
+ super(FunctionID.SET_DISPLAY_LAYOUT.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java
index b531b2bc1..787bdd9f7 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetDisplayLayoutResponse.java
@@ -22,7 +22,7 @@ public class SetDisplayLayoutResponse extends RPCResponse {
* Constructs a new SetDisplayLayoutResponse object
*/
public SetDisplayLayoutResponse() {
- super(FunctionID.SET_DISPLAY_LAYOUT);
+ super(FunctionID.SET_DISPLAY_LAYOUT.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java
index f4c4dee71..be1f13bb8 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalProperties.java
@@ -29,7 +29,7 @@ public class SetGlobalProperties extends RPCRequest {
* Constructs a new SetGlobalProperties object
*/
public SetGlobalProperties() {
- super(FunctionID.SET_GLOBAL_PROPERTIES);
+ super(FunctionID.SET_GLOBAL_PROPERTIES.toString());
}
/**
* Constructs a new SetGlobalProperties object indicated by the Hashtable
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java
index 00d4b9e61..bef494e69 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetGlobalPropertiesResponse.java
@@ -16,7 +16,7 @@ public class SetGlobalPropertiesResponse extends RPCResponse {
* Constructs a new SetGlobalPropertiesResponse object
*/
public SetGlobalPropertiesResponse() {
- super(FunctionID.SET_GLOBAL_PROPERTIES);
+ super(FunctionID.SET_GLOBAL_PROPERTIES.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java
index c240b812a..2b8f33365 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimer.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
-import com.smartdevicelink.util.DebugTool;
/**
* Sets the media clock/timer value and the update method (e.g.count-up,
* count-down, etc.)
@@ -24,7 +23,7 @@ public class SetMediaClockTimer extends RPCRequest {
* Constructs a new SetMediaClockTimer object
*/
public SetMediaClockTimer() {
- super(FunctionID.SET_MEDIA_CLOCK_TIMER);
+ super(FunctionID.SET_MEDIA_CLOCK_TIMER.toString());
}
/**
* Constructs a new SetMediaClockTimer object indicated by the Hashtable
@@ -103,13 +102,7 @@ public class SetMediaClockTimer extends RPCRequest {
if (obj instanceof UpdateMode) {
return (UpdateMode) obj;
} else if (obj instanceof String) {
- UpdateMode theCode = null;
- try {
- theCode = UpdateMode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_UPDATE_MODE, e);
- }
- return theCode;
+ return UpdateMode.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java
index 43b10d3db..410b5b68c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SetMediaClockTimerResponse.java
@@ -16,7 +16,7 @@ public class SetMediaClockTimerResponse extends RPCResponse {
* Constructs a new SetMediaClockTimerResponse object
*/
public SetMediaClockTimerResponse() {
- super(FunctionID.SET_MEDIA_CLOCK_TIMER);
+ super(FunctionID.SET_MEDIA_CLOCK_TIMER.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Show.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Show.java
index e278586c8..9782b0e7f 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Show.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Show.java
@@ -49,7 +49,7 @@ public class Show extends RPCRequest {
* Constructs a new Show object
*/
public Show() {
- super(FunctionID.SHOW);
+ super(FunctionID.SHOW.toString());
}
/**
* Constructs a new Show object indicated by the Hashtable parameter
@@ -217,13 +217,7 @@ public class Show extends RPCRequest {
if (obj instanceof TextAlignment) {
return (TextAlignment) obj;
} else if (obj instanceof String) {
- TextAlignment theCode = null;
- try {
- theCode = TextAlignment.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_ALIGNMENT, e);
- }
- return theCode;
+ return TextAlignment.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java
index e53851e94..293adddbe 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbt.java
@@ -38,7 +38,7 @@ public class ShowConstantTbt extends RPCRequest{
* Constructs a new ShowConstantTbt object
*/
public ShowConstantTbt(){
- super(FunctionID.SHOW_CONSTANT_TBT);
+ super(FunctionID.SHOW_CONSTANT_TBT.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java
index fb00da92e..a3e2dbaf1 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowConstantTbtResponse.java
@@ -13,7 +13,7 @@ import com.smartdevicelink.proxy.RPCResponse;
public class ShowConstantTbtResponse extends RPCResponse{
public ShowConstantTbtResponse() {
- super(FunctionID.SHOW_CONSTANT_TBT);
+ super(FunctionID.SHOW_CONSTANT_TBT.toString());
}
public ShowConstantTbtResponse(Hashtable<String, Object> hash) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowResponse.java
index 8f28e0df7..e12c09029 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/ShowResponse.java
@@ -16,7 +16,7 @@ public class ShowResponse extends RPCResponse {
* Constructs a new ShowResponse object
*/
public ShowResponse() {
- super(FunctionID.SHOW);
+ super(FunctionID.SHOW.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java
index 5df1b6e89..b9c7bafbc 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SingleTireStatus.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus;
-import com.smartdevicelink.util.DebugTool;
/**
* Tire pressure status of a single tire.
@@ -64,13 +63,7 @@ public class SingleTireStatus extends RPCStruct {
if (obj instanceof ComponentVolumeStatus) {
return (ComponentVolumeStatus) obj;
} else if (obj instanceof String) {
- ComponentVolumeStatus theCode = null;
- try {
- theCode = ComponentVolumeStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_STATUS, e);
- }
- return theCode;
+ return ComponentVolumeStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Slider.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Slider.java
index 47a6840d9..4cf914f43 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Slider.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Slider.java
@@ -29,7 +29,7 @@ public class Slider extends RPCRequest {
* Constructs a new Slider object
*/
public Slider() {
- super(FunctionID.SLIDER);
+ super(FunctionID.SLIDER.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SliderResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SliderResponse.java
index 8df4fc511..6d168b6ea 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SliderResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SliderResponse.java
@@ -17,7 +17,7 @@ public class SliderResponse extends RPCResponse {
* Constructs a new SliderResponse object
*/
public SliderResponse() {
- super(FunctionID.SLIDER);
+ super(FunctionID.SLIDER.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SoftButton.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SoftButton.java
index 794add817..5c2cec98a 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SoftButton.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SoftButton.java
@@ -32,13 +32,7 @@ public class SoftButton extends RPCStruct {
if (obj instanceof SoftButtonType) {
return (SoftButtonType) obj;
} else if (obj instanceof String) {
- SoftButtonType theCode = null;
- try {
- theCode = SoftButtonType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TYPE, e);
- }
- return theCode;
+ return SoftButtonType.valueForString((String) obj);
}
return null;
}
@@ -105,13 +99,7 @@ public class SoftButton extends RPCStruct {
if (obj instanceof SystemAction) {
return (SystemAction) obj;
} else if (obj instanceof String) {
- SystemAction theCode = null;
- try {
- theCode = SystemAction.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_SYSTEM_ACTION, e);
- }
- return theCode;
+ return SystemAction.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Speak.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Speak.java
index 5e74da031..27183af86 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Speak.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/Speak.java
@@ -79,7 +79,7 @@ public class Speak extends RPCRequest {
* Constructs a new Speak object
*/
public Speak() {
- super(FunctionID.SPEAK);
+ super(FunctionID.SPEAK.toString());
}
/**
* Constructs a new Speak object indicated by the Hashtable parameter
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java
index 700beda0b..3e7be103c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SpeakResponse.java
@@ -16,7 +16,7 @@ public class SpeakResponse extends RPCResponse {
* Constructs a new SpeakResponse object
*/
public SpeakResponse() {
- super(FunctionID.SPEAK);
+ super(FunctionID.SPEAK.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java
new file mode 100644
index 000000000..bd75bef6d
--- /dev/null
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java
@@ -0,0 +1,41 @@
+package com.smartdevicelink.proxy.rpc;
+
+import java.util.Hashtable;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+
+public class StreamRPCResponse extends RPCResponse {
+ public static final String KEY_FILENAME = "fileName";
+ public static final String KEY_FILESIZE = "fileSize";
+
+ public StreamRPCResponse() {
+ super(FunctionID.STREAM_RPC.toString());
+ }
+ public StreamRPCResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ public void setFileName(String fileName) {
+ if (fileName != null) {
+ parameters.put(KEY_FILENAME, fileName);
+ } else {
+ parameters.remove(KEY_FILENAME);
+ }
+ }
+ public String getFileName() {
+ return (String) parameters.get(KEY_FILENAME);
+ }
+
+ public void setFileSize(Long fileSize) {
+ if (fileSize != null) {
+ parameters.put(KEY_FILESIZE, fileSize);
+ } else {
+ parameters.remove(KEY_FILESIZE);
+ }
+ }
+ public Long getFileSize() {
+ return (Long) parameters.get(KEY_FILESIZE);
+ }
+
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java
index e0ea7dac1..9f09fb5fa 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButton.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
/**
* Establishes a subscription to button notifications for HMI buttons. Buttons
* are not necessarily physical buttons, but can also be "soft" buttons on a
@@ -63,7 +62,7 @@ public class SubscribeButton extends RPCRequest {
* Constructs a new SubscribeButton object
*/
public SubscribeButton() {
- super(FunctionID.SUBSCRIBE_BUTTON);
+ super(FunctionID.SUBSCRIBE_BUTTON.toString());
}
/**
* Constructs a new SubscribeButton object indicated by the Hashtable
@@ -85,13 +84,7 @@ public class SubscribeButton extends RPCRequest {
if (obj instanceof ButtonName) {
return (ButtonName) obj;
} else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BUTTON_NAME, e);
- }
- return theCode;
+ return ButtonName.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java
index cc70b95bd..b51f75eee 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeButtonResponse.java
@@ -16,7 +16,7 @@ public class SubscribeButtonResponse extends RPCResponse {
* Constructs a new SubscribeButtonResponse object
*/
public SubscribeButtonResponse() {
- super(FunctionID.SUBSCRIBE_BUTTON);
+ super(FunctionID.SUBSCRIBE_BUTTON.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
index 222e1a958..10333d3d0 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
@@ -51,7 +51,7 @@ public class SubscribeVehicleData extends RPCRequest {
* Constructs a new SubscribeVehicleData object
*/
public SubscribeVehicleData() {
- super(FunctionID.SUBSCRIBE_VEHICLE_DATA);
+ super(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString());
}
/**
@@ -171,11 +171,7 @@ public class SubscribeVehicleData extends RPCRequest {
*/
@Deprecated
public void setFuelLevel_State(Boolean fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevel_State);
- } else {
- parameters.remove(KEY_FUEL_LEVEL_STATE);
- }
+ setFuelLevelState(fuelLevel_State);
}
/**
@@ -187,7 +183,7 @@ public class SubscribeVehicleData extends RPCRequest {
*/
@Deprecated
public Boolean getFuelLevel_State() {
- return (Boolean) parameters.get(KEY_FUEL_LEVEL_STATE);
+ return getFuelLevelState();
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
index 76b62a050..327e0f7d6 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
@@ -41,7 +41,7 @@ public class SubscribeVehicleDataResponse extends RPCResponse {
* Constructs a new SubscribeVehicleDataResponse object
*/
public SubscribeVehicleDataResponse() {
- super(FunctionID.SUBSCRIBE_VEHICLE_DATA);
+ super(FunctionID.SUBSCRIBE_VEHICLE_DATA.toString());
}
/**
@@ -177,30 +177,15 @@ public class SubscribeVehicleDataResponse extends RPCResponse {
*/
@Deprecated
public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevel_State);
- } else {
- parameters.remove(KEY_FUEL_LEVEL_STATE);
- }
+ setFuelLevelState(fuelLevel_State);
}
/**
* Gets Fuel Level State
* @return VehicleDataResult
*/
@Deprecated
- @SuppressWarnings("unchecked")
public VehicleDataResult getFuelLevel_State() {
- Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable<String, Object>) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL_STATE, e);
- }
- }
- return null;
+ return getFuelLevelState();
}
/**
* Sets Fuel Level State
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequest.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequest.java
index 34603bd6e..94fe62353 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequest.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequest.java
@@ -1,12 +1,11 @@
package com.smartdevicelink.proxy.rpc;
+import java.util.Hashtable;
+import java.util.List;
+
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.RequestType;
-import com.smartdevicelink.util.DebugTool;
-
-import java.util.Hashtable;
-import java.util.List;
public class SystemRequest extends RPCRequest {
public static final String KEY_FILE_NAME = "fileName";
@@ -14,11 +13,11 @@ public class SystemRequest extends RPCRequest {
public static final String KEY_DATA = "data";
public SystemRequest() {
- super(FunctionID.SYSTEM_REQUEST);
+ super(FunctionID.SYSTEM_REQUEST.toString());
}
public SystemRequest(boolean bLegacy) {
- super(FunctionID.ENCODED_SYNC_P_DATA);
+ super(FunctionID.ENCODED_SYNC_P_DATA.toString());
}
public SystemRequest(Hashtable<String, Object> hash) {
@@ -64,15 +63,7 @@ public class SystemRequest extends RPCRequest {
if (obj instanceof RequestType) {
return (RequestType) obj;
} else if (obj instanceof String) {
- RequestType theCode = null;
- try {
- theCode = RequestType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError(
- "Failed to parse " + getClass().getSimpleName() + "." +
- KEY_REQUEST_TYPE, e);
- }
- return theCode;
+ return RequestType.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java
index 0f9307258..201c186c8 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/SystemRequestResponse.java
@@ -1,13 +1,13 @@
package com.smartdevicelink.proxy.rpc;
+import java.util.Hashtable;
+
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCResponse;
-import java.util.Hashtable;
-
public class SystemRequestResponse extends RPCResponse {
public SystemRequestResponse() {
- super(FunctionID.SYSTEM_REQUEST);
+ super(FunctionID.SYSTEM_REQUEST.toString());
}
public SystemRequestResponse(Hashtable<String, Object> hash) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TTSChunk.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TTSChunk.java
index 4b82d5b22..05bac01ab 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TTSChunk.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TTSChunk.java
@@ -4,7 +4,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
-import com.smartdevicelink.util.DebugTool;
/**
* Specifies what is to be spoken. This can be simply a text phrase, which SDL will speak according to its own rules.
@@ -79,13 +78,7 @@ public class TTSChunk extends RPCStruct {
if (obj instanceof SpeechCapabilities) {
return (SpeechCapabilities) obj;
} else if (obj instanceof String) {
- SpeechCapabilities theCode = null;
- try {
- theCode = SpeechCapabilities.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_TYPE, e);
- }
- return theCode;
+ return SpeechCapabilities.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TextField.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TextField.java
index 23932e6fc..ed128e0f5 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TextField.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TextField.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.CharacterSet;
import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
-import com.smartdevicelink.util.DebugTool;
/**
* Struct defining the characteristics of a displayed field on the HMI.
@@ -79,13 +78,7 @@ public class TextField extends RPCStruct {
if (obj instanceof TextFieldName) {
return (TextFieldName) obj;
} else if (obj instanceof String) {
- TextFieldName theCode = null;
- try {
- theCode = TextFieldName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_NAME, e);
- }
- return theCode;
+ return TextFieldName.valueForString((String) obj);
}
return null;
}
@@ -109,13 +102,7 @@ public class TextField extends RPCStruct {
if (obj instanceof CharacterSet) {
return (CharacterSet) obj;
} else if (obj instanceof String) {
- CharacterSet theCode = null;
- try {
- theCode = CharacterSet.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_CHARACTER_SET, e);
- }
- return theCode;
+ return CharacterSet.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TireStatus.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TireStatus.java
index 2ecf13154..4f42f7d25 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TireStatus.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TireStatus.java
@@ -31,13 +31,7 @@ public class TireStatus extends RPCStruct {
if (obj instanceof WarningLightStatus) {
return (WarningLightStatus) obj;
} else if (obj instanceof String) {
- WarningLightStatus theCode = null;
- try {
- theCode = WarningLightStatus.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_PRESSURE_TELL_TALE, e);
- }
- return theCode;
+ return WarningLightStatus.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TouchEvent.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TouchEvent.java
index 34fa27c53..a204fae8e 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TouchEvent.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/TouchEvent.java
@@ -10,41 +10,55 @@ public class TouchEvent extends RPCStruct {
public static final String KEY_ID = "id";
public static final String KEY_TS = "ts";
public static final String KEY_C = "c";
+
public TouchEvent() { }
public TouchEvent(Hashtable<String, Object> hash) {
super(hash);
}
+
public void setId(Integer id) {
if (id != null) {
store.put(KEY_ID, id);
} else {
store.remove(KEY_ID);
}
- }
+ }
+
public Integer getId() {
return (Integer) store.get(KEY_ID);
- }
+ }
+
@SuppressWarnings("unchecked")
- public List<Integer> getTs() {
+ public List<Long> getTs() {
if(store.get(KEY_TS) instanceof List<?>){
List<?> list = (List<?>)store.get(KEY_TS);
if(list != null && list.size()>0){
Object obj = list.get(0);
- if(obj instanceof Integer){
- return (List<Integer>) list;
- }
- }
+ if(obj instanceof Integer){ //Backwards case
+ int size = list.size();
+ List<Integer> listOfInt = (List<Integer>) list;
+ List<Long> listofLongs = new ArrayList<Long>(size);
+ for(int i = 0; i<size;i++){
+ listofLongs.add(listOfInt.get(i).longValue());
+ }
+ return listofLongs;
+ }else if(obj instanceof Long){
+ return (List<Long>) list;
+ }
+ }
}
return null;
}
- public void setTs(List<Integer> ts) {
+
+ public void setTs(List<Long> ts) {
if (ts != null) {
store.put(KEY_TS, ts);
} else {
store.remove(KEY_TS);
}
}
+
@SuppressWarnings("unchecked")
public List<TouchCoord> getC() {
if (store.get(KEY_C) instanceof List<?>) {
@@ -64,6 +78,7 @@ public class TouchEvent extends RPCStruct {
}
return null;
}
+
public void setC( List<TouchCoord> c ) {
if (c != null) {
store.put(KEY_C, c );
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java
index 5990f7a83..aafdb53f9 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterface.java
@@ -26,7 +26,7 @@ public class UnregisterAppInterface extends RPCRequest {
* Constructs a new UnregisterAppInterface object
*/
public UnregisterAppInterface() {
- super(FunctionID.UNREGISTER_APP_INTERFACE);
+ super(FunctionID.UNREGISTER_APP_INTERFACE.toString());
}
/**
* Constructs a new UnregisterAppInterface object indicated by the Hashtable
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java
index d9b56ca79..db425a503 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnregisterAppInterfaceResponse.java
@@ -16,7 +16,7 @@ public class UnregisterAppInterfaceResponse extends RPCResponse {
* Constructs a new UnregisterAppInterfaceResponse object
*/
public UnregisterAppInterfaceResponse() {
- super(FunctionID.UNREGISTER_APP_INTERFACE);
+ super(FunctionID.UNREGISTER_APP_INTERFACE.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java
index b48fa4475..7575fd84a 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButton.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.util.DebugTool;
/**
* Deletes a subscription to button notifications for the specified button. For
@@ -27,7 +26,7 @@ public class UnsubscribeButton extends RPCRequest {
* Constructs a new UnsubscribeButton object
*/
public UnsubscribeButton() {
- super(FunctionID.UNSUBSCRIBE_BUTTON);
+ super(FunctionID.UNSUBSCRIBE_BUTTON.toString());
}
/**
* Constructs a new UnsubscribeButton object indicated by the Hashtable
@@ -51,13 +50,7 @@ public class UnsubscribeButton extends RPCRequest {
if (obj instanceof ButtonName) {
return (ButtonName) obj;
} else if (obj instanceof String) {
- ButtonName theCode = null;
- try {
- theCode = ButtonName.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_BUTTON_NAME, e);
- }
- return theCode;
+ return ButtonName.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java
index 1d4c3e23a..58f7326e1 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeButtonResponse.java
@@ -16,7 +16,7 @@ public class UnsubscribeButtonResponse extends RPCResponse {
* Constructs a new UnsubscribeButtonResponse object
*/
public UnsubscribeButtonResponse() {
- super(FunctionID.UNSUBSCRIBE_BUTTON);
+ super(FunctionID.UNSUBSCRIBE_BUTTON.toString());
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
index 20f9e2e84..429049d59 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
@@ -49,7 +49,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
* Constructs a new UnsubscribeVehicleData object
*/
public UnsubscribeVehicleData() {
- super(FunctionID.UNSUBSCRIBE_VEHICLE_DATA);
+ super(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString());
}
/**
@@ -169,11 +169,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
*/
@Deprecated
public void setFuelLevel_State(Boolean fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevel_State);
- } else {
- parameters.remove(KEY_FUEL_LEVEL_STATE);
- }
+ setFuelLevelState(fuelLevel_State);
}
/**
@@ -185,7 +181,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
*/
@Deprecated
public Boolean getFuelLevel_State() {
- return (Boolean) parameters.get(KEY_FUEL_LEVEL_STATE);
+ return getFuelLevelState();
}
/**
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
index 1150a755b..9d2cbf5bb 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
@@ -41,7 +41,7 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse {
* Constructs a new UnsubscribeVehicleDataResponse object
*/
public UnsubscribeVehicleDataResponse() {
- super(FunctionID.UNSUBSCRIBE_VEHICLE_DATA);
+ super(FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString());
}
/**
@@ -177,30 +177,15 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse {
*/
@Deprecated
public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
- if (fuelLevel_State != null) {
- parameters.put(KEY_FUEL_LEVEL_STATE, fuelLevel_State);
- } else {
- parameters.remove(KEY_FUEL_LEVEL_STATE);
- }
+ setFuelLevel(fuelLevel_State);
}
/**
* Gets Fuel Level State
* @return VehicleDataResult
*/
@Deprecated
- @SuppressWarnings("unchecked")
public VehicleDataResult getFuelLevel_State() {
- Object obj = parameters.get(KEY_FUEL_LEVEL_STATE);
- if (obj instanceof VehicleDataResult) {
- return (VehicleDataResult) obj;
- } else if (obj instanceof Hashtable) {
- try {
- return new VehicleDataResult((Hashtable<String, Object>) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_FUEL_LEVEL_STATE, e);
- }
- }
- return null;
+ return getFuelLevelState();
}
/**
* Sets Fuel Level State
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java
index 442c0dee2..fd4f88fa8 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnList.java
@@ -27,7 +27,7 @@ public class UpdateTurnList extends RPCRequest{
* Constructs a new UpdateTurnList object
*/
public UpdateTurnList() {
- super(FunctionID.UPDATE_TURN_LIST);
+ super(FunctionID.UPDATE_TURN_LIST.toString());
}
/**
@@ -67,8 +67,8 @@ public class UpdateTurnList extends RPCRequest{
*/
@SuppressWarnings("unchecked")
public List<Turn> getTurnList(){
- if(parameters.get(KEY_SOFT_BUTTONS) instanceof List<?>){
- List<?> list = (List<?>) parameters.get(KEY_SOFT_BUTTONS);
+ if(parameters.get(KEY_TURN_LIST) instanceof List<?>){
+ List<?> list = (List<?>) parameters.get(KEY_TURN_LIST);
if(list != null && list.size() > 0){
Object obj = list.get(0);
if(obj instanceof Turn){
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java
index c62315188..add51c5a5 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/UpdateTurnListResponse.java
@@ -16,7 +16,7 @@ public class UpdateTurnListResponse extends RPCResponse{
* Constructs a new UpdateTurnListResponse object
*/
public UpdateTurnListResponse() {
- super(FunctionID.UPDATE_TURN_LIST);
+ super(FunctionID.UPDATE_TURN_LIST.toString());
}
public UpdateTurnListResponse(Hashtable<String, Object> hash) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java
index 8a9050d84..8939b4895 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/VehicleDataResult.java
@@ -5,7 +5,6 @@ import java.util.Hashtable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataResultCode;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataType;
-import com.smartdevicelink.util.DebugTool;
public class VehicleDataResult extends RPCStruct {
public static final String KEY_DATA_TYPE = "dataType";
@@ -27,13 +26,7 @@ public class VehicleDataResult extends RPCStruct {
if (obj instanceof VehicleDataType) {
return (VehicleDataType) obj;
} else if (obj instanceof String) {
- VehicleDataType theCode = null;
- try {
- theCode = VehicleDataType.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_DATA_TYPE, e);
- }
- return theCode;
+ return VehicleDataType.valueForString((String) obj);
}
return null;
}
@@ -49,13 +42,7 @@ public class VehicleDataResult extends RPCStruct {
if (obj instanceof VehicleDataResultCode) {
return (VehicleDataResultCode) obj;
} else if (obj instanceof String) {
- VehicleDataResultCode theCode = null;
- try {
- theCode = VehicleDataResultCode.valueForString((String) obj);
- } catch (Exception e) {
- DebugTool.logError("Failed to parse " + getClass().getSimpleName() + "." + KEY_RESULT_CODE, e);
- }
- return theCode;
+ return VehicleDataResultCode.valueForString((String) obj);
}
return null;
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java
index 9b20704b5..617fe9796 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/AppInterfaceUnregisteredReason.java
@@ -75,7 +75,14 @@ public enum AppInterfaceUnregisteredReason {
*
* @since SmartDeviceLink 2.0
*/
- APP_UNAUTHORIZED;
+ APP_UNAUTHORIZED,
+ /**
+ * The app has committed a protocol violation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ PROTOCOL_VIOLATION,
+ ;
public static AppInterfaceUnregisteredReason valueForString(String value) {
try{
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
index fb88cec4d..34971d10d 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
@@ -11,7 +11,14 @@ public enum ImageFieldName {
appIcon,
graphic,
showConstantTBTIcon,
- showConstantTBTNextTurnIcon;
+ showConstantTBTNextTurnIcon,
+ /**
+ * The optional image of a destination / location
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ locationImage,
+ ;
public static ImageFieldName valueForString(String value) {
try{
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java
index 89c1c5f7d..524ee632c 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/KeyboardEvent.java
@@ -5,7 +5,12 @@ public enum KeyboardEvent {
KEYPRESS,
ENTRY_SUBMITTED,
ENTRY_CANCELLED,
- ENTRY_ABORTED;
+ ENTRY_ABORTED,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ ENTRY_VOICE,
+ ;
public static KeyboardEvent valueForString(String value) {
try{
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/RequestType.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/RequestType.java
index eac743ee4..4fccffa14 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/RequestType.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/RequestType.java
@@ -7,7 +7,64 @@ public enum RequestType {
AUTH_REQUEST,
AUTH_CHALLENGE,
AUTH_ACK,
- PROPRIETARY;
+ PROPRIETARY,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ QUERY_APPS,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ LAUNCH_APP,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ LOCK_SCREEN_ICON_URL,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ TRAFFIC_MESSAGE_CHANNEL,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ DRIVER_PROFILE,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ VOICE_SEARCH,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ NAVIGATION,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ PHONE,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ CLIMATE,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ SETTINGS,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ VEHICLE_DIAGNOSTICS,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ EMERGENCY,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ MEDIA,
+ /**
+ * @since SmartDeviceLink 4.0
+ */
+ FOTA,
+ ;
public static RequestType valueForString(String value) {
try{
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/Result.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/Result.java
index 8cba57e39..557069c15 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/Result.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/Result.java
@@ -88,9 +88,12 @@ public enum Result {
*/
IN_USE,
/**
- * There is already an existing subscription for this item
+ *The user has turned off access to vehicle data, and it is globally unavailable to mobile applications.
*/
VEHICLE_DATA_NOT_ALLOWED,
+ /**
+ * The requested vehicle data is not available on this vehicle or is not published.
+ */
VEHICLE_DATA_NOT_AVAILABLE,
/**
* The requested operation was rejected. No attempt was made to perform the
@@ -114,18 +117,57 @@ public enum Result {
* information on supported buttons on the currently connected SDL platform
*/
UNSUPPORTED_RESOURCE,
+ /**
+ * A specified file could not be found on Sync.
+ */
FILE_NOT_FOUND,
+ /**
+ * Provided data is valid but something went wrong in the lower layers.
+ */
GENERIC_ERROR,
+ /**
+ * RPC is not authorized in local policy table.
+ */
DISALLOWED,
+ /**
+ * RPC is included in a functional group explicitly blocked by the user.
+ */
USER_DISALLOWED,
+ /**
+ * Overlay reached the maximum timeout and closed.
+ */
TIMED_OUT,
+ /**
+ * User selected to Cancel Route.
+ */
CANCEL_ROUTE,
+ /**
+ * The RPC (e.g. ReadDID) executed successfully but the data exceeded the platform maximum threshold and thus, only part of the data is available.
+ */
TRUNCATED_DATA,
+ /**
+ * The user interrupted the RPC (e.g. PerformAudioPassThru) and indicated to start over. Note, the app must issue the new RPC.
+ */
RETRY,
+ /**
+ * The RPC (e.g. SubscribeVehicleData) executed successfully but one or more items have a warning or failure.
+ */
WARNINGS,
+ /**
+ * The RPC (e.g. Slider) executed successfully and the user elected to save the current position / value.
+ */
SAVED,
+ /**
+ * The certificate provided during authentication is invalid.
+ */
INVALID_CERT,
+ /**
+ * The certificate provided during authentication is expired.
+ */
EXPIRED_CERT,
+ /**
+ * The provided hash ID does not match the hash of the current set of registered data or the core could not resume the previous data.
+ */
RESUME_FAILED;
public static Result valueForString(String value) {
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java
index f46494d0c..ac1ba6ac1 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/SdlDisconnectedReason.java
@@ -31,6 +31,9 @@ public enum SdlDisconnectedReason {
}
public static SdlDisconnectedReason convertAppInterfaceUnregisteredReason(AppInterfaceUnregisteredReason reason) {
+ if(reason == null){
+ return null;
+ }
SdlDisconnectedReason returnReason = SdlDisconnectedReason.DEFAULT;
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
index 26a3e9de2..073741e3a 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
@@ -24,7 +24,32 @@ public enum TextFieldName {
menuName,
secondaryText,
tertiaryText,
- menuTitle;
+ menuTitle,
+ /**
+ * Optional name / title of intended location for SendLocation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ locationName,
+ /**
+ * Optional description of intended location / establishment (if applicable) for SendLocation
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ locationDescription,
+ /**
+ * Optional location address (if applicable) for SendLocation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ addressLines,
+ /**
+ * Optional hone number of intended location / establishment (if applicable) for SendLocation.
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ phoneNumber,
+ ;
public static TextFieldName valueForString(String value) {
try{
diff --git a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java
index 2df9f3bae..8de4ca88f 100644
--- a/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java
+++ b/sdl_android_lib/src/com/smartdevicelink/proxy/rpc/enums/VehicleDataResultCode.java
@@ -2,6 +2,12 @@ package com.smartdevicelink.proxy.rpc.enums;
public enum VehicleDataResultCode {
SUCCESS,
+ /**
+ *DTC / DID request successful, however, not all active DTCs or full contents of DID location available
+ *
+ * @since SmartDeviceLink 4.0
+ */
+ TRUNCATED_DATA,
DISALLOWED,
USER_DISALLOWED,
INVALID_ID,
diff --git a/sdl_android_lib/src/com/smartdevicelink/streaming/AbstractPacketizer.java b/sdl_android_lib/src/com/smartdevicelink/streaming/AbstractPacketizer.java
index 65795d9de..6d47143e4 100644
--- a/sdl_android_lib/src/com/smartdevicelink/streaming/AbstractPacketizer.java
+++ b/sdl_android_lib/src/com/smartdevicelink/streaming/AbstractPacketizer.java
@@ -14,7 +14,7 @@ abstract public class AbstractPacketizer {
protected SessionType _session = null;
protected InputStream is = null;
- protected byte[] buffer = new byte[1488];
+ protected byte[] buffer = new byte[1000000];
protected boolean upts = false;
protected RPCRequest _request = null;
protected byte _wiproVersion = 1;
@@ -42,6 +42,10 @@ abstract public class AbstractPacketizer {
public abstract void stop();
+ public abstract void pause();
+
+ public abstract void resume();
+
protected static String printBuffer(byte[] buffer, int start,int end) {
String str = "";
for (int i=start;i<end;i++) str+=","+Integer.toHexString(buffer[i]&0xFF);
diff --git a/sdl_android_lib/src/com/smartdevicelink/streaming/StreamPacketizer.java b/sdl_android_lib/src/com/smartdevicelink/streaming/StreamPacketizer.java
index 36ad712d9..06a16ee1d 100644
--- a/sdl_android_lib/src/com/smartdevicelink/streaming/StreamPacketizer.java
+++ b/sdl_android_lib/src/com/smartdevicelink/streaming/StreamPacketizer.java
@@ -3,6 +3,7 @@ package com.smartdevicelink.streaming;
import java.io.IOException;
import java.io.InputStream;
+import com.smartdevicelink.SdlConnection.SdlConnection;
import com.smartdevicelink.protocol.ProtocolMessage;
import com.smartdevicelink.protocol.enums.SessionType;
@@ -10,10 +11,17 @@ public class StreamPacketizer extends AbstractPacketizer implements Runnable{
public final static String TAG = "StreamPacketizer";
- private Thread t = null;
+ private Thread t = null;
+ private final static int BUFF_READ_SIZE = 1000000;
+
+ public SdlConnection sdlConnection = null;
+ private Object mPauseLock;
+ private boolean mPaused;
public StreamPacketizer(IStreamListener streamListener, InputStream is, SessionType sType, byte rpcSessionID) throws IOException {
super(streamListener, is, sType, rpcSessionID);
+ mPauseLock = new Object();
+ mPaused = false;
}
public void start() throws IOException {
@@ -33,10 +41,24 @@ public class StreamPacketizer extends AbstractPacketizer implements Runnable{
public void run() {
int length;
+
+ try
+ {
+ while (t != null && !t.isInterrupted())
+ {
+ synchronized(mPauseLock)
+ {
+ while (mPaused)
+ {
+ try
+ {
+ mPauseLock.wait();
+ }
+ catch (InterruptedException e) {}
+ }
+ }
- try {
- while (!Thread.interrupted()) {
- length = is.read(buffer, 0, 1488);
+ length = is.read(buffer, 0, BUFF_READ_SIZE);
if (length >= 0) {
ProtocolMessage pm = new ProtocolMessage();
@@ -53,4 +75,19 @@ public class StreamPacketizer extends AbstractPacketizer implements Runnable{
e.printStackTrace();
}
}
+
+ @Override
+ public void pause() {
+ synchronized (mPauseLock) {
+ mPaused = true;
+ }
+ }
+
+ @Override
+ public void resume() {
+ synchronized (mPauseLock) {
+ mPaused = false;
+ mPauseLock.notifyAll();
+ }
+ }
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/streaming/StreamRPCPacketizer.java b/sdl_android_lib/src/com/smartdevicelink/streaming/StreamRPCPacketizer.java
index bac1ea466..1fdc50351 100644
--- a/sdl_android_lib/src/com/smartdevicelink/streaming/StreamRPCPacketizer.java
+++ b/sdl_android_lib/src/com/smartdevicelink/streaming/StreamRPCPacketizer.java
@@ -2,6 +2,7 @@ package com.smartdevicelink.streaming;
import java.io.IOException;
import java.io.InputStream;
+import java.util.Hashtable;
import com.smartdevicelink.marshal.JsonRPCMarshaller;
import com.smartdevicelink.protocol.ProtocolMessage;
@@ -9,45 +10,174 @@ import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.protocol.enums.MessageType;
import com.smartdevicelink.protocol.enums.SessionType;
import com.smartdevicelink.proxy.RPCRequest;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.proxy.SdlProxyBase;
+import com.smartdevicelink.proxy.interfaces.IProxyListenerBase;
+import com.smartdevicelink.proxy.interfaces.IPutFileResponseListener;
+import com.smartdevicelink.proxy.rpc.OnStreamRPC;
import com.smartdevicelink.proxy.rpc.PutFile;
+import com.smartdevicelink.proxy.rpc.PutFileResponse;
+import com.smartdevicelink.proxy.rpc.StreamRPCResponse;
+import com.smartdevicelink.proxy.rpc.enums.Result;
-public class StreamRPCPacketizer extends AbstractPacketizer implements Runnable{
+public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileResponseListener, Runnable{
- public final static String TAG = "StreamPacketizer";
- public final static int BUFF_READ_SIZE = 1000;
+ private Integer iInitialCorrID = 0;
+ private final static int BUFF_READ_SIZE = 1000000;
+ private Hashtable<Integer, OnStreamRPC> notificationList = new Hashtable<Integer, OnStreamRPC>();
+ private Thread thread = null;
+ private long lFileSize = 0;
+ private String sFileName;
+ private SdlProxyBase<IProxyListenerBase> _proxy;
+ private IProxyListenerBase _proxyListener;
- private Thread t = null;
+ private Object mPauseLock;
+ private boolean mPaused;
- public StreamRPCPacketizer(IStreamListener streamListener, InputStream is, RPCRequest request, SessionType sType, byte rpcSessionID, byte wiproVersion) throws IOException {
+ public StreamRPCPacketizer(SdlProxyBase<IProxyListenerBase> proxy, IStreamListener streamListener, InputStream is, RPCRequest request, SessionType sType, byte rpcSessionID, byte wiproVersion, long iLength) throws IOException {
super(streamListener, is, request, sType, rpcSessionID, wiproVersion);
+ lFileSize = iLength;
+ iInitialCorrID = request.getCorrelationID();
+ mPauseLock = new Object();
+ mPaused = false;
+ if (proxy != null)
+ {
+ _proxy = proxy;
+ _proxyListener = _proxy.getProxyListener();
+ _proxy.addPutFileResponseListener(this);
+ }
}
+ @Override
public void start() throws IOException {
- if (t == null) {
- t = new Thread(this);
- t.start();
+ if (thread == null) {
+ thread = new Thread(this);
+ thread.start();
}
}
+ @Override
public void stop() {
try {
is.close();
} catch (IOException ignore) {}
- t.interrupt();
- t = null;
+ if (thread != null)
+ {
+ thread.interrupt();
+ thread = null;
+ }
+ }
+
+ private void handleStreamSuccess(RPCResponse rpc, Long iSize)
+ {
+ StreamRPCResponse result = new StreamRPCResponse();
+ result.setSuccess(rpc.getSuccess());
+ result.setResultCode(rpc.getResultCode());
+ result.setInfo(rpc.getInfo());
+ result.setFileName(sFileName);
+ result.setFileSize(iSize);
+ result.setCorrelationID(iInitialCorrID);
+ if (_proxyListener != null)
+ _proxyListener.onStreamRPCResponse(result);
+ stop();
+ _proxy.remPutFileResponseListener(this);
+ return;
+ }
+
+ private void handleStreamException(RPCResponse rpc, Exception e, String error)
+ {
+ StreamRPCResponse result = new StreamRPCResponse();
+ result.setFileName(sFileName);
+ result.setCorrelationID(iInitialCorrID);
+ if (rpc != null)
+ {
+ result.setSuccess(rpc.getSuccess());
+ result.setResultCode(rpc.getResultCode());
+ result.setInfo(rpc.getInfo());
+ }
+ else
+ {
+ result.setSuccess(false);
+ result.setResultCode(Result.GENERIC_ERROR);
+ String sException = "";
+
+ if (e != null)
+ sException = sException + " " + e.toString();
+
+ sException = sException + " " + error;
+ result.setInfo(sException);
+ }
+ if (_proxyListener != null)
+ _proxyListener.onStreamRPCResponse(result);
+ if (e != null)
+ e.printStackTrace();
+ stop();
+ _proxy.remPutFileResponseListener(this);
+ return;
}
- public void run() {
+ @Override
+ public void pause() {
+ synchronized (mPauseLock) {
+ mPaused = true;
+ }
+ }
+
+ @Override
+ public void resume() {
+ synchronized (mPauseLock) {
+ mPaused = false;
+ mPauseLock.notifyAll();
+ }
+ }
+
+ public void run() {
int length;
+ byte[] msgBytes;
+ ProtocolMessage pm;
+ OnStreamRPC notification;
+ // Moves the current Thread into the background
+ android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
try {
int iCorrID = 0;
PutFile msg = (PutFile) _request;
- int iOffsetCounter = msg.getOffset();
+ long iOffsetCounter = msg.getOffset();
+ sFileName = msg.getSdlFileName();
+
+ if (lFileSize != 0)
+ {
+ Long iFileSize = (long) lFileSize;
+ //TODO: PutFile RPC needs to be updated to accept Long as we might run into overflows since a Long can store a wider range than an Integer
+ msg.setLength(iFileSize);
+ }
+ Long iFileLength = msg.getLength();
+ notificationList.clear();
+
+ //start reading from the stream at the given offset
+ long iSkipBytes = is.skip(iOffsetCounter);
+
+ if (iOffsetCounter != iSkipBytes)
+ {
+ handleStreamException(null,null," Error, PutFile offset invalid for file: " + sFileName);
+ }
+
while (!Thread.interrupted()) {
+ synchronized (mPauseLock)
+ {
+ while (mPaused)
+ {
+ try
+ {
+ mPauseLock.wait();
+ }
+ catch (InterruptedException e) {}
+ }
+ }
+
length = is.read(buffer, 0, BUFF_READ_SIZE);
if (length == -1)
@@ -56,30 +186,69 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements Runnable{
if (length >= 0) {
if (msg.getOffset() != 0)
- msg.setLength(null); //only need to send length when offset 0
+ msg.setLength((Long)null); //only need to send length when offset 0
- byte[] msgBytes = JsonRPCMarshaller.marshall(msg, _wiproVersion);
- ProtocolMessage pm = new ProtocolMessage();
+ msgBytes = JsonRPCMarshaller.marshall(msg, _wiproVersion);
+ pm = new ProtocolMessage();
pm.setData(msgBytes);
pm.setSessionID(_rpcSessionID);
pm.setMessageType(MessageType.RPC);
pm.setSessionType(_session);
- pm.setFunctionID(FunctionID.getFunctionID(msg.getFunctionName()));
+ pm.setFunctionID(FunctionID.getFunctionId(msg.getFunctionName()));
- pm.setBulkData(buffer, length);
+ if (buffer.length != length)
+ pm.setBulkData(buffer, length);
+ else
+ pm.setBulkDataNoCopy(buffer);
+
pm.setCorrID(msg.getCorrelationID());
- _streamListener.sendStreamPacket(pm);
-
+ notification = new OnStreamRPC();
+ notification.setFileName(msg.getSdlFileName());
+ notification.setFileSize(iFileLength);
iOffsetCounter = iOffsetCounter + length;
+ notification.setBytesComplete(iOffsetCounter);
+ notificationList.put(msg.getCorrelationID(),notification);
+
msg.setOffset(iOffsetCounter);
iCorrID = msg.getCorrelationID() + 1;
msg.setCorrelationID(iCorrID);
+
+ _streamListener.sendStreamPacket(pm);
}
}
- } catch (IOException e) {
- e.printStackTrace();
+ } catch (Exception e) {
+ handleStreamException(null, e, "");
+ }
+ }
+
+ @Override
+ public void onPutFileResponse(PutFileResponse response)
+ {
+ OnStreamRPC streamNote = notificationList.get(response.getCorrelationID());
+ if (streamNote == null) return;
+
+ if (response.getSuccess())
+ {
+ if (_proxyListener != null)
+ _proxyListener.onOnStreamRPC(streamNote);
+ }
+ else
+ {
+ handleStreamException(response, null, "");
+ }
+
+ if (response.getSuccess() && streamNote.getBytesComplete().equals(streamNote.getFileSize()) )
+ {
+ handleStreamSuccess(response, streamNote.getBytesComplete());
}
}
+
+ @Override
+ public void onPutFileStreamError(Exception e, String info)
+ {
+ if (thread != null)
+ handleStreamException(null, e, info);
+ }
}
diff --git a/sdl_android_lib/src/com/smartdevicelink/trace/SdlTrace.java b/sdl_android_lib/src/com/smartdevicelink/trace/SdlTrace.java
index e980ef372..770b6cc97 100644
--- a/sdl_android_lib/src/com/smartdevicelink/trace/SdlTrace.java
+++ b/sdl_android_lib/src/com/smartdevicelink/trace/SdlTrace.java
@@ -139,37 +139,37 @@ public class SdlTrace {
// Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: return Base64.encodeToString(data.getBytes(), Base64.DEFAULT);
} // end-method
- public static void logProxyEvent(String eventText, String token) {
+ public static boolean logProxyEvent(String eventText, String token) {
if (DiagLevel.getLevel(Mod.proxy) == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
+ return false;
+ }
String msg = SdlTrace.B64EncodeForXML(eventText);
String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proxy, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- writeXmlTraceMessage(xml);
- } // end-method
+ return writeXmlTraceMessage(xml);
+ }
- public static void logAppEvent(String eventText) {
+ public static boolean logAppEvent(String eventText) {
if (DiagLevel.getLevel(Mod.app) == DetailLevel.OFF) {
- return;
- } // end-if
+ return false;
+ }
long timestamp = SdlTrace.getBaseTicsDelta();
String msg = SdlTrace.B64EncodeForXML(eventText);
String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.app, InterfaceActivityDirection.None, "<d>" + msg + "</d>");
- writeXmlTraceMessage(xml);
- } // end-method
+ return writeXmlTraceMessage(xml);
+ }
- public static void logRPCEvent(InterfaceActivityDirection msgDirection, RPCMessage rpcMsg, String token) {
+ public static boolean logRPCEvent(InterfaceActivityDirection msgDirection, RPCMessage rpcMsg, String token) {
DetailLevel dl = DiagLevel.getLevel(Mod.rpc);
if (dl == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
+ return false;
+ }
long timestamp = SdlTrace.getBaseTicsDelta();
String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.rpc, msgDirection, rpc2Xml(dl, rpcMsg));
- writeXmlTraceMessage(xml);
- } // end-method
+ return writeXmlTraceMessage(xml);
+ }
private static String rpc2Xml(DetailLevel dl, RPCMessage rpcMsg) {
StringBuilder rpcAsXml = new StringBuilder();
@@ -206,11 +206,11 @@ public class SdlTrace {
return rpcAsXml.toString();
} // end-method
- public static void logMarshallingEvent(InterfaceActivityDirection msgDirection, byte[] marshalledMessage, String token) {
+ public static boolean logMarshallingEvent(InterfaceActivityDirection msgDirection, byte[] marshalledMessage, String token) {
DetailLevel dl = DiagLevel.getLevel(Mod.mar);
if (dl == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-fif
+ return false;
+ }
long timestamp = SdlTrace.getBaseTicsDelta();
StringBuilder msg = new StringBuilder();
@@ -222,16 +222,16 @@ public class SdlTrace {
msg.append(Mime.base64Encode(marshalledMessage));
// Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: msg.append(Base64.encodeToString(marshalledMessage, Base64.DEFAULT));
msg.append("</d>");
- } // end-if
+ }
String xml = SdlTrace.encodeTraceMessage(timestamp, Mod.mar, msgDirection, msg.toString());
- writeXmlTraceMessage(xml);
- } // end-method
+ return writeXmlTraceMessage(xml);
+ }
- public static void logProtocolEvent(InterfaceActivityDirection frameDirection, ProtocolFrameHeader frameHeader, byte[] frameData, int frameDataOffset, int frameDataLength, String token) {
+ public static boolean logProtocolEvent(InterfaceActivityDirection frameDirection, ProtocolFrameHeader frameHeader, byte[] frameData, int frameDataOffset, int frameDataLength, String token) {
DetailLevel dl = DiagLevel.getLevel(Mod.proto);
if (dl == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
+ return false;
+ }
StringBuffer protoMsg = new StringBuffer();
protoMsg.append("<frame>");
@@ -244,12 +244,12 @@ public class SdlTrace {
// Base64 only available in 2.2, when SmartDeviceLink base is 2.2 use: bytesInfo = Base64.encodeToString(frameData, frameDataOffset, frameDataLength, Base64.DEFAULT);
protoMsg.append(bytesInfo);
protoMsg.append("</d>");
- } // end-if
- } // end-if
+ }
+ }
protoMsg.append("</frame>");
String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.proto, frameDirection, protoMsg.toString());
- writeXmlTraceMessage(xml);
- } // end-method
+ return writeXmlTraceMessage(xml);
+ }
private static String getProtocolFrameType(FrameType f) {
if (f == FrameType.Control)
@@ -268,7 +268,7 @@ public class SdlTrace {
String s;
if (serviceType == SessionType.RPC )
s = "rpc";
- else if (serviceType == SessionType.Bulk_Data)
+ else if (serviceType == SessionType.BULK_DATA)
s = "bulk";
else
s = "Unknown";
@@ -337,9 +337,9 @@ public class SdlTrace {
return sb.toString();
} // end-method
- public static void logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int byteLength, String token) {
- logTransportEvent(preamble, transportSpecificInfoXml, msgDirection, buf, 0, byteLength, token);
- } // end-method
+ public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int byteLength, String token) {
+ return logTransportEvent(preamble, transportSpecificInfoXml, msgDirection, buf, 0, byteLength, token);
+ }
private static void checkB64(String x, byte[] buf, int offset, int byteLength) {
if ((x.length() % 4) != 0) {
@@ -347,20 +347,20 @@ public class SdlTrace {
} // end-if
} // end-method
- public static void logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int offset, int byteLength, String token) {
+ public static boolean logTransportEvent(String preamble, String transportSpecificInfoXml, InterfaceActivityDirection msgDirection, byte buf[], int offset, int byteLength, String token) {
if (DiagLevel.getLevel(Mod.tran) == DetailLevel.OFF || !token.equals(KeyStr)) {
- return;
- } // end-if
+ return false;
+ }
StringBuilder msg = new StringBuilder();
if (transportSpecificInfoXml != null && transportSpecificInfoXml.length() > 0) {
msg.append(transportSpecificInfoXml);
- } // end-if
+ }
if (preamble != null && preamble.length() > 0) {
msg.append("<desc>");
msg.append(preamble);
msg.append("</desc>");
- } // end-if
+ }
if (buf != null) {
msg.append("<sz>");
msg.append(byteLength);
@@ -373,12 +373,12 @@ public class SdlTrace {
checkB64(bytesInfo, buf, offset, byteLength);
msg.append(bytesInfo);
msg.append("</d>");
- } // end-if
- } // end-if
- } // end-if
+ }
+ }
+ }
String xml = SdlTrace.encodeTraceMessage(SdlTrace.getBaseTicsDelta(), Mod.tran, msgDirection, msg.toString());
- writeXmlTraceMessage(xml);
- } // end-method
+ return writeXmlTraceMessage(xml);
+ }
// Package-scoped
static long getBaseTicsDelta() {
@@ -394,12 +394,13 @@ public class SdlTrace {
return SiphonServer.sendFormattedTraceMessage(info);
}
- private static void writeXmlTraceMessage(String msg) {
+ private static boolean writeXmlTraceMessage(String msg) {
try {
// Attempt to write formatted message to the Siphon
- if (false == writeMessageToSiphonServer(msg)) {
+ if (false == writeMessageToSiphonServer(msg)) {
// If writing to the Siphon fails, write to the native log
NativeLogTool.logInfo(SdlTrace.SYSTEM_LOG_TAG, msg);
+ return false;
}
ISTListener localTraceListener = m_appTraceListener;
@@ -409,12 +410,15 @@ public class SdlTrace {
localTraceListener.logXmlMsg(msg, KeyStr);
} catch (Exception ex) {
DebugTool.logError("Failure calling ISTListener: " + ex.toString(), ex);
- } // end-catch
- } // end-if
+ return false;
+ }
+ }
} catch (Exception ex) {
NativeLogTool.logError(SdlTrace.SYSTEM_LOG_TAG, "Failure writing XML trace message: " + ex.toString());
+ return false;
}
- } // end-method
+ return true;
+ }
// Package-scoped
@SuppressWarnings("deprecation")
diff --git a/sdl_android_lib/src/com/smartdevicelink/util/Base64.java b/sdl_android_lib/src/com/smartdevicelink/util/Base64.java
deleted file mode 100644
index 50b1fd4af..000000000
--- a/sdl_android_lib/src/com/smartdevicelink/util/Base64.java
+++ /dev/null
@@ -1,111 +0,0 @@
-package com.smartdevicelink.util;
-
-public class Base64 {
-
- private static final String defaultString = "Man is distinguished, not only by his reason, but by this singular passion from other animals, which is a lust of the mind, that by a perseverance of delight in the continued and indefatigable generation of knowledge, exceeds the short vehemence of any carnal pleasure";
-
- private static char[] map = new char[64];
- private static byte[] unmap = new byte['z' + 1];
- static {
- byte i = 0;
- for (char c = 'A'; c <= 'Z'; c++) {
- unmap[c] = i;
- map[i++] = c;
- }
- for (char c = 'a'; c <= 'z'; c++) {
- unmap[c] = i;
- map[i++] = c;
- }
- for (char c = '0'; c <= '9'; c++) {
- unmap[c] = i;
- map[i++] = c;
- }
- unmap['+'] = i;
- map[i++] = '+';
- unmap['/'] = i;
- map[i++] = '/';
-
- unmap['='] = 0;
- }
-
- /**
- * @param args
- */
- public static void main(String[] args) {
-
- String toEncode = defaultString;
- if (args.length > 0) {
- toEncode = args[0];
- }
- System.out.println(toEncode);
- String encoded = encode(toEncode.getBytes());
- System.out.println(encoded);
- String decoded = new String(decode(encoded));
- System.out.println(decoded);
- }
-
- public static String encode(byte[] toEncode) {
-
- int iSrc = 0;
- int iDest = 0;
- int srcLen = toEncode.length;
- int destLen = (srcLen * 4 + 2) / 3;
- int padLen = ((srcLen + 2) / 3) * 4;
- char[] dest = new char[padLen];
-
- while (iSrc < srcLen) {
- int src1 = toEncode[iSrc++];
- int src2 = (iSrc < srcLen) ? toEncode[iSrc++] : 0;
- int src3 = (iSrc < srcLen) ? toEncode[iSrc++] : 0;
- int dest1 = (src1 >>> 2);
- int dest2 = (src1 << 4) | (src2 >> 4);
- dest2 &= 0x3F;
- int dest3 = (src2 << 2) | (src3 >>> 6);
- dest3 &= 0x3F;
- int dest4 = src3 & 0x3F;
- dest[iDest++] = map[dest1];
- dest[iDest++] = map[dest2];
- dest[iDest] = iDest < destLen ? map[dest3] : '=';
- iDest++;
- dest[iDest] = iDest < destLen ? map[dest4] : '=';
- iDest++;
- }
-
- return new String(dest);
- }
-
- public static byte[] decode(String toDecode) {
- int iSrc = 0;
- int iDest = 0;
- char[] src = toDecode.toCharArray();
- int srcLen = src.length;
- int destLen = ((srcLen / 4) * 3);
- if (src[srcLen - 1] == '=') {
- destLen--;
- }
- if (src[srcLen - 2] == '=') {
- destLen--;
- }
- byte[] dest = new byte[destLen];
-
- while (iSrc < srcLen) {
- byte src1 = unmap[src[iSrc++]];
- byte src2 = unmap[src[iSrc++]];
- byte src3 = unmap[src[iSrc++]];
- byte src4 = unmap[src[iSrc++]];
- int dest1 = (src1 << 2) | (src2 >>> 4);
- int dest2 = (src2 << 4) | (src3 >>> 2);
- int dest3 = (src3 << 6) | src4;
- dest[iDest++] = (byte) dest1;
- if (iDest < destLen) {
- dest[iDest++] = (byte) dest2;
- }
- if (iDest < destLen) {
- dest[iDest++] = (byte) dest3;
- }
- }
-
- return dest;
- }
-
-}
diff --git a/sdl_android_lib/src/com/smartdevicelink/util/ByteEnumer.java b/sdl_android_lib/src/com/smartdevicelink/util/ByteEnumer.java
index ed9946c0f..0b67d9992 100644
--- a/sdl_android_lib/src/com/smartdevicelink/util/ByteEnumer.java
+++ b/sdl_android_lib/src/com/smartdevicelink/util/ByteEnumer.java
@@ -30,10 +30,14 @@ public abstract class ByteEnumer {
public static ByteEnumer get(Vector<?> theList, byte value) {
Enumeration<?> enumer = theList.elements();
- while (enumer.hasMoreElements()) {
- ByteEnumer current = (ByteEnumer)enumer.nextElement();
- if (current.getValue() == value) {
- return current;
+ while (enumer.hasMoreElements()) {
+ try {
+ ByteEnumer current = (ByteEnumer)enumer.nextElement();
+ if (current.getValue() == value) {
+ return current;
+ }
+ } catch (ClassCastException e) {
+ return null;
}
}
return null;
@@ -42,11 +46,15 @@ public abstract class ByteEnumer {
public static ByteEnumer get(Vector<?> theList, String name) {
Enumeration<?> enumer = theList.elements();
while (enumer.hasMoreElements()) {
+ try {
ByteEnumer current = (ByteEnumer)enumer.nextElement();
if (current.getName().equals(name)) {
return current;
}
+ } catch (ClassCastException e) {
+ return null;
+ }
}
return null;
}
-}
+} \ No newline at end of file
diff --git a/sdl_android_lib/src/com/smartdevicelink/util/Mime.java b/sdl_android_lib/src/com/smartdevicelink/util/Mime.java
deleted file mode 100644
index 8180aa3dc..000000000
--- a/sdl_android_lib/src/com/smartdevicelink/util/Mime.java
+++ /dev/null
@@ -1,183 +0,0 @@
-package com.smartdevicelink.util;
-
-public class Mime {
-
- private static String m_base64Chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
- public static Boolean isSafeASCII(String check) {
- if (check.contains("&") || check.contains("<") || check.contains("]]") || check.contains("}") )
- return false; // these things aren't reliably CDATA encodable
-
- return true;
- }
-
- public static String base64Encode(String toEncode) {
-
- byte[] bytesToEncode = new byte[toEncode.length()];
- for (int i=0; i< toEncode.length(); i++)
- bytesToEncode[i] = (byte)toEncode.charAt(i);
-
- StringBuilder sb = new StringBuilder();
-
- int idxin = 0;
- int b64idx = 0;
-
- for (idxin=0;idxin < bytesToEncode.length;idxin++) {
- switch (idxin % 3) {
- case 0:
- b64idx = (bytesToEncode[idxin] >> 2) & 0x3f;
- break;
- case 1:
- b64idx = (bytesToEncode[idxin] >> 4) & 0x0f;
- b64idx |= ((bytesToEncode[idxin-1] << 4)& 0x30);
- break;
- case 2:
- b64idx = (bytesToEncode[idxin] >> 6) & 0x03;
- b64idx |= ((bytesToEncode[idxin-1] << 2)& 0x3c);
- sb.append(m_base64Chars.charAt(b64idx));
- b64idx = bytesToEncode[idxin] & 0x3f;
- break;
- } // end-switch
- sb.append(m_base64Chars.charAt(b64idx));
- } // end-for
-
- switch (idxin % 3) {
- case 0:
- break;
- case 1:
- b64idx = (bytesToEncode[idxin-1] << 4) & 0x30;
- sb.append(m_base64Chars.charAt(b64idx));
- sb.append("==");
- break;
- case 2:
- b64idx = ((bytesToEncode[idxin-1] << 2)& 0x3c);
- sb.append(m_base64Chars.charAt(b64idx));
- sb.append('=');
- break;
- } // end-switch
-
- return sb.toString();
- } // end-method
-
-
- @SuppressWarnings("unused")
- private byte[] base64Decode(String base64String) {
- byte[] outBytes = null;
- byte[] base64ASCIIString = null;
- final String ASCII_Encoding = "US-ASCII";
-
- // Convert b64 string to raw bytes
- try {
- base64ASCIIString = base64String.getBytes(ASCII_Encoding);
- } catch (Exception ex){
- // TODO
- //publishStatus("Failure converting b64string to ASCII string: " + ex.toString());
- return null;
- }
-
- if (!m_decodeInitComplete) {
- m_decodeInitComplete = true;
- initForDecode();
- } // end-if
-
- int numInChars = base64ASCIIString.length;
-
- if ((numInChars % 4) > 0) {
- return null;
- } // end-if
-
- int numOutBytes = base64ASCIIString.length / 4;
- numOutBytes *= 3;
- int eqpos = base64String.indexOf("=");
- if (eqpos >= 0) {
- numOutBytes--;
- if (base64String.substring(eqpos).indexOf("==") >= 0) {
- numOutBytes--;
- } // end-if
- } // end-if
- outBytes = new byte[numOutBytes];
-
- byte b64idxbits = 0x00;
- int iidx = 0, oidx = 0;
- byte writeByte = 0x00;
- byte b64ASCIIChar = 0x00;
- for (iidx=0, oidx=0;iidx < numInChars;iidx++) {
- b64ASCIIChar = base64ASCIIString[iidx];
- if (b64ASCIIChar == 0x3d /*'='*/) {
- return outBytes;
- } // end-if
-
- if (!isb64char(b64ASCIIChar)) {
- return null;
- } // end-if
-
- switch (iidx % 4) {
- case 0:
- break;
- case 1:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)((b64idxbits << 2) | ((b64decode[b64ASCIIChar] >> 4) & 0x03));
- outBytes[oidx++] = writeByte;
- break;
- case 2:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)(((b64idxbits << 4) & 0xf0) | ((b64decode[b64ASCIIChar] >> 2) & 0x0f));
- outBytes[oidx++] = writeByte;
- break;
- case 3:
- b64idxbits = b64decode[base64ASCIIString[iidx-1]];
- writeByte = (byte)(((b64idxbits << 6) & 0xc0) | ((b64decode[b64ASCIIChar]) & 0x3f));
- outBytes[oidx++] = writeByte;
- break;
- } // end-switch
- } // end-for
-
- return outBytes;
-
- } // end-method
-
-
- private static byte[] b64decode = new byte[256];
- // A-Z is 0x41-0x5a
- // a-z is 0x61-0x7a
- // 0-9 is 0x30-0x39
- // + is 0x2b
- // / is 0x2f
-
- private static boolean m_decodeInitComplete = false;
-
- private void initForDecode() {
- int aidx = 0;
- int lidx = 0;
- // Set A-Z
- for (aidx=0x41, lidx=0;aidx <= 0x5a;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set a-z
- for (aidx=0x61;aidx <= 0x7a;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set 0-9
- for (aidx=0x30;aidx <= 0x39;aidx++, lidx++) {
- b64decode[aidx] = (byte)lidx;
- } // end-for
- // Set '+'
- b64decode[0x2b] = (byte)lidx++;
- // Set '/'
- b64decode[0x2f] = (byte)lidx++;
- } // end-method
-
- private boolean isb64char(byte b) {
- // A-Z is 0x41-0x5a
- // a-z is 0x61-0x7a
- // 0-9 is 0x30-0x39
- // + is 0x2b
- // / is 0x2f
- return ( (b >= 0x41 && b <= 0x5a)
- || (b >= 0x61 && b <= 0x7a)
- || (b >= 0x30 && b <= 0x39)
- || (b == 0x2b)
- || (b == 0x2f)
- );
- } // end-method
-}
diff --git a/sdl_android_lib/src/com/smartdevicelink/util/NativeLogTool.java b/sdl_android_lib/src/com/smartdevicelink/util/NativeLogTool.java
index f768d3bc3..c89b970dc 100644
--- a/sdl_android_lib/src/com/smartdevicelink/util/NativeLogTool.java
+++ b/sdl_android_lib/src/com/smartdevicelink/util/NativeLogTool.java
@@ -31,52 +31,56 @@ public class NativeLogTool {
return logToSystemEnabled;
} // end-method
- public static void logInfo(String message) {
- logInfo(SdlProxyBase.TAG, message);
+ public static boolean logInfo(String message) {
+ return logInfo(SdlProxyBase.TAG, message);
}
- public static void logInfo(String tag, String message) {
+ public static boolean logInfo(String tag, String message) {
if (logToSystemEnabled) {
- log(LogTarget.Info, tag, message);
+ return log(LogTarget.Info, tag, message);
}
+ return false;
}
- public static void logWarning(String message) {
- logWarning(SdlProxyBase.TAG, message);
+ public static boolean logWarning(String message) {
+ return logWarning(SdlProxyBase.TAG, message);
}
- public static void logWarning(String tag, String message) {
+ public static boolean logWarning(String tag, String message) {
if (logToSystemEnabled) {
- log(LogTarget.Warning, tag, message);
+ return log(LogTarget.Warning, tag, message);
}
+ return false;
}
- public static void logError(String message) {
- logError(SdlProxyBase.TAG, message);
+ public static boolean logError(String message) {
+ return logError(SdlProxyBase.TAG, message);
}
- public static void logError(String tag, String message) {
+ public static boolean logError(String tag, String message) {
if (logToSystemEnabled) {
- log(LogTarget.Error, tag, message);
+ return log(LogTarget.Error, tag, message);
}
+ return false;
}
- public static void logError(String message, Throwable t) {
- logError(SdlProxyBase.TAG, message, t);
+ public static boolean logError(String message, Throwable t) {
+ return logError(SdlProxyBase.TAG, message, t);
}
- public static void logError(String tag, String message, Throwable t) {
+ public static boolean logError(String tag, String message, Throwable t) {
// If the call to logError is passed a throwable, write directly to the system log
if (logToSystemEnabled) {
Log.e(tag, message, t);
}
+ return logToSystemEnabled;
}
- private static void log(LogTarget ltarg, String source, String logMsg) {
+ private static boolean log(LogTarget ltarg, String source, String logMsg) {
// Don't log empty messages
if (logMsg == null || logMsg.length() == 0) {
- return;
- } // end-if
+ return false;
+ }
int bytesWritten = 0;
int substrSize = 0;
@@ -96,13 +100,15 @@ public class NativeLogTool {
case Error:
bytesWritten = Log.e(tag, chunk);
break;
- } // end-switch
+ }
if (bytesWritten < chunk.length()) {
Log.e(SdlProxyBase.TAG, "Calling Log.e: msg length=" + chunk.length() + ", bytesWritten=" + bytesWritten);
- } // end-if
- } // end-while
+ }
+ }
} catch (Exception ex) {
Log.e(SdlProxyBase.TAG, "Failure writing " + ltarg.name() + " fragments to android log:" + ex.toString());
- } // end-catch
- } // end-method
-}
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/sdl_android_lib/src/com/smartdevicelink/util/StringEnumer.java b/sdl_android_lib/src/com/smartdevicelink/util/StringEnumer.java
deleted file mode 100644
index 34ab1a300..000000000
--- a/sdl_android_lib/src/com/smartdevicelink/util/StringEnumer.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.smartdevicelink.util;
-
-import java.util.Vector;
-
-public abstract class StringEnumer {
-
- protected StringEnumer(int value, String name) {
- this.value = value;
- this.name = name;
- }
-
- private int value;
- private String name;
-
- public int getValue() { return value; }
- public String getName() { return name; }
-
- public boolean equals(StringEnumer other) {
- return name == other.getName();
- }
-
- public boolean eq(StringEnumer other) {
- return equals(other);
- }
-
- public String toString() {
- return name;
- }
-
- public static StringEnumer get(Vector<? extends StringEnumer> theList, int value) {
- for (StringEnumer current : theList) {
- if (current.getValue() == value) {
- return current;
- }
- }
- return null;
- }
-
- public static StringEnumer get(Vector<? extends StringEnumer> theList, String name) {
- for (StringEnumer current : theList) {
- if (current.getName().equalsIgnoreCase(name)) {
- return current;
- }
- }
- return null;
- }
-}
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/Test.java b/sdl_android_tests/src/com/smartdevicelink/test/Test.java
index 07d5cf0d2..d808dc12a 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/Test.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/Test.java
@@ -112,6 +112,7 @@ public class Test {
// RPC Request/Response/Notification/Datatype Test Values
public static final int GENERAL_INT = 100;
+ public static final Long GENERAL_LONG = 100L;
public static final Turn GENERAL_TURN = new Turn();
public static final float GENERAL_FLOAT = 100f;
public static final Image GENERAL_IMAGE = new Image();
@@ -196,6 +197,7 @@ public class Test {
public static final VehicleDataNotificationStatus GENERAL_VEHICLEDATANOTIFICATIONSTATUS = VehicleDataNotificationStatus.NORMAL;
public static final AppInterfaceUnregisteredReason GENERAL_APPINTERFACEUNREGISTEREDREASON = AppInterfaceUnregisteredReason.BLUETOOTH_OFF;
+ public static final List<Long> GENERAL_LONG_LIST = Arrays.asList(new Long[]{ 1L, 2L });
public static final List<Turn> GENERAL_TURN_LIST = new ArrayList<Turn>();
public static final List<Choice> GENERAL_CHOICE_LIST = new ArrayList<Choice>();
public static final List<String> GENERAL_STRING_LIST = Arrays.asList(new String[] { "a", "b"});
@@ -284,7 +286,7 @@ public class Test {
GENERAL_TOUCHCOORD_LIST.add(GENERAL_TOUCHCOORD);
GENERAL_TOUCHEVENT.setId(GENERAL_INT);
- GENERAL_TOUCHEVENT.setTs(GENERAL_INTEGER_LIST);
+ GENERAL_TOUCHEVENT.setTs(GENERAL_LONG_LIST);
GENERAL_TOUCHEVENT.setC(GENERAL_TOUCHCOORD_LIST);
GENERAL_TOUCHEVENT_LIST.add(GENERAL_TOUCHEVENT);
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/Validator.java b/sdl_android_tests/src/com/smartdevicelink/test/Validator.java
index 41f696e34..a2c13f27e 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/Validator.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/Validator.java
@@ -253,6 +253,23 @@ public class Validator{
return true;
}
+
+ public static boolean validateLongList(List<Long> intList1, List<Long> intList2){
+ if(intList1 == null){
+ return ( intList2 == null );
+ }
+ if(intList2 == null){
+ return ( intList1 == null );
+ }
+
+ for(int i = 0; i < intList1.size(); i++){
+ if(!intList1.get(i).equals(intList2.get(i))){
+ return false;
+ }
+ }
+
+ return true;
+ }
public static boolean validateSoftButtons(List<SoftButton> list1, List<SoftButton> list2){
if(list1 == null){
@@ -1010,8 +1027,8 @@ public class Validator{
List<TouchCoord> tc1 = item1.getC();
List<TouchCoord> tc2 = item2.getC();
- List<Integer> ts1 = item1.getTs();
- List<Integer> ts2 = item2.getTs();
+ List<Long> ts1 = item1.getTs();
+ List<Long> ts2 = item2.getTs();
for(int i=0; i<tc1.size(); i++){
if( ! validateTouchCoord(tc1.get(i), tc2.get(i)) ){
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/protocol/enums/SessionTypeTests.java b/sdl_android_tests/src/com/smartdevicelink/test/protocol/enums/SessionTypeTests.java
index a55d1251d..091117e37 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/protocol/enums/SessionTypeTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/protocol/enums/SessionTypeTests.java
@@ -106,8 +106,8 @@ public class SessionTypeTests extends TestCase {
enumTestList.add(SessionType.RPC);
enumTestList.add(SessionType.PCM);
enumTestList.add(SessionType.NAV);
- enumTestList.add(SessionType.Bulk_Data);
- enumTestList.add(SessionType.Heartbeat);
+ enumTestList.add(SessionType.BULK_DATA);
+ enumTestList.add(SessionType.CONTROL);
assertTrue("List does not match enum test list.",
list.containsAll(enumTestList) &&
@@ -116,8 +116,8 @@ public class SessionTypeTests extends TestCase {
// Test Array
SessionType[] enumValueArray = SessionType.values();
SessionType[] enumTestArray = { SessionType.RPC, SessionType.PCM,
- SessionType.NAV, SessionType.Bulk_Data,
- SessionType.Heartbeat };
+ SessionType.NAV, SessionType.BULK_DATA,
+ SessionType.CONTROL };
assertTrue("Array does not match enum values array.",
Validator.validateSessionTypeArray(enumValueArray, enumTestArray));
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/datatypes/TouchEventTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/datatypes/TouchEventTest.java
index 854ebc394..f7bfa5c85 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/datatypes/TouchEventTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/datatypes/TouchEventTest.java
@@ -26,7 +26,7 @@ public class TouchEventTest extends TestCase {
public void setUp() {
msg = new TouchEvent();
msg.setId(Test.GENERAL_INT);
- msg.setTs(Test.GENERAL_INTEGER_LIST);
+ msg.setTs(Test.GENERAL_LONG_LIST);
msg.setC(Test.GENERAL_TOUCHCOORD_LIST);
}
@@ -36,12 +36,12 @@ public class TouchEventTest extends TestCase {
public void testRpcValues () {
// Test Values
Integer id = msg.getId();
- List<Integer> timestamp = msg.getTs();
+ List<Long> timestamp = msg.getTs();
List<TouchCoord> coordTest = msg.getC();
// Valid Tests
assertEquals(Test.MATCH, (Integer) Test.GENERAL_INT, id);
- assertTrue(Test.TRUE, Validator.validateIntegerList(Test.GENERAL_INTEGER_LIST, timestamp));
+ assertTrue(Test.TRUE, Validator.validateLongList(Test.GENERAL_LONG_LIST, timestamp));
assertEquals(Test.MATCH, Test.GENERAL_TOUCHCOORD_LIST.size(), coordTest.size());
for (int index = 0; index < Test.GENERAL_TOUCHCOORD_LIST.size(); index++) {
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java
index 3cfba0665..e3c1ee32c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java
@@ -32,7 +32,7 @@ public class OnAppInterfaceUnregisteredTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_APP_INTERFACE_UNREGISTERED;
+ return FunctionID.ON_APP_INTERFACE_UNREGISTERED.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java
index aad417ef5..b2add2f34 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java
@@ -26,7 +26,7 @@ public class OnAudioPassThruTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_AUDIO_PASS_THRU;
+ return FunctionID.ON_AUDIO_PASS_THRU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java
index 87f6e6c39..5f6e2e8e3 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java
@@ -35,7 +35,7 @@ public class OnButtonEventTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_BUTTON_EVENT;
+ return FunctionID.ON_BUTTON_EVENT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
index 01f2835a5..be3c63be2 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java
@@ -35,7 +35,7 @@ public class OnButtonPressTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_BUTTON_PRESS;
+ return FunctionID.ON_BUTTON_PRESS.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java
index 21a580061..46026f007 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java
@@ -33,7 +33,7 @@ public class OnCommandTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_COMMAND;
+ return FunctionID.ON_COMMAND.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java
index 6ec588c6b..090582586 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java
@@ -34,7 +34,7 @@ public class OnDriverDistractionTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_DRIVER_DISTRACTION;
+ return FunctionID.ON_DRIVER_DISTRACTION.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java
index cafcf0014..329018aa2 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java
@@ -37,7 +37,7 @@ public class OnHMIStatusTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_HMI_STATUS;
+ return FunctionID.ON_HMI_STATUS.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java
index 27b0c50f4..16e101860 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java
@@ -33,7 +33,7 @@ public class OnHashChangeTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_HASH_CHANGE;
+ return FunctionID.ON_HASH_CHANGE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java
index db691b611..e950d85fa 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java
@@ -33,7 +33,7 @@ public class OnKeyboardInputTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_KEYBOARD_INPUT;
+ return FunctionID.ON_KEYBOARD_INPUT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java
index 74b66243f..382ef074c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java
@@ -33,7 +33,7 @@ public class OnLanguageChangeTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_LANGUAGE_CHANGE;
+ return FunctionID.ON_LANGUAGE_CHANGE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java
index 2f4ce8c60..8df1cb641 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java
@@ -37,7 +37,7 @@ public class OnLockScreenStatusTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_LOCK_SCREEN_STATUS;
+ return FunctionID.ON_LOCK_SCREEN_STATUS.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java
index b3581f72f..c3d4c4f46 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java
@@ -35,7 +35,7 @@ public class OnPermissionsChangeTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_PERMISSIONS_CHANGE;
+ return FunctionID.ON_PERMISSIONS_CHANGE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java
index 8224af0dd..2725f4eae 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java
@@ -36,7 +36,7 @@ public class OnSdlChoiceChosenTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_SDL_CHOICE_CHOSEN;
+ return FunctionID.ON_SDL_CHOICE_CHOSEN.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java
index d759c968b..fcfd80d55 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java
@@ -24,8 +24,8 @@ public class OnSystemRequestTests extends BaseRpcTests{
OnSystemRequest msg = new OnSystemRequest();
msg.setFileType(Test.GENERAL_FILETYPE);
- msg.setLength(Test.GENERAL_INT);
- msg.setOffset(Test.GENERAL_INT);
+ msg.setLength(Test.GENERAL_LONG);
+ msg.setOffset(Test.GENERAL_LONG);
msg.setRequestType(Test.GENERAL_REQUESTTYPE);
msg.setTimeout(Test.GENERAL_INT);
msg.setUrl(Test.GENERAL_STRING);
@@ -40,7 +40,7 @@ public class OnSystemRequestTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_SYSTEM_REQUEST;
+ return FunctionID.ON_SYSTEM_REQUEST.toString();
}
@Override
@@ -67,18 +67,18 @@ public class OnSystemRequestTests extends BaseRpcTests{
public void testRpcValues () {
// Test Values
FileType fileType = ( (OnSystemRequest) msg ).getFileType();
- int length = ( (OnSystemRequest) msg ).getLength();
+ Long length = ( (OnSystemRequest) msg ).getLength();
int timeout = ( (OnSystemRequest) msg ).getTimeout();
- int offset = ( (OnSystemRequest) msg ).getOffset();
+ Long offset = ( (OnSystemRequest) msg ).getOffset();
String url = ( (OnSystemRequest) msg ).getUrl();
RequestType requestType = ( (OnSystemRequest) msg ).getRequestType();
// Valid Tests
assertEquals(Test.MATCH, Test.GENERAL_FILETYPE, fileType);
- assertEquals(Test.MATCH, Test.GENERAL_INT, length);
+ assertEquals(Test.MATCH, Test.GENERAL_LONG, length);
assertEquals(Test.MATCH, Test.GENERAL_INT, timeout);
- assertEquals(Test.MATCH, Test.GENERAL_INT, offset);
+ assertEquals(Test.MATCH, Test.GENERAL_LONG, offset);
assertEquals(Test.MATCH, Test.GENERAL_STRING, url);
assertEquals(Test.MATCH, Test.GENERAL_REQUESTTYPE, requestType);
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java
index a8ca2ac6a..47352f6f5 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java
@@ -32,7 +32,7 @@ public class OnTBTClientStateTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_TBT_CLIENT_STATE;
+ return FunctionID.ON_TBT_CLIENT_STATE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java
index 6adeceb6c..613afa55b 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java
@@ -36,7 +36,7 @@ public class OnTouchEventTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_TOUCH_EVENT;
+ return FunctionID.ON_TOUCH_EVENT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java
index 6bcfd5faf..5d328813c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java
@@ -49,7 +49,7 @@ public class OnVehicleDataTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ON_VEHICLE_DATA;
+ return FunctionID.ON_VEHICLE_DATA.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddCommandTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddCommandTests.java
index 66553b1ed..c0369535a 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddCommandTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddCommandTests.java
@@ -43,7 +43,7 @@ public class AddCommandTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ADD_COMMAND;
+ return FunctionID.ADD_COMMAND.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java
index 9919ec653..001207cd6 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java
@@ -38,7 +38,7 @@ public class AddSubmenuTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ADD_SUB_MENU;
+ return FunctionID.ADD_SUB_MENU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java
index 964d7ef71..02338f660 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java
@@ -43,7 +43,7 @@ public class AlertManeuverTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.ALERT_MANEUVER;
+ return FunctionID.ALERT_MANEUVER.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertTests.java
index c1db8b58e..639cf290c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/AlertTests.java
@@ -49,7 +49,7 @@ public class AlertTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ALERT;
+ return FunctionID.ALERT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java
index caf687b4f..ef489b18d 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java
@@ -38,7 +38,7 @@ public class ChangeRegistrationTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.CHANGE_REGISTRATION;
+ return FunctionID.CHANGE_REGISTRATION.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java
index fc17cd60f..173f316c9 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java
@@ -41,7 +41,7 @@ public class CreateInteractionChoiceSetTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.CREATE_INTERACTION_CHOICE_SET;
+ return FunctionID.CREATE_INTERACTION_CHOICE_SET.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java
index 9065e7a92..e8e183972 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java
@@ -36,7 +36,7 @@ public class DeleteCommandTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_COMMAND;
+ return FunctionID.DELETE_COMMAND.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java
index a237cccd3..6ef94a7be 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java
@@ -36,7 +36,7 @@ public class DeleteFileTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_FILE;
+ return FunctionID.DELETE_FILE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java
index 866c8dded..8d18e3a0a 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java
@@ -36,7 +36,7 @@ public class DeleteInteractionChoiceSetTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_INTERACTION_CHOICE_SET;
+ return FunctionID.DELETE_INTERACTION_CHOICE_SET.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java
index e932f3f28..f982f11f1 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java
@@ -36,7 +36,7 @@ public class DeleteSubMenuTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_SUB_MENU;
+ return FunctionID.DELETE_SUB_MENU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java
index bfe2b0f69..1002d7068 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java
@@ -40,7 +40,7 @@ public class DiagnosticMessageTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DIAGNOSTIC_MESSAGE;
+ return FunctionID.DIAGNOSTIC_MESSAGE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java
index 8db8e7fd7..101af9fef 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java
@@ -32,7 +32,7 @@ public class EndAudioPassThruTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.END_AUDIO_PASS_THRU;
+ return FunctionID.END_AUDIO_PASS_THRU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java
index 528829dc0..89302857a 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java
@@ -37,7 +37,7 @@ public class GetDTCsTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.GET_DTCS;
+ return FunctionID.GET_DTCS.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java
index 9991c583b..972c04d91 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java
@@ -60,7 +60,7 @@ public class GetVehicleDataTests extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.GET_VEHICLE_DATA;
+ return FunctionID.GET_VEHICLE_DATA.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ListFilesTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ListFilesTests.java
index 87b0a62cc..e3610e664 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ListFilesTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ListFilesTests.java
@@ -32,7 +32,7 @@ public class ListFilesTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.LIST_FILES;
+ return FunctionID.LIST_FILES.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java
index dfb795fd2..5b424e469 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java
@@ -50,7 +50,7 @@ public class PerformAudioPassThruTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.PERFORM_AUDIO_PASS_THRU;
+ return FunctionID.PERFORM_AUDIO_PASS_THRU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java
index 450a8b9f8..5097ff00e 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java
@@ -52,7 +52,7 @@ public class PerformInteractionTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.PERFORM_INTERACTION;
+ return FunctionID.PERFORM_INTERACTION.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PutFileTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PutFileTests.java
index 0227bb563..fec575206 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PutFileTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/PutFileTests.java
@@ -28,8 +28,8 @@ public class PutFileTests extends BaseRpcTests {
msg.setFileType(Test.GENERAL_FILETYPE);
msg.setPersistentFile(Test.GENERAL_BOOLEAN);
msg.setSystemFile(Test.GENERAL_BOOLEAN);
- msg.setOffset(Test.GENERAL_INT);
- msg.setLength(Test.GENERAL_INT);
+ msg.setOffset(Test.GENERAL_LONG);
+ msg.setLength(Test.GENERAL_LONG);
return msg;
}
@@ -41,7 +41,7 @@ public class PutFileTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.PUT_FILE;
+ return FunctionID.PUT_FILE.toString();
}
@Override
@@ -69,15 +69,15 @@ public class PutFileTests extends BaseRpcTests {
FileType testFileType = ( (PutFile) msg ).getFileType();
boolean testPersistentFile = ( (PutFile) msg ).getPersistentFile();
boolean testSystemFile = ( (PutFile) msg ).getSystemFile();
- Integer testOffset = ( (PutFile) msg ).getOffset();
- Integer testLength = ( (PutFile) msg ).getLength();
+ Long testOffset = ( (PutFile) msg ).getOffset();
+ Long testLength = ( (PutFile) msg ).getLength();
// Valid Tests
assertEquals(Test.MATCH, Test.GENERAL_FILETYPE, testFileType);
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, testPersistentFile);
assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, testSystemFile);
- assertEquals(Test.MATCH, (Integer) Test.GENERAL_INT, testOffset);
- assertEquals(Test.MATCH, (Integer) Test.GENERAL_INT, testLength);
+ assertEquals(Test.MATCH, Test.GENERAL_LONG, testOffset);
+ assertEquals(Test.MATCH, Test.GENERAL_LONG, testLength);
// Invalid/Null Tests
PutFile msg = new PutFile();
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ReadDidTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ReadDidTests.java
index a46ed07f6..a36879476 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ReadDidTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ReadDidTests.java
@@ -39,7 +39,7 @@ public class ReadDidTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.READ_DID;
+ return FunctionID.READ_DID.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java
index 6734ead05..aa30bc61c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java
@@ -56,7 +56,7 @@ public class RegisterAppInterfaceTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.REGISTER_APP_INTERFACE;
+ return FunctionID.REGISTER_APP_INTERFACE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java
index 0bcdfb116..bfb0f73ea 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java
@@ -39,7 +39,7 @@ public class ResetGlobalPropertiesTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.RESET_GLOBAL_PROPERTIES;
+ return FunctionID.RESET_GLOBAL_PROPERTIES.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java
index bb0efdb54..91b505e0e 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java
@@ -43,7 +43,7 @@ public class ScrollableMessageTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SCROLLABLE_MESSAGE;
+ return FunctionID.SCROLLABLE_MESSAGE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java
index c9cd39ebd..9e6999678 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SendLocationTests.java
@@ -27,8 +27,8 @@ public class SendLocationTests extends BaseRpcTests {
protected RPCMessage createMessage(){
SendLocation msg = new SendLocation();
- msg.setLatitudeDegrees(Test.GENERAL_FLOAT);
- msg.setLongitudeDegrees(Test.GENERAL_FLOAT);
+ msg.setLatitudeDegrees(Test.GENERAL_DOUBLE);
+ msg.setLongitudeDegrees(Test.GENERAL_DOUBLE);
msg.setLocationName(Test.GENERAL_STRING);
msg.setLocationDescription(Test.GENERAL_STRING);
msg.setPhoneNumber(Test.GENERAL_STRING);
@@ -45,7 +45,7 @@ public class SendLocationTests extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SEND_LOCATION;
+ return FunctionID.SEND_LOCATION.toString();
}
@Override
@@ -53,8 +53,8 @@ public class SendLocationTests extends BaseRpcTests {
JSONObject result = new JSONObject();
try {
- result.put(SendLocation.KEY_LAT_DEGREES, Test.GENERAL_FLOAT);
- result.put(SendLocation.KEY_LON_DEGREES, Test.GENERAL_FLOAT);
+ result.put(SendLocation.KEY_LAT_DEGREES, Test.GENERAL_DOUBLE);
+ result.put(SendLocation.KEY_LON_DEGREES, Test.GENERAL_DOUBLE);
result.put(SendLocation.KEY_LOCATION_NAME, Test.GENERAL_STRING);
result.put(SendLocation.KEY_LOCATION_DESCRIPTION, Test.GENERAL_STRING);
result.put(SendLocation.KEY_PHONE_NUMBER, Test.GENERAL_STRING);
@@ -72,8 +72,8 @@ public class SendLocationTests extends BaseRpcTests {
*/
public void testRpcValues () {
// Test Values
- Float latitude = ((SendLocation) msg).getLatitudeDegrees();
- Float longitude = ((SendLocation) msg).getLongitudeDegrees();
+ Double latitude = ((SendLocation) msg).getLatitudeDegrees();
+ Double longitude = ((SendLocation) msg).getLongitudeDegrees();
String locationName = ((SendLocation) msg).getLocationName();
String locationDesc = ((SendLocation) msg).getLocationDescription();
String phoneNumber = ((SendLocation) msg).getPhoneNumber();
@@ -81,8 +81,8 @@ public class SendLocationTests extends BaseRpcTests {
Image locationImage = ((SendLocation) msg).getLocationImage();
// Valid Tests
- assertEquals(Test.MATCH, Test.GENERAL_FLOAT, longitude);
- assertEquals(Test.MATCH, Test.GENERAL_FLOAT, latitude);
+ assertEquals(Test.MATCH, Test.GENERAL_DOUBLE, longitude);
+ assertEquals(Test.MATCH, Test.GENERAL_DOUBLE, latitude);
assertEquals(Test.MATCH, Test.GENERAL_STRING, locationDesc);
assertEquals(Test.MATCH, Test.GENERAL_STRING, locationName);
assertEquals(Test.MATCH, Test.GENERAL_STRING, phoneNumber);
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java
index 1d3f5bc45..7a1e4b8cc 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java
@@ -36,7 +36,7 @@ public class SetAppIconTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SET_APP_ICON;
+ return FunctionID.SET_APP_ICON.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java
index 69d0f458d..803c32b0f 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java
@@ -37,7 +37,7 @@ public class SetDisplayLayoutTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SET_DISPLAY_LAYOUT;
+ return FunctionID.SET_DISPLAY_LAYOUT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java
index e7782042c..174636a3e 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java
@@ -50,7 +50,7 @@ public class SetGlobalPropertiesTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SET_GLOBAL_PROPERTIES;
+ return FunctionID.SET_GLOBAL_PROPERTIES.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java
index 9e518e8fc..47fce9c62 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java
@@ -41,7 +41,7 @@ public class SetMediaClockTimerTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SET_MEDIA_CLOCK_TIMER;
+ return FunctionID.SET_MEDIA_CLOCK_TIMER.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java
index 9327541cb..c0fa5ad9c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java
@@ -52,7 +52,7 @@ public class ShowConstantTbtTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SHOW_CONSTANT_TBT;
+ return FunctionID.SHOW_CONSTANT_TBT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowTests.java
index e223862f6..b2ff6ca08 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/ShowTests.java
@@ -53,7 +53,7 @@ public class ShowTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SHOW;
+ return FunctionID.SHOW.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SliderTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SliderTests.java
index 106da6e38..d3b107340 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SliderTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SliderTests.java
@@ -42,7 +42,7 @@ public class SliderTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SLIDER;
+ return FunctionID.SLIDER.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SpeakTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SpeakTests.java
index 9cf828b5c..abd22ac75 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SpeakTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SpeakTests.java
@@ -37,7 +37,7 @@ public class SpeakTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SPEAK;
+ return FunctionID.SPEAK.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java
index 4c080781c..6c04c9cce 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java
@@ -37,7 +37,7 @@ public class SubscribeButtonTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SUBSCRIBE_BUTTON;
+ return FunctionID.SUBSCRIBE_BUTTON.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java
index 6c9b065cc..099a7ac85 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java
@@ -59,7 +59,7 @@ public class SubscribeVehicleDataTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SUBSCRIBE_VEHICLE_DATA;
+ return FunctionID.SUBSCRIBE_VEHICLE_DATA.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java
index bb9679db9..6d82f9627 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java
@@ -41,7 +41,7 @@ public class SystemRequestTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SYSTEM_REQUEST;
+ return FunctionID.SYSTEM_REQUEST.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java
index 7d9d7ec59..0d756273c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java
@@ -32,7 +32,7 @@ public class UnregisterAppInterfaceTests extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.UNREGISTER_APP_INTERFACE;
+ return FunctionID.UNREGISTER_APP_INTERFACE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java
index 99931aa2c..1cd85fad8 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java
@@ -37,7 +37,7 @@ public class UnsubscribeButtonTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.UNSUBSCRIBE_BUTTON;
+ return FunctionID.UNSUBSCRIBE_BUTTON.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java
index 61b498b29..e2c8a2f8f 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java
@@ -60,7 +60,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.UNSUBSCRIBE_VEHICLE_DATA;
+ return FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java
index 73d4a5382..b6609fabd 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java
@@ -43,7 +43,7 @@ public class UpdateTurnListTests extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.UPDATE_TURN_LIST;
+ return FunctionID.UPDATE_TURN_LIST.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java
index 9ac064355..92e23095c 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java
@@ -33,7 +33,7 @@ public class AddCommandResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ADD_COMMAND;
+ return FunctionID.ADD_COMMAND.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java
index 07291a957..05dddaa6b 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java
@@ -32,7 +32,7 @@ public class AddSubmenuResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ADD_SUB_MENU;
+ return FunctionID.ADD_SUB_MENU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java
index f5618eb16..c54704927 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java
@@ -32,7 +32,7 @@ public class AlertManeuverResponseTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.ALERT_MANEUVER;
+ return FunctionID.ALERT_MANEUVER.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java
index c84d54fdd..a79ba83c1 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java
@@ -36,7 +36,7 @@ public class AlertResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.ALERT;
+ return FunctionID.ALERT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java
index 16b7d7b5c..920ee8c7e 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java
@@ -32,7 +32,7 @@ public class ChangeRegistrationResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.CHANGE_REGISTRATION;
+ return FunctionID.CHANGE_REGISTRATION.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java
index 7c814e07d..f492d0458 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java
@@ -26,7 +26,7 @@ public class CreateInteractionChoiceSetResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.CREATE_INTERACTION_CHOICE_SET;
+ return FunctionID.CREATE_INTERACTION_CHOICE_SET.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java
index 417483f78..1fdd9cae1 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java
@@ -32,7 +32,7 @@ public class DeleteCommandResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_COMMAND;
+ return FunctionID.DELETE_COMMAND.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java
index 7d7928717..87825d97d 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java
@@ -36,7 +36,7 @@ public class DeleteFileResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_FILE;
+ return FunctionID.DELETE_FILE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java
index 32d085c76..1a8c48d3d 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java
@@ -32,7 +32,7 @@ public class DeleteInteractionChoiceSetResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_INTERACTION_CHOICE_SET;
+ return FunctionID.DELETE_INTERACTION_CHOICE_SET.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java
index ab5c8d405..04d4d7a3f 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java
@@ -32,7 +32,7 @@ public class DeleteSubMenuResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DELETE_SUB_MENU;
+ return FunctionID.DELETE_SUB_MENU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java
index f71582fae..253bed950 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java
@@ -38,7 +38,7 @@ public class DiagnosticMessageResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.DIAGNOSTIC_MESSAGE;
+ return FunctionID.DIAGNOSTIC_MESSAGE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java
index 6ece8473a..b14618818 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java
@@ -32,7 +32,7 @@ public class EndAudioPassThruResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.END_AUDIO_PASS_THRU;
+ return FunctionID.END_AUDIO_PASS_THRU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java
index 79b22a0f3..f80c6201b 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java
@@ -26,7 +26,7 @@ public class GenericResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.GENERIC_RESPONSE;
+ return FunctionID.GENERIC_RESPONSE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java
index ef8a2a70c..d05ec9ae3 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java
@@ -38,7 +38,7 @@ public class GetDTCsResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.GET_DTCS;
+ return FunctionID.GET_DTCS.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
index 4b789b3d3..e1a469f0f 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
@@ -48,7 +48,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.GET_VEHICLE_DATA;
+ return FunctionID.GET_VEHICLE_DATA.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java
index 032ba064d..adfe92354 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java
@@ -39,7 +39,7 @@ public class ListFilesResponseTests extends BaseRpcTests{
@Override
protected String getCommandType(){
- return FunctionID.LIST_FILES;
+ return FunctionID.LIST_FILES.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java
index 4b909ee22..af8fb09e8 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java
@@ -32,7 +32,7 @@ public class PerformAudioPassThruResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.PERFORM_AUDIO_PASS_THRU;
+ return FunctionID.PERFORM_AUDIO_PASS_THRU.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java
index 527d43f38..e1a9592f5 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java
@@ -39,7 +39,7 @@ public class PerformInteractionResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.PERFORM_INTERACTION;
+ return FunctionID.PERFORM_INTERACTION.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java
index d226796db..4a0c19a15 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java
@@ -36,7 +36,7 @@ public class PutFileResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.PUT_FILE;
+ return FunctionID.PUT_FILE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java
index 295dc4598..1dcfdaca9 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java
@@ -41,7 +41,7 @@ public class ReadDIDResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.READ_DID;
+ return FunctionID.READ_DID.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java
index 169667b7e..fef53dde6 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java
@@ -65,7 +65,7 @@ public class RegisterAppInterfaceResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.REGISTER_APP_INTERFACE;
+ return FunctionID.REGISTER_APP_INTERFACE.toString();
}
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java
index 1779de62b..dbe577251 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java
@@ -32,7 +32,7 @@ public class ResetGlobalPropertiesResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.RESET_GLOBAL_PROPERTIES;
+ return FunctionID.RESET_GLOBAL_PROPERTIES.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java
index c51aceb2f..472a962aa 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java
@@ -32,7 +32,7 @@ public class ScrollableMessageResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SCROLLABLE_MESSAGE;
+ return FunctionID.SCROLLABLE_MESSAGE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java
index 00c9d3851..d91e40a38 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java
@@ -33,7 +33,7 @@ public class SendLocationResponseTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SEND_LOCATION;
+ return FunctionID.SEND_LOCATION.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java
index 805a3308e..318cdcf0b 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java
@@ -32,7 +32,7 @@ public class SetAppIconResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SET_APP_ICON;
+ return FunctionID.SET_APP_ICON.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java
index b05852cb9..230f1a039 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java
@@ -47,7 +47,7 @@ public class SetDisplayLayoutResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SET_DISPLAY_LAYOUT;
+ return FunctionID.SET_DISPLAY_LAYOUT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java
index 6129e79ea..f1cee92c5 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java
@@ -32,7 +32,7 @@ public class SetGlobalPropertiesResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SET_GLOBAL_PROPERTIES;
+ return FunctionID.SET_GLOBAL_PROPERTIES.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java
index 9f9675ef5..d081115e4 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java
@@ -32,7 +32,7 @@ public class SetMediaClockTimerResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SET_MEDIA_CLOCK_TIMER;
+ return FunctionID.SET_MEDIA_CLOCK_TIMER.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java
index f55d8b42a..1023bfab0 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java
@@ -33,7 +33,7 @@ public class ShowConstantTbtResponseTests extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SHOW_CONSTANT_TBT;
+ return FunctionID.SHOW_CONSTANT_TBT.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java
index 6ab23603e..b826b4ce4 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java
@@ -32,7 +32,7 @@ public class ShowResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SHOW;
+ return FunctionID.SHOW.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java
index 508243808..a2b72d705 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java
@@ -36,7 +36,7 @@ public class SliderResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SLIDER;
+ return FunctionID.SLIDER.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java
index 8c23edd13..1ad4be18d 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java
@@ -32,7 +32,7 @@ public class SpeakResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SPEAK;
+ return FunctionID.SPEAK.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java
index 413886081..0dc08b25a 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java
@@ -32,7 +32,7 @@ public class SubscribeButtonResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SUBSCRIBE_BUTTON;
+ return FunctionID.SUBSCRIBE_BUTTON.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
index 304f20cfa..f854690ef 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
@@ -64,7 +64,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.SUBSCRIBE_VEHICLE_DATA;
+ return FunctionID.SUBSCRIBE_VEHICLE_DATA.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java
index 55cb416f4..fc57d3cdf 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java
@@ -32,7 +32,7 @@ public class SystemRequestResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.SYSTEM_REQUEST;
+ return FunctionID.SYSTEM_REQUEST.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java
index 249f4fdd1..d706439b4 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java
@@ -32,7 +32,7 @@ public class UnregisterAppInterfaceResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.UNREGISTER_APP_INTERFACE;
+ return FunctionID.UNREGISTER_APP_INTERFACE.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java
index f3780656c..8bc8b0cc5 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java
@@ -32,7 +32,7 @@ public class UnsubscribeButtonResponseTest extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.UNSUBSCRIBE_BUTTON;
+ return FunctionID.UNSUBSCRIBE_BUTTON.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
index 987f3b3c0..1e6fe3722 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
@@ -66,7 +66,7 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
@Override
protected String getCommandType() {
- return FunctionID.UNSUBSCRIBE_VEHICLE_DATA;
+ return FunctionID.UNSUBSCRIBE_VEHICLE_DATA.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java
index c08247bca..07dcc8836 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java
@@ -32,7 +32,7 @@ public class UpdateTurnListResponseTests extends BaseRpcTests {
@Override
protected String getCommandType(){
- return FunctionID.UPDATE_TURN_LIST;
+ return FunctionID.UPDATE_TURN_LIST.toString();
}
@Override
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/streaming/AbstractPacketizerTests.java b/sdl_android_tests/src/com/smartdevicelink/test/streaming/AbstractPacketizerTests.java
index 3c96b11db..0b9ce6cd2 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/streaming/AbstractPacketizerTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/streaming/AbstractPacketizerTests.java
@@ -109,4 +109,7 @@ class MockPacketizer extends AbstractPacketizer {
public byte getSessionId () { return _rpcSessionID; }
public RPCRequest getRPCRequest () { return _request; }
public byte getWiproVersion () { return _wiproVersion; }
+
+ @Override public void pause() { }
+ @Override public void resume() { }
} \ No newline at end of file
diff --git a/sdl_android_tests/src/com/smartdevicelink/test/streaming/StreamRPCPacketizerTests.java b/sdl_android_tests/src/com/smartdevicelink/test/streaming/StreamRPCPacketizerTests.java
index f5f0d575f..f905af39d 100644
--- a/sdl_android_tests/src/com/smartdevicelink/test/streaming/StreamRPCPacketizerTests.java
+++ b/sdl_android_tests/src/com/smartdevicelink/test/streaming/StreamRPCPacketizerTests.java
@@ -39,7 +39,7 @@ public class StreamRpcPacketizerTests extends TestCase {
URLConnection urlConnection = url.openConnection();
testInputStream = new BufferedInputStream(urlConnection.getInputStream());
- StreamRPCPacketizer testStreamRpcPacketizer = new StreamRPCPacketizer(testListener, testInputStream, testRequest, testSessionType, testSessionId, testWV);
+ StreamRPCPacketizer testStreamRpcPacketizer = new StreamRPCPacketizer(null, testListener, testInputStream, testRequest, testSessionType, testSessionId, testWV, testWV);
assertNotNull(Test.NOT_NULL, testStreamRpcPacketizer);
// NOTE: Cannot test thread handling methods currently.