summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Kast <julian@livio.com>2020-08-22 16:05:22 -0400
committerJulian Kast <julian@livio.com>2020-08-22 16:05:22 -0400
commit8750183930d06f53f51353e6839c6ae27a323547 (patch)
tree7b0cdd45604ec54d1727c2ddf94c6935e7966907
parentcbcb3d440bd8bdb9e8921288ed345c754697a603 (diff)
parent8548de0830155c981add487e9bd9f6b020110a2c (diff)
downloadsdl_android-8750183930d06f53f51353e6839c6ae27a323547.tar.gz
Merge branch 'develop' into TextAndGraphicsManager-Refactor-Queues
# Conflicts: # base/src/main/java/com/smartdevicelink/managers/screen/BaseTextAndGraphicManager.java
-rw-r--r--.github/workflows/android.yml2
-rw-r--r--README.md4
-rw-r--r--android/build.gradle2
-rw-r--r--android/gradle/wrapper/gradle-wrapper.properties4
-rwxr-xr-xandroid/hello_sdl_android/build.gradle4
-rw-r--r--android/sdl_android/build.gradle16
-rw-r--r--android/sdl_android/src/androidTest/assets/json/GetVehicleData.json6
-rw-r--r--android/sdl_android/src/androidTest/assets/json/StreamRPC.json10
-rw-r--r--android/sdl_android/src/androidTest/assets/json/SubscribeVehicleData.json5
-rw-r--r--android/sdl_android/src/androidTest/assets/json/SubtleAlert.json57
-rw-r--r--android/sdl_android/src/androidTest/assets/json/UnsubscribeVehicleData.json5
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/SdlManagerTests.java6
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java26
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlArtworkTests.java2
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java10
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/RpcConverterTest.java12
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/SystemCapabilityManagerTests.java8
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SoftButtonManagerTests.java2
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SubscribeButtonManagerTest.java6
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuCellTests.java2
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/video/VideoStreamManagerTests.java2
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java20
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java24
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/VehicleDataHelper.java15
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/LockScreenManagerTest.java142
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java18
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DynamicUpdateCapabilitiesTests.java95
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GearStatusTests.java71
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/WindowCapabilityTests.java23
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ImageFieldNameTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrndlTests.java10
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TextFieldNameTests.java3
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TransmissionTypeTests.java92
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VehicleDataTypeTests.java5
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VrCapabilitiesTests.java1
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java92
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java86
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java83
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateFileTest.java73
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateSubMenuTest.java78
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java20
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java5
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubtleAlertTests.java202
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java5
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java26
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java9
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubtleAlertResponseTests.java (renamed from android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java)58
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java17
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java31
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/managers/audio/AudioStreamManager.java2
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java8
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/managers/video/VideoStreamManager.java2
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java23
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java6
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java177
-rw-r--r--android/sdl_android/src/main/java/com/smartdevicelink/streaming/StreamRPCPacketizer.java175
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java23
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/file/BaseFileManager.java77
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseLifecycleManager.java73
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseSystemCapabilityManager.java9
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/lifecycle/OnSystemCapabilityListener.java2
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java2
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/BaseSubscribeButtonManager.java25
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/BaseTextAndGraphicManager.java3
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonReplaceOperation.java17
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonTransitionOperation.java8
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/BaseChoiceSetManager.java2
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/CheckChoiceVROptionalOperation.java43
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/DeleteChoicesOperation.java19
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadChoicesOperation.java12
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java38
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java37
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseMenuManager.java87
-rw-r--r--base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java11
-rw-r--r--base/src/main/java/com/smartdevicelink/protocol/enums/FunctionID.java15
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java9
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java1
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java63
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/CancelInteraction.java8
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java16
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java78
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java64
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java13
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java2
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/DynamicUpdateCapabilities.java137
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java95
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/GearStatus.java150
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java15
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java15
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/GetSystemCapabilityResponse.java15
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java65
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java45
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java77
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java78
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java106
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java190
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java67
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnSubtleAlertPressed.java (renamed from base/src/main/java/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java)53
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java18
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateFile.java111
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateSubMenu.java142
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java79
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java17
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java78
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java2
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java2
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java13
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java15
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/Show.java2
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java93
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java51
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlert.java275
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlertResponse.java97
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java95
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java52
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/WindowCapability.java23
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java12
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java73
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java18
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TransmissionType.java (renamed from base/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlConnectionState.java)63
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java6
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java71
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnMultipleRequestListener.java14
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java80
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCListener.java5
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java19
-rw-r--r--generator/README.md10
-rw-r--r--generator/templates/base_template.java2
-rw-r--r--generator/templates/javadoc_return.java3
-rw-r--r--generator/templates/javadoc_template.java3
-rw-r--r--generator/transformers/common_producer.py40
-rw-r--r--generator/transformers/functions_producer.py11
-rw-r--r--generator/transformers/structs_producer.py10
-rw-r--r--hello_sdl_java/build.gradle2
-rw-r--r--javaEE/build.gradle4
-rw-r--r--javaSE/build.gradle4
137 files changed, 3030 insertions, 2346 deletions
diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
index c2ec6bf32..696200b8c 100644
--- a/.github/workflows/android.yml
+++ b/.github/workflows/android.yml
@@ -42,6 +42,6 @@ jobs:
python3 ./generator/test/runner.py
- name: Codecov
- uses: codecov/codecov-action@v1.0.6
+ uses: codecov/codecov-action@v1.0.13
with:
yml: ./codecov.yml
diff --git a/README.md b/README.md
index 62b7566cb..2f9ebcf59 100644
--- a/README.md
+++ b/README.md
@@ -66,7 +66,7 @@ Developers using Proguard to shrink and obfuscate their code should be sure to i
### JavaSE
-[ ![Download JavaSE](https://api.bintray.com/packages/smartdevicelink/sdl_java_se/sdl_java_se/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_java_se/sdl_java_se/_latestVersion)
+[ ![Download JavaSE](https://api.bintray.com/packages/smartdevicelink/sdl_java_se/sdl_javase/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_java_se/sdl_javase/_latestVersion)
The JavaSE project is meant to allow SDL compatibility for embedded applications.
@@ -85,7 +85,7 @@ dependencies {
### JavaEE
-[ ![Download JavaEE](https://api.bintray.com/packages/smartdevicelink/sdl_java_ee/sdl_java_ee/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_java_ee/sdl_java_ee/_latestVersion)
+[ ![Download JavaEE](https://api.bintray.com/packages/smartdevicelink/sdl_java_ee/sdl_javaee/images/download.svg) ](https://bintray.com/smartdevicelink/sdl_java_ee/sdl_javaee/_latestVersion)
The JavaEE project is meant to allow SDL compatibility for web applications.
diff --git a/android/build.gradle b/android/build.gradle
index f94362a81..7ecff6a6a 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -7,7 +7,7 @@ buildscript {
jcenter()
}
dependencies {
- classpath 'com.android.tools.build:gradle:3.3.1'
+ classpath 'com.android.tools.build:gradle:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 567cd660e..6691197d2 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
-#Sun Jan 20 22:30:48 EST 2019
+#Wed Aug 19 13:26:39 EDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip \ No newline at end of file
+distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
diff --git a/android/hello_sdl_android/build.gradle b/android/hello_sdl_android/build.gradle
index 3e3a83528..f990b38e6 100755
--- a/android/hello_sdl_android/build.gradle
+++ b/android/hello_sdl_android/build.gradle
@@ -5,7 +5,7 @@ android {
defaultConfig {
applicationId "com.sdl.hellosdlandroid"
minSdkVersion 16
- targetSdkVersion 28
+ targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
@@ -54,7 +54,7 @@ dependencies {
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
- implementation 'androidx.appcompat:appcompat:1.0.0'
+ implementation 'androidx.appcompat:appcompat:1.2.0'
implementation project(path: ':sdl_android')
testImplementation 'junit:junit:4.12'
} \ No newline at end of file
diff --git a/android/sdl_android/build.gradle b/android/sdl_android/build.gradle
index 100a266ca..d35b06c49 100644
--- a/android/sdl_android/build.gradle
+++ b/android/sdl_android/build.gradle
@@ -1,6 +1,4 @@
apply plugin: 'com.android.library'
-import org.apache.tools.ant.taskdefs.condition.Os
-
android {
compileSdkVersion 29
@@ -48,13 +46,13 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations'
})
testImplementation 'junit:junit:4.12'
- testImplementation 'org.mockito:mockito-core:2.9.0'
+ testImplementation 'org.mockito:mockito-core:3.0.0'
+ androidTestImplementation 'org.mockito:mockito-core:3.0.0'
+ androidTestImplementation 'org.mockito:mockito-android:3.0.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
- androidTestImplementation 'org.mockito:mockito-core:2.9.0'
- androidTestImplementation 'org.mockito:mockito-android:2.9.0'
- api 'androidx.annotation:annotation:1.0.0'
- api 'androidx.lifecycle:lifecycle-extensions:2.0.0'
- annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.0.0'
+ api 'androidx.annotation:annotation:1.1.0'
+ api 'androidx.lifecycle:lifecycle-extensions:2.2.0'
+ annotationProcessor 'androidx.lifecycle:lifecycle-compiler:2.2.0'
}
buildscript {
@@ -63,7 +61,7 @@ buildscript {
mavenCentral()
}
dependencies {
- classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
+ classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
}
}
diff --git a/android/sdl_android/src/androidTest/assets/json/GetVehicleData.json b/android/sdl_android/src/androidTest/assets/json/GetVehicleData.json
index 3c8b6129b..e75de1d3b 100644
--- a/android/sdl_android/src/androidTest/assets/json/GetVehicleData.json
+++ b/android/sdl_android/src/androidTest/assets/json/GetVehicleData.json
@@ -32,6 +32,7 @@
"fuelRange":true,
"turnSignal":true,
"electronicParkBrakeStatus":true,
+ "gearStatus": true,
"oemCustomVehicleDataName":true,
"windowStatus": true
}
@@ -172,6 +173,11 @@
}
],
"oemCustomVehicleDataName":"oemCustomVehicleDataState",
+ "gearStatus": {
+ "userSelectedGear": "PARK",
+ "transmissionType": "ELECTRIC_VARIABLE",
+ "actualGear": "PARK"
+ },
"windowStatus": [
{
"location": {
diff --git a/android/sdl_android/src/androidTest/assets/json/StreamRPC.json b/android/sdl_android/src/androidTest/assets/json/StreamRPC.json
deleted file mode 100644
index ff20ffc93..000000000
--- a/android/sdl_android/src/androidTest/assets/json/StreamRPC.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "response":{
- "name":"StreamRPCResponse",
- "correlationID":198,
- "parameters":{
- "fileName":"test",
- "fileSize":100
- }
- }
-} \ No newline at end of file
diff --git a/android/sdl_android/src/androidTest/assets/json/SubscribeVehicleData.json b/android/sdl_android/src/androidTest/assets/json/SubscribeVehicleData.json
index a6ec021b0..c61da0661 100644
--- a/android/sdl_android/src/androidTest/assets/json/SubscribeVehicleData.json
+++ b/android/sdl_android/src/androidTest/assets/json/SubscribeVehicleData.json
@@ -31,6 +31,7 @@
"fuelRange":true,
"turnSignal":true,
"electronicParkBrakeStatus":true,
+ "gearStatus": true,
"oemCustomVehicleDataName":true,
"windowStatus": true,
"handsOffSteering": true
@@ -156,6 +157,10 @@
"dataType":"VEHICLEDATA_HANDSOFFSTEERING",
"resultCode":"SUCCESS"
},
+ "gearStatus":{
+ "dataType":"VEHICLEDATA_GEARSTATUS",
+ "resultCode":"SUCCESS"
+ },
"oemCustomVehicleDataName":{
"oemCustomDataType":"oemCustomVehicleDataName",
"resultCode":"SUCCESS"
diff --git a/android/sdl_android/src/androidTest/assets/json/SubtleAlert.json b/android/sdl_android/src/androidTest/assets/json/SubtleAlert.json
new file mode 100644
index 000000000..e845990c6
--- /dev/null
+++ b/android/sdl_android/src/androidTest/assets/json/SubtleAlert.json
@@ -0,0 +1,57 @@
+{
+ "request": {
+ "name": "SubtleAlert",
+ "correlationID": 444,
+ "parameters": {
+ "alertText1": "alertText1",
+ "alertText2": "alertText2",
+ "alertIcon": {
+ "value": "alertIconImage1.png",
+ "imageType": "DYNAMIC"
+ },
+ "ttsChunks": [
+ {
+ "text": "Phrase 1",
+ "type": "TEXT"
+ },
+ {
+ "text": "Phrase 2",
+ "type": "TEXT"
+ }
+ ],
+ "duration": 3000,
+ "softButtons": [
+ {
+ "isHighlighted": true,
+ "softButtonID": 6,
+ "systemAction": "STEAL_FOCUS",
+ "text": "Button 1",
+ "type": "IMAGE",
+ "image": {
+ "value": "image.png",
+ "imageType": "STATIC"
+ }
+ },
+ {
+ "isHighlighted": false,
+ "softButtonID": 3,
+ "systemAction": "DEFAULT_ACTION",
+ "text": "Button 2",
+ "type": "BOTH",
+ "image": {
+ "value": "image.png",
+ "imageType": "DYNAMIC"
+ }
+ }
+ ],
+ "cancelID": 30
+ }
+ },
+ "response": {
+ "name": "SubtleAlertResponse",
+ "correlationID": 444,
+ "parameters": {
+ "tryAgainTime": 400
+ }
+ }
+} \ No newline at end of file
diff --git a/android/sdl_android/src/androidTest/assets/json/UnsubscribeVehicleData.json b/android/sdl_android/src/androidTest/assets/json/UnsubscribeVehicleData.json
index 232e18b4d..dd00502e5 100644
--- a/android/sdl_android/src/androidTest/assets/json/UnsubscribeVehicleData.json
+++ b/android/sdl_android/src/androidTest/assets/json/UnsubscribeVehicleData.json
@@ -32,6 +32,7 @@
"turnSignal":true,
"electronicParkBrakeStatus":true,
"handsOffSteering": true,
+ "gearStatus": true,
"oemCustomVehicleDataName":true,
"windowStatus": true
}
@@ -156,6 +157,10 @@
"dataType":"VEHICLEDATA_HANDSOFFSTEERING",
"resultCode":"SUCCESS"
},
+ "gearStatus":{
+ "dataType":"VEHICLEDATA_GEARSTATUS",
+ "resultCode":"SUCCESS"
+ },
"oemCustomVehicleDataName":{
"oemCustomDataType":"oemCustomVehicleDataName",
"resultCode":"SUCCESS"
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/SdlManagerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/SdlManagerTests.java
index b33c4f494..7c4fb11ff 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/SdlManagerTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/SdlManagerTests.java
@@ -1,6 +1,7 @@
package com.smartdevicelink.managers;
import android.content.Context;
+
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.livio.taskmaster.Taskmaster;
@@ -18,7 +19,6 @@ import com.smartdevicelink.proxy.rpc.Show;
import com.smartdevicelink.proxy.rpc.TemplateColorScheme;
import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
import com.smartdevicelink.test.TestValues;
@@ -404,10 +404,6 @@ public class SdlManagerTests {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
}
};
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java
index dccd7c10b..8908346d2 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java
@@ -72,10 +72,9 @@ public class FileManagerTests {
RPCRequest message = (RPCRequest) args[0];
if (message instanceof PutFile) {
int correlationId = message.getCorrelationID();
- Result resultCode = Result.REJECTED;
- PutFileResponse putFileResponse = new PutFileResponse();
- putFileResponse.setSuccess(false);
- message.getOnRPCResponseListener().onError(correlationId, resultCode, "Binary data empty");
+ PutFileResponse putFileResponse = new PutFileResponse(false, Result.REJECTED);
+ putFileResponse.setInfo("Binary data empty");
+ message.getOnRPCResponseListener().onResponse(correlationId, putFileResponse);
}
return null;
}
@@ -88,13 +87,12 @@ public class FileManagerTests {
List<RPCRequest> rpcs = (List<RPCRequest>) args[0];
OnMultipleRequestListener listener = (OnMultipleRequestListener) args[1];
if (rpcs.get(0) instanceof PutFile) {
- Result resultCode = Result.REJECTED;
for (RPCRequest message : rpcs) {
int correlationId = message.getCorrelationID();
listener.addCorrelationId(correlationId);
- PutFileResponse putFileResponse = new PutFileResponse();
- putFileResponse.setSuccess(true);
- listener.onError(correlationId, resultCode, "Binary data empty");
+ PutFileResponse putFileResponse = new PutFileResponse(false, Result.REJECTED);
+ putFileResponse.setInfo("Binary data empty");
+ listener.onResponse(correlationId, putFileResponse);
}
listener.onFinished();
}
@@ -197,13 +195,12 @@ public class FileManagerTests {
List<RPCRequest> rpcs = (List<RPCRequest>) args[0];
OnMultipleRequestListener listener = (OnMultipleRequestListener) args[1];
if (rpcs.get(0) instanceof DeleteFile) {
- Result resultCode = Result.REJECTED;
for (RPCRequest message : rpcs) {
int correlationId = message.getCorrelationID();
listener.addCorrelationId(correlationId);
- DeleteFileResponse deleteFileResponse = new DeleteFileResponse();
- deleteFileResponse.setSuccess(true);
- listener.onError(correlationId, resultCode, "Binary data empty");
+ DeleteFileResponse deleteFileResponse = new DeleteFileResponse(false, Result.REJECTED);
+ deleteFileResponse.setInfo("Binary data empty");
+ listener.onResponse(correlationId, deleteFileResponse);
}
listener.onFinished();
}
@@ -218,7 +215,6 @@ public class FileManagerTests {
List<RPCRequest> rpcs = (List<RPCRequest>) args[0];
OnMultipleRequestListener listener = (OnMultipleRequestListener) args[1];
if (rpcs.get(0) instanceof PutFile) {
- Result resultCode = Result.REJECTED;
boolean flip = false;
for (RPCRequest message : rpcs) {
int correlationId = message.getCorrelationID();
@@ -231,7 +227,9 @@ public class FileManagerTests {
} else {
flip = true;
putFileResponse.setSuccess(false);
- listener.onError(correlationId, resultCode, "Binary data empty");
+ putFileResponse.setResultCode(Result.REJECTED);
+ putFileResponse.setInfo("Binary data empty");
+ listener.onResponse(correlationId, putFileResponse);
}
}
listener.onFinished();
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlArtworkTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlArtworkTests.java
index 5c59f20d7..ab27c66cc 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlArtworkTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlArtworkTests.java
@@ -1,4 +1,4 @@
-package com.smartdevicelink.managers.file;
+package com.smartdevicelink.managers.file.filetypes;
import androidx.test.ext.junit.runners.AndroidJUnit4;
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java
index 86f328e8a..99d34fdff 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/filetypes/SdlFileTests.java
@@ -40,6 +40,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import static junit.framework.TestCase.assertEquals;
+import static junit.framework.TestCase.assertFalse;
@RunWith(AndroidJUnit4.class)
public class SdlFileTests {
@@ -60,6 +61,7 @@ public class SdlFileTests {
assertEquals(sdlFile.getType(), TestValues.GENERAL_FILETYPE);
sdlFile.setPersistent(TestValues.GENERAL_BOOLEAN);
assertEquals(sdlFile.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile.getOverwrite());
// Case 2 (Setting resourceId)
sdlFile = new SdlFile();
@@ -73,6 +75,7 @@ public class SdlFileTests {
assertEquals(sdlFile.getType(), TestValues.GENERAL_FILETYPE);
sdlFile.setPersistent(TestValues.GENERAL_BOOLEAN);
assertEquals(sdlFile.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile.getOverwrite());
// Case 3 (Setting URI)
sdlFile = new SdlFile();
@@ -86,6 +89,7 @@ public class SdlFileTests {
assertEquals(sdlFile.getType(), TestValues.GENERAL_FILETYPE);
sdlFile.setPersistent(TestValues.GENERAL_BOOLEAN);
assertEquals(sdlFile.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile.getOverwrite());
}
@Test
@@ -96,6 +100,7 @@ public class SdlFileTests {
assertEquals(sdlFile1.getType(), TestValues.GENERAL_FILETYPE);
assertEquals((Integer) sdlFile1.getResourceId(), TestValues.GENERAL_INTEGER);
assertEquals(sdlFile1.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile1.getOverwrite());
// Case2 (Let the library generate a name)
SdlFile sdlFile2 = new SdlFile(null, TestValues.GENERAL_FILETYPE, TestValues.GENERAL_INTEGER, TestValues.GENERAL_BOOLEAN);
@@ -105,6 +110,7 @@ public class SdlFileTests {
assertEquals(sdlFile2.getType(), TestValues.GENERAL_FILETYPE);
assertEquals((Integer) sdlFile2.getResourceId(), TestValues.GENERAL_INTEGER);
assertEquals(sdlFile2.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile2.getOverwrite());
}
@Test
@@ -115,6 +121,7 @@ public class SdlFileTests {
assertEquals(sdlFile1.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile1.getFileData(), TestValues.GENERAL_BYTE_ARRAY);
assertEquals(sdlFile1.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile1.getOverwrite());
// Case2 (Let the library generate a name)
SdlFile sdlFile2 = new SdlFile(null, TestValues.GENERAL_FILETYPE, TestValues.GENERAL_BYTE_ARRAY, TestValues.GENERAL_BOOLEAN);
@@ -124,6 +131,7 @@ public class SdlFileTests {
assertEquals(sdlFile2.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile2.getFileData(), TestValues.GENERAL_BYTE_ARRAY);
assertEquals(sdlFile2.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile2.getOverwrite());
}
@Test
@@ -134,6 +142,7 @@ public class SdlFileTests {
assertEquals(sdlFile1.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile1.getUri(), TestValues.GENERAL_URI);
assertEquals(sdlFile1.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile1.getOverwrite());
// Case2 (Let the library generate a name)
SdlFile sdlFile2 = new SdlFile(null, TestValues.GENERAL_FILETYPE, TestValues.GENERAL_URI, TestValues.GENERAL_BOOLEAN);
@@ -143,5 +152,6 @@ public class SdlFileTests {
assertEquals(sdlFile2.getType(), TestValues.GENERAL_FILETYPE);
assertEquals(sdlFile2.getUri(), TestValues.GENERAL_URI);
assertEquals(sdlFile2.isPersistent(), TestValues.GENERAL_BOOLEAN);
+ assertFalse(sdlFile2.getOverwrite());
}
}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/RpcConverterTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/RpcConverterTest.java
index 744779ef4..d8bf8422a 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/RpcConverterTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/RpcConverterTest.java
@@ -40,10 +40,6 @@ public class RpcConverterTest {
case ENCODED_SYNC_P_DATA:
case ON_ENCODED_SYNC_P_DATA:
case GENERIC_RESPONSE:
- case STREAM_RPC:
- case ON_LOCK_SCREEN_STATUS:
- case ON_SDL_CHOICE_CHOSEN:
- case ON_STREAM_RPC:
continue;
default:
@@ -70,10 +66,6 @@ public class RpcConverterTest {
case ENCODED_SYNC_P_DATA:
case ON_ENCODED_SYNC_P_DATA:
case GENERIC_RESPONSE:
- case STREAM_RPC:
- case ON_LOCK_SCREEN_STATUS:
- case ON_SDL_CHOICE_CHOSEN:
- case ON_STREAM_RPC:
return null;
case SHOW_CONSTANT_TBT:
rpcClassName.append("ShowConstantTbt");
@@ -109,10 +101,6 @@ public class RpcConverterTest {
case ENCODED_SYNC_P_DATA:
case ON_ENCODED_SYNC_P_DATA:
case GENERIC_RESPONSE:
- case STREAM_RPC:
- case ON_LOCK_SCREEN_STATUS:
- case ON_SDL_CHOICE_CHOSEN:
- case ON_STREAM_RPC:
continue;
default:
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/SystemCapabilityManagerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/SystemCapabilityManagerTests.java
index 8f5db72a4..4c1981099 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/SystemCapabilityManagerTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/lifecycle/SystemCapabilityManagerTests.java
@@ -1,8 +1,9 @@
package com.smartdevicelink.managers.lifecycle;
-import androidx.test.ext.junit.runners.AndroidJUnit4;
import android.util.SparseArray;
+import androidx.test.ext.junit.runners.AndroidJUnit4;
+
import com.livio.taskmaster.Taskmaster;
import com.smartdevicelink.managers.ManagerUtility;
import com.smartdevicelink.protocol.enums.FunctionID;
@@ -13,7 +14,6 @@ import com.smartdevicelink.proxy.interfaces.IAudioStreamListener;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.interfaces.ISdlServiceListener;
import com.smartdevicelink.proxy.interfaces.IVideoStreamListener;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.AppServiceCapability;
import com.smartdevicelink.proxy.rpc.AppServicesCapabilities;
import com.smartdevicelink.proxy.rpc.AudioPassThruCapabilities;
@@ -208,8 +208,8 @@ public class SystemCapabilityManagerTests {
@Test
public void testNullDisplayCapabilitiesEnablesAllTextAndImageFields() {
List<DisplayCapability> displayCapabilityList = createDisplayCapabilityList(null, TestValues.GENERAL_BUTTONCAPABILITIES_LIST, TestValues.GENERAL_SOFTBUTTONCAPABILITIES_LIST);
- assertEquals(displayCapabilityList.get(0).getWindowCapabilities().get(0).getTextFields().size(), 29);
- assertEquals(displayCapabilityList.get(0).getWindowCapabilities().get(0).getImageFields().size(), 14);
+ assertEquals(displayCapabilityList.get(0).getWindowCapabilities().get(0).getTextFields().size(), 32);
+ assertEquals(displayCapabilityList.get(0).getWindowCapabilities().get(0).getImageFields().size(), 16);
}
@Test
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SoftButtonManagerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SoftButtonManagerTests.java
index 3a680221e..e5daf375b 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SoftButtonManagerTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SoftButtonManagerTests.java
@@ -8,9 +8,9 @@ import com.livio.taskmaster.Taskmaster;
import com.smartdevicelink.managers.file.FileManager;
import com.smartdevicelink.managers.file.MultipleFileCompletionListener;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.interfaces.ISdl;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.DisplayCapability;
import com.smartdevicelink.proxy.rpc.Image;
import com.smartdevicelink.proxy.rpc.OnButtonEvent;
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SubscribeButtonManagerTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SubscribeButtonManagerTest.java
index 8e16c3ed0..b16889934 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SubscribeButtonManagerTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/SubscribeButtonManagerTest.java
@@ -61,9 +61,9 @@ public class SubscribeButtonManagerTest {
Object[] args = invocation.getArguments();
RPCRequest message = (RPCRequest) args[0];
if(message instanceof SubscribeButton){
- SubscribeButtonResponse subscribeButtonResponse = new SubscribeButtonResponse();
- subscribeButtonResponse.setSuccess(false);
- message.getOnRPCResponseListener().onError(message.getCorrelationID(), Result.GENERIC_ERROR, "Fail");
+ SubscribeButtonResponse subscribeButtonResponse = new SubscribeButtonResponse(false, Result.GENERIC_ERROR);
+ subscribeButtonResponse.setInfo("Fail");
+ message.getOnRPCResponseListener().onResponse(message.getCorrelationID(), subscribeButtonResponse);
}
return null;
}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuCellTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuCellTests.java
index 518fa451c..eae5b530a 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuCellTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/screen/menu/MenuCellTests.java
@@ -34,7 +34,7 @@ package com.smartdevicelink.managers.screen.menu;
import androidx.test.ext.junit.runners.AndroidJUnit4;
-import com.smartdevicelink.managers.file.SdlArtworkTests;
+import com.smartdevicelink.managers.file.filetypes.SdlArtworkTests;
import com.smartdevicelink.proxy.rpc.enums.MenuLayout;
import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
import com.smartdevicelink.test.TestValues;
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/video/VideoStreamManagerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/video/VideoStreamManagerTests.java
index 1701dcc99..a393bf34f 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/video/VideoStreamManagerTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/video/VideoStreamManagerTests.java
@@ -10,12 +10,12 @@ import android.view.MotionEvent;
import android.view.View;
import com.smartdevicelink.managers.CompletionListener;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.protocol.enums.SessionType;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.interfaces.ISdlServiceListener;
import com.smartdevicelink.proxy.interfaces.IVideoStreamListener;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.ImageResolution;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
import com.smartdevicelink.proxy.rpc.OnTouchEvent;
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java
index b76fbade1..05d0327a7 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/TestValues.java
@@ -38,7 +38,9 @@ import com.smartdevicelink.proxy.rpc.DeviceInfo;
import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
import com.smartdevicelink.proxy.rpc.DisplayCapability;
import com.smartdevicelink.proxy.rpc.DriverDistractionCapability;
+import com.smartdevicelink.proxy.rpc.DynamicUpdateCapabilities;
import com.smartdevicelink.proxy.rpc.EqualizerSettings;
+import com.smartdevicelink.proxy.rpc.GearStatus;
import com.smartdevicelink.proxy.rpc.Grid;
import com.smartdevicelink.proxy.rpc.HMICapabilities;
import com.smartdevicelink.proxy.rpc.HMIPermissions;
@@ -167,6 +169,7 @@ import com.smartdevicelink.proxy.rpc.enums.MetadataType;
import com.smartdevicelink.proxy.rpc.enums.ModuleType;
import com.smartdevicelink.proxy.rpc.enums.NavigationAction;
import com.smartdevicelink.proxy.rpc.enums.NavigationJunction;
+import com.smartdevicelink.proxy.rpc.enums.PRNDL;
import com.smartdevicelink.proxy.rpc.enums.PowerModeQualificationStatus;
import com.smartdevicelink.proxy.rpc.enums.PowerModeStatus;
import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
@@ -190,6 +193,7 @@ import com.smartdevicelink.proxy.rpc.enums.TemperatureUnit;
import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
import com.smartdevicelink.proxy.rpc.enums.TouchType;
+import com.smartdevicelink.proxy.rpc.enums.TransmissionType;
import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
@@ -418,6 +422,7 @@ public class TestValues {
public static final AudioControlData GENERAL_AUDIOCONTROLDATA = new AudioControlData();
public static final LightControlData GENERAL_LIGHTCONTROLDATA = new LightControlData();
public static final HMISettingsControlData GENERAL_HMISETTINGSCONTROLDATA = new HMISettingsControlData();
+ public static final DynamicUpdateCapabilities GENERAL_DYNAMICUPDATECAPABILITIES = new DynamicUpdateCapabilities();
public static final VehicleDataResult GENERAL_OEM_CUSTOM_VEHICLE_DATA = new VehicleDataResult();
public static final TemplateConfiguration GENERAL_TEMPLATE_CONFIGURATION = new TemplateConfiguration();
@@ -440,6 +445,10 @@ public class TestValues {
public static final SeatLocation GENERAL_SEAT_LOCATION = new SeatLocation();
public static final ModuleInfo GENERAL_MODULE_INFO = new ModuleInfo();
public static final WindowType GENERAL_WINDOWTYPE = WindowType.MAIN;
+ public static final GearStatus GENERAL_GEAR_STATUS = new GearStatus();
+ public static final PRNDL GENERAL_USER_SELECTED_GEAR = PRNDL.NEUTRAL;
+ public static final PRNDL GENERAL_ACTUAL_GEAR = PRNDL.DRIVE;
+ public static final TransmissionType GENERAL_TRANSMISSION_TYPE = TransmissionType.AUTOMATIC;
public static final Grid GENERAL_LOCATION_GRID = new Grid(2, 3);
public static final WindowState GENERAL_WINDOW_STATE = new WindowState(2, 3);
public static final Integer GENERAL_APPROX_POSITION = new Integer(3);
@@ -574,6 +583,7 @@ public class TestValues {
public static final JSONArray JSON_IMAGE_TYPES = new JSONArray();
public static final JSONObject JSON_DISPLAYCAPABILITY = new JSONObject();
public static final JSONArray JSON_DISPLAYCAPABILITY_LIST = new JSONArray();
+ public static final JSONObject JSON_DYNAMICUPDATECAPABILITIES = new JSONObject();
static {
GENERAL_TOUCHEVENTCAPABILITIES.setDoublePressAvailable(GENERAL_BOOLEAN);
GENERAL_TOUCHEVENTCAPABILITIES.setMultiTouchAvailable(GENERAL_BOOLEAN);
@@ -626,6 +636,9 @@ public class TestValues {
GENERAL_HMISETTINGSCONTROLDATA.setTemperatureUnit(GENERAL_TEMPERATUREUNIT);
GENERAL_HMISETTINGSCONTROLDATA.setDisplayMode(GENERAL_DISPLAYMODE);
+ GENERAL_DYNAMICUPDATECAPABILITIES.setSupportsDynamicSubMenus(GENERAL_BOOLEAN);
+ GENERAL_DYNAMICUPDATECAPABILITIES.setSupportedDynamicImageFieldNames(Collections.singletonList(GENERAL_IMAGEFIELDNAME));
+
GENERAL_LIGHTCONTROLDATA.setLightState(GENERAL_LIGHTSTATE_LIST);
GENERAL_STATIONIDNUMBER.setCountryCode(GENERAL_INT);
@@ -1124,6 +1137,10 @@ public class TestValues {
GENERAL_MODULE_INFO.setModuleServiceArea(TestValues.GENERAL_GRID);
GENERAL_MODULE_INFO.setMultipleAccessAllowance(TestValues.GENERAL_BOOLEAN);
+ GENERAL_GEAR_STATUS.setActualGear(GENERAL_ACTUAL_GEAR);
+ GENERAL_GEAR_STATUS.setTransmissionType(GENERAL_TRANSMISSION_TYPE);
+ GENERAL_GEAR_STATUS.setUserSelectedGear(GENERAL_USER_SELECTED_GEAR);
+
GENERAL_WINDOW_STATUS.setLocation(TestValues.GENERAL_GRID);
GENERAL_WINDOW_STATUS.setState(TestValues.GENERAL_WINDOW_STATE);
@@ -1342,6 +1359,9 @@ public class TestValues {
JSON_DISPLAYCAPABILITY.put(DisplayCapability.KEY_WINDOW_CAPABILITIES, JSON_WINDOW_CAPABILITIES);
JSON_DISPLAYCAPABILITY_LIST.put(JSON_DISPLAYCAPABILITY);
+ JSON_DYNAMICUPDATECAPABILITIES.put(DynamicUpdateCapabilities.KEY_SUPPORTS_DYNAMIC_SUB_MENUS, GENERAL_BOOLEAN);
+ JSON_DYNAMICUPDATECAPABILITIES.put(DynamicUpdateCapabilities.KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES, JsonUtils.createJsonArray(Collections.singletonList(GENERAL_IMAGEFIELDNAME)));
+
JSON_TOUCHCOORD.put(TouchCoord.KEY_X, GENERAL_INT);
JSON_TOUCHCOORD.put(TouchCoord.KEY_Y, GENERAL_INT);
JSON_TOUCHCOORDS.put(JSON_TOUCHCOORD);
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
index 9cf1fdd85..d34bfea07 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
@@ -11,8 +11,10 @@ import com.smartdevicelink.proxy.rpc.enums.DefrostZone;
import com.smartdevicelink.proxy.rpc.enums.FileType;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.HmiZoneCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.PRNDL;
import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
import com.smartdevicelink.proxy.rpc.enums.SpeechCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.TransmissionType;
import com.smartdevicelink.proxy.rpc.enums.VentilationMode;
import java.util.Iterator;
@@ -3827,6 +3829,28 @@ public class Validator{
return validateGrid(cap1.getGrid(), cap2.getGrid());
}
+ public static boolean validateGearStatuses(GearStatus status1, GearStatus status2) {
+ if (status1 == null) {
+ return (status2 == null);
+ }
+ if (status2 == null) {
+ return (status1 == null);
+ }
+
+ PRNDL actualGear1 = status1.getActualGear();
+ PRNDL actualGear2 = status2.getActualGear();
+
+ TransmissionType transmissionType1 = status1.getTransmissionType();
+ TransmissionType transmissionType2 = status2.getTransmissionType();
+
+ PRNDL userSelectedGear1 = status1.getUserSelectedGear();
+ PRNDL userSelectedGear2 = status2.getUserSelectedGear();
+
+ return actualGear1.equals(actualGear2)
+ && transmissionType1.equals(transmissionType2)
+ && userSelectedGear1.equals(userSelectedGear2);
+ }
+
public static boolean validateWindowStatuses(List<WindowStatus> item1, List<WindowStatus> item2) {
if (item1 == null) {
return ( item2 == null );
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/VehicleDataHelper.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/VehicleDataHelper.java
index f200b46e7..542cf28c3 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/VehicleDataHelper.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/VehicleDataHelper.java
@@ -9,6 +9,7 @@ import com.smartdevicelink.proxy.rpc.ECallInfo;
import com.smartdevicelink.proxy.rpc.EmergencyEvent;
import com.smartdevicelink.proxy.rpc.FuelRange;
import com.smartdevicelink.proxy.rpc.GPSData;
+import com.smartdevicelink.proxy.rpc.GearStatus;
import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse;
import com.smartdevicelink.proxy.rpc.Grid;
import com.smartdevicelink.proxy.rpc.HeadLampStatus;
@@ -35,6 +36,7 @@ import com.smartdevicelink.proxy.rpc.enums.PRNDL;
import com.smartdevicelink.proxy.rpc.enums.PowerModeQualificationStatus;
import com.smartdevicelink.proxy.rpc.enums.PowerModeStatus;
import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
+import com.smartdevicelink.proxy.rpc.enums.TransmissionType;
import com.smartdevicelink.proxy.rpc.enums.TurnSignal;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataEventStatus;
import com.smartdevicelink.proxy.rpc.enums.VehicleDataNotificationStatus;
@@ -196,6 +198,12 @@ public class VehicleDataHelper{
public static final FuelType FUEL_RANGE_TYPE = FuelType.GASOLINE;
public static final Float FUEL_RANGE_RANGE = TestValues.GENERAL_FLOAT;
+ // Gear status
+ public static final GearStatus GEAR_STATUS = new GearStatus();
+ public static final PRNDL USER_SELECTED_GEAR = PRNDL.FIRST;
+ public static final PRNDL ACTUAL_GEAR = PRNDL.SECOND;
+ public static final TransmissionType TRANSMISSION_TYPE = TransmissionType.ELECTRIC_VARIABLE;
+
// WindowStatus
public static final Grid LOCATION_GRID = TestValues.GENERAL_LOCATION_GRID;
public static final WindowState WINDOW_STATE = TestValues.GENERAL_WINDOW_STATE;
@@ -341,6 +349,11 @@ public class VehicleDataHelper{
e.printStackTrace();
}
+ // GEAR_STATUS
+ GEAR_STATUS.setTransmissionType(TRANSMISSION_TYPE);
+ GEAR_STATUS.setUserSelectedGear(USER_SELECTED_GEAR);
+ GEAR_STATUS.setActualGear(ACTUAL_GEAR);
+
//set up the OnVehicleData object
VEHICLE_DATA.setSpeed(SPEED);
VEHICLE_DATA.setRpm(RPM);
@@ -371,6 +384,7 @@ public class VehicleDataHelper{
VEHICLE_DATA.setFuelRange(FUEL_RANGE_LIST);
VEHICLE_DATA.setTurnSignal(TURN_SIGNAL);
VEHICLE_DATA.setElectronicParkBrakeStatus(ELECTRONIC_PARK_BRAKE_STATUS);
+ VEHICLE_DATA.setGearStatus(GEAR_STATUS);
VEHICLE_DATA.setWindowStatus(WINDOW_STATUS_LIST);
VEHICLE_DATA.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, OEM_CUSTOM_VEHICLE_DATA_STATE);
VEHICLE_DATA.setHandsOffSteering(HANDS_OFF_STEERING);
@@ -404,6 +418,7 @@ public class VehicleDataHelper{
VEHICLE_DATA_RESPONSE.setFuelRange(FUEL_RANGE_LIST);
VEHICLE_DATA_RESPONSE.setTurnSignal(TURN_SIGNAL);
VEHICLE_DATA_RESPONSE.setElectronicParkBrakeStatus(ELECTRONIC_PARK_BRAKE_STATUS);
+ VEHICLE_DATA_RESPONSE.setGearStatus(GEAR_STATUS);
VEHICLE_DATA_RESPONSE.setWindowStatus(WINDOW_STATUS_LIST);
VEHICLE_DATA_RESPONSE.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, OEM_CUSTOM_VEHICLE_DATA_STATE);
VEHICLE_DATA_RESPONSE.setHandsOffSteering(HANDS_OFF_STEERING);
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/LockScreenManagerTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/LockScreenManagerTest.java
deleted file mode 100644
index 082c87fda..000000000
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/LockScreenManagerTest.java
+++ /dev/null
@@ -1,142 +0,0 @@
-package com.smartdevicelink.test.proxy;
-
-import com.smartdevicelink.proxy.LockScreenManager;
-import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus;
-import com.smartdevicelink.test.TestValues;
-
-import junit.framework.TestCase;
-
-/**
- * This is a unit test class for the SmartDeviceLink library project class :
- * {@link com.smartdevicelink.proxy.LockScreenManager}
- */
-public class LockScreenManagerTest extends TestCase {
-
- /**
- * This is a unit test for the following methods :
- * {@link com.smartdevicelink.proxy.LockScreenManager#setDriverDistStatus(boolean)}
- */
- public void testDriverDistStatus(){
- LockScreenManager lockMan = new LockScreenManager();
- lockMan.setDriverDistStatus(true);
- assertEquals(TestValues.MATCH, true, (boolean) lockMan.getLockObj().getDriverDistractionStatus());
-
- lockMan.setDriverDistStatus(false);
- assertEquals(TestValues.MATCH, false, (boolean) lockMan.getLockObj().getDriverDistractionStatus());
- }
-
- /**
- * This is a unit test for the following methods :
- * {@link com.smartdevicelink.proxy.LockScreenManager#setHMILevel(HMILevel)}
- */
- public void testHmiLevelStatus(){
- LockScreenManager lockMan = new LockScreenManager();
- lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
- assertEquals(TestValues.MATCH, HMILevel.HMI_BACKGROUND, lockMan.getLockObj().getHMILevel());
-
- lockMan.setHMILevel(HMILevel.HMI_FULL);
- assertEquals(TestValues.MATCH, HMILevel.HMI_FULL, lockMan.getLockObj().getHMILevel());
-
- lockMan.setHMILevel(HMILevel.HMI_LIMITED);
- assertEquals(TestValues.MATCH, HMILevel.HMI_LIMITED, lockMan.getLockObj().getHMILevel());
-
- lockMan.setHMILevel(HMILevel.HMI_NONE);
- assertEquals(TestValues.MATCH, HMILevel.HMI_NONE, lockMan.getLockObj().getHMILevel());
-
- lockMan.setHMILevel(null);
- assertNull(TestValues.NULL, lockMan.getLockObj().getHMILevel());
- }
-
- /**
- * Test the lock screen status when no setter methods are called.
- */
- public void testLockScreenStatusNull(){
- LockScreenManager lockMan = new LockScreenManager();
- OnLockScreenStatus result = lockMan.getLockObj();
- assertNotNull(TestValues.NOT_NULL, result);
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
- }
-
- /**
- * Test the invalid settings of lock screen status.
- */
- public void testLockScreenStatusDriverDistNull(){
- LockScreenManager lockMan = new LockScreenManager();
-
- OnLockScreenStatus result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_NONE);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_FULL);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_LIMITED);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());
- }
-
- /**
- * Test the enabled settings of lock screen status.
- */
- public void testLockScreenStatusDriverDistEnabled(){
- LockScreenManager lockMan = new LockScreenManager();
- lockMan.setDriverDistStatus(true);
-
- // HMI level is null
- OnLockScreenStatus result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_NONE);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_FULL);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_LIMITED);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.REQUIRED, result.getShowLockScreen());
- }
-
- /**
- * Test the disabled settings of lock screen status.
- */
- public void testLockScreenStatusDriverDistDisabled(){
- LockScreenManager lockMan = new LockScreenManager();
- lockMan.setDriverDistStatus(false);
-
- OnLockScreenStatus result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_NONE);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_BACKGROUND);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OFF, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_FULL);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OPTIONAL, result.getShowLockScreen());
-
- lockMan.setHMILevel(HMILevel.HMI_LIMITED);
- result = lockMan.getLockObj();
- assertEquals(TestValues.MATCH, LockScreenStatus.OPTIONAL, result.getShowLockScreen());
- }
-} \ No newline at end of file
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java
index da8b48d8c..92670c7d4 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java
@@ -15,6 +15,7 @@ import com.smartdevicelink.proxy.SdlProxyBase;
import com.smartdevicelink.proxy.SdlProxyBuilder;
import com.smartdevicelink.proxy.SdlProxyConfigurationResources;
import com.smartdevicelink.proxy.interfaces.IProxyListenerALM;
+import com.smartdevicelink.proxy.rpc.GenericResponse;
import com.smartdevicelink.proxy.rpc.Show;
import com.smartdevicelink.proxy.rpc.ShowResponse;
import com.smartdevicelink.proxy.rpc.Speak;
@@ -229,15 +230,14 @@ public class SdlProxyBaseTests {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- onErrorListenerCounter++;
- remainingRequestsExpected--;
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
- onResponseListenerCounter++;
- remainingRequestsExpected--;
+ if (response.getSuccess()) {
+ onResponseListenerCounter++;
+ remainingRequestsExpected--;
+ } else {
+ onErrorListenerCounter++;
+ remainingRequestsExpected--;
+ }
}
};
try {
@@ -280,7 +280,7 @@ public class SdlProxyBaseTests {
while (rpcsTempList.size() != 0){
RPCRequest request = rpcsTempList.remove(0);
if (request instanceof Speak) {
- requestsMap.get(request).onError(request.getCorrelationID(), Result.DISALLOWED, "ERROR");
+ requestsMap.get(request).onResponse(request.getCorrelationID(), new GenericResponse(false, Result.DISALLOWED));
} else if (request instanceof Show) {
requestsMap.get(request).onResponse(request.getCorrelationID(), new ShowResponse(true, Result.SUCCESS));
}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DynamicUpdateCapabilitiesTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DynamicUpdateCapabilitiesTests.java
new file mode 100644
index 000000000..01e318e8a
--- /dev/null
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DynamicUpdateCapabilitiesTests.java
@@ -0,0 +1,95 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.DynamicUpdateCapabilities;
+import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.TestValues;
+
+import junit.framework.TestCase;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.proxy.rpc.DynamicUpdateCapabilities}
+ */
+public class DynamicUpdateCapabilitiesTests extends TestCase {
+
+ private DynamicUpdateCapabilities msg;
+
+ @Override
+ protected void setUp() throws Exception {
+ msg = new DynamicUpdateCapabilities();
+
+ msg.setSupportsDynamicSubMenus(TestValues.GENERAL_BOOLEAN);
+ msg.setSupportedDynamicImageFieldNames(Collections.singletonList(TestValues.GENERAL_IMAGEFIELDNAME));
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ boolean supportDynamicSubMenu = msg.getSupportsDynamicSubMenus();
+ List<ImageFieldName> imageFieldNames = msg.getSupportedDynamicImageFieldNames();
+
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, supportDynamicSubMenu);
+ assertEquals(TestValues.MATCH, Collections.singletonList(TestValues.GENERAL_IMAGEFIELDNAME).size(), imageFieldNames.size());
+
+ for (int i = 0; i < Collections.singletonList(TestValues.GENERAL_IMAGEFIELDNAME).size(); i++) {
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_IMAGEFIELDNAME, imageFieldNames.get(i));
+ }
+
+ DynamicUpdateCapabilities msg = new DynamicUpdateCapabilities();
+ assertNotNull(TestValues.NOT_NULL, msg);
+
+ assertNull(TestValues.NULL, msg.getSupportsDynamicSubMenus());
+ assertNull(TestValues.NULL, msg.getSupportedDynamicImageFieldNames());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(DynamicUpdateCapabilities.KEY_SUPPORTS_DYNAMIC_SUB_MENUS, TestValues.GENERAL_BOOLEAN);
+ reference.put(DynamicUpdateCapabilities.KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES, JsonUtils.createJsonArray(Collections.singletonList(TestValues.GENERAL_IMAGEFIELDNAME)));
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(TestValues.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+
+ if (key.equals(DynamicUpdateCapabilities.KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES)) {
+ JSONArray referenceArray = JsonUtils.readJsonArrayFromJsonObject(reference, key);
+ JSONArray underTestArray = JsonUtils.readJsonArrayFromJsonObject(underTest, key);
+ List<ImageFieldName> imageFieldNameListReference = new ArrayList<>();
+ List<ImageFieldName> imageFieldNameListTest = new ArrayList<>();
+
+ assertEquals(TestValues.MATCH, referenceArray.length(), underTestArray.length());
+
+ for (int i = 0; i < referenceArray.length(); i++) {
+ imageFieldNameListReference.add( (ImageFieldName) referenceArray.get(i));
+ imageFieldNameListTest.add( (ImageFieldName) underTestArray.get(i));
+ }
+ assertTrue(TestValues.TRUE, imageFieldNameListReference.containsAll(imageFieldNameListTest) && imageFieldNameListTest.containsAll(imageFieldNameListReference));
+ } else if (key.equals(DynamicUpdateCapabilities.KEY_SUPPORTS_DYNAMIC_SUB_MENUS)) {
+ boolean referenceBool = JsonUtils.readBooleanFromJsonObject(reference, key);
+ boolean underTestBool = JsonUtils.readBooleanFromJsonObject(underTest, key);
+ assertEquals(TestValues.MATCH, referenceBool, underTestBool);
+ } else {
+ assertEquals(TestValues.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ }
+ } catch (JSONException e) {
+ fail(TestValues.JSON_FAIL);
+ }
+ }
+}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GearStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GearStatusTests.java
new file mode 100644
index 000000000..eed1a1df2
--- /dev/null
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GearStatusTests.java
@@ -0,0 +1,71 @@
+package com.smartdevicelink.test.rpc.datatypes;
+
+import com.smartdevicelink.proxy.rpc.GearStatus;
+import com.smartdevicelink.proxy.rpc.enums.PRNDL;
+import com.smartdevicelink.proxy.rpc.enums.TransmissionType;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.TestValues;
+
+import junit.framework.TestCase;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.util.Iterator;
+
+public class GearStatusTests extends TestCase {
+ private GearStatus msg;
+
+ @Override
+ public void setUp() {
+ msg = new GearStatus();
+
+ msg.setUserSelectedGear(TestValues.GENERAL_USER_SELECTED_GEAR);
+ msg.setActualGear(TestValues.GENERAL_ACTUAL_GEAR);
+ msg.setTransmissionType(TestValues.GENERAL_TRANSMISSION_TYPE);
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ public void testRpcValues() {
+ // Test Values
+ PRNDL userSelectedGear = msg.getUserSelectedGear();
+ PRNDL actualGear = msg.getActualGear();
+ TransmissionType transmissionType = msg.getTransmissionType();
+
+ // Valid Tests
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_USER_SELECTED_GEAR, userSelectedGear);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_ACTUAL_GEAR, actualGear);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_TRANSMISSION_TYPE, transmissionType);
+
+ // Invalid/Null Tests
+ GearStatus msg = new GearStatus();
+ assertNotNull(TestValues.NOT_NULL, msg);
+
+ assertNull(TestValues.NULL, msg.getActualGear());
+ assertNull(TestValues.NULL, msg.getUserSelectedGear());
+ assertNull(TestValues.NULL, msg.getTransmissionType());
+ }
+
+ public void testJson() {
+ JSONObject reference = new JSONObject();
+
+ try {
+ reference.put(GearStatus.KEY_ACTUAL_GEAR, TestValues.GENERAL_ACTUAL_GEAR);
+ reference.put(GearStatus.KEY_USER_SELECTED_GEAR, TestValues.GENERAL_USER_SELECTED_GEAR);
+ reference.put(GearStatus.KEY_TRANSMISSION_TYPE, TestValues.GENERAL_TRANSMISSION_TYPE);
+
+ JSONObject underTest = msg.serializeJSON();
+ assertEquals(TestValues.MATCH, reference.length(), underTest.length());
+
+ Iterator<?> iterator = reference.keys();
+ while (iterator.hasNext()) {
+ String key = (String) iterator.next();
+ assertEquals(TestValues.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ }
+ } catch (JSONException e) {
+ fail(TestValues.JSON_FAIL);
+ }
+ }
+}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/WindowCapabilityTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/WindowCapabilityTests.java
index 62f2e4337..6ddee819b 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/WindowCapabilityTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/WindowCapabilityTests.java
@@ -2,10 +2,12 @@ package com.smartdevicelink.test.rpc.datatypes;
import com.smartdevicelink.marshal.JsonRPCMarshaller;
import com.smartdevicelink.proxy.rpc.ButtonCapabilities;
+import com.smartdevicelink.proxy.rpc.DynamicUpdateCapabilities;
import com.smartdevicelink.proxy.rpc.ImageField;
import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
import com.smartdevicelink.proxy.rpc.TextField;
import com.smartdevicelink.proxy.rpc.WindowCapability;
+import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
import com.smartdevicelink.proxy.rpc.enums.ImageType;
import com.smartdevicelink.proxy.rpc.enums.MenuLayout;
import com.smartdevicelink.test.JsonUtils;
@@ -43,6 +45,7 @@ public class WindowCapabilityTests extends TestCase {
msg.setButtonCapabilities(TestValues.GENERAL_BUTTONCAPABILITIES_LIST);
msg.setSoftButtonCapabilities(TestValues.GENERAL_SOFTBUTTONCAPABILITIES_LIST);
msg.setMenuLayoutsAvailable(TestValues.GENERAL_MENU_LAYOUT_LIST);
+ msg.setDynamicUpdateCapabilities(TestValues.GENERAL_DYNAMICUPDATECAPABILITIES);
}
/**
@@ -59,6 +62,7 @@ public class WindowCapabilityTests extends TestCase {
List<ButtonCapabilities> buttonCapabilities = msg.getButtonCapabilities();
List<SoftButtonCapabilities> softButtonCapabilities = msg.getSoftButtonCapabilities();
List<MenuLayout> menuLayouts = msg.getMenuLayoutsAvailable();
+ DynamicUpdateCapabilities dynamicUpdateCapabilities = msg.getDynamicUpdateCapabilities();
// Valid Tests
assertEquals(TestValues.MATCH, TestValues.GENERAL_INT, windowID);
@@ -70,6 +74,7 @@ public class WindowCapabilityTests extends TestCase {
assertEquals(TestValues.MATCH, TestValues.GENERAL_BUTTONCAPABILITIES_LIST.size(), buttonCapabilities.size());
assertEquals(TestValues.MATCH, TestValues.GENERAL_SOFTBUTTONCAPABILITIES_LIST.size(), softButtonCapabilities.size());
assertEquals(TestValues.MATCH, TestValues.GENERAL_MENU_LAYOUT_LIST.size(), menuLayouts.size());
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_DYNAMICUPDATECAPABILITIES, dynamicUpdateCapabilities);
for (int i = 0; i < TestValues.GENERAL_TEXTFIELD_LIST.size(); i++) {
assertTrue(TestValues.TRUE, Validator.validateTextFields(TestValues.GENERAL_TEXTFIELD_LIST.get(i), textFields.get(i)));
@@ -107,6 +112,7 @@ public class WindowCapabilityTests extends TestCase {
assertNull(TestValues.NULL, msg.getButtonCapabilities());
assertNull(TestValues.NULL, msg.getSoftButtonCapabilities());
assertNull(TestValues.NULL, msg.getMenuLayoutsAvailable());
+ assertNull(TestValues.NULL, msg.getDynamicUpdateCapabilities());
}
public void testJson() {
@@ -122,6 +128,7 @@ public class WindowCapabilityTests extends TestCase {
reference.put(WindowCapability.KEY_BUTTON_CAPABILITIES, TestValues.JSON_BUTTONCAPABILITIES);
reference.put(WindowCapability.KEY_SOFT_BUTTON_CAPABILITIES, TestValues.JSON_SOFTBUTTONCAPABILITIES);
reference.put(WindowCapability.KEY_MENU_LAYOUTS_AVAILABLE, JsonUtils.createJsonArray(TestValues.GENERAL_MENU_LAYOUT_LIST));
+ reference.put(WindowCapability.KEY_DYNAMIC_UPDATE_CAPABILITIES, TestValues.JSON_DYNAMICUPDATECAPABILITIES);
JSONObject underTest = msg.serializeJSON();
assertEquals(TestValues.MATCH, reference.length(), underTest.length());
@@ -191,6 +198,22 @@ public class WindowCapabilityTests extends TestCase {
for (int i = 0; i < referenceList.size(); i++) {
assertEquals(TestValues.MATCH, referenceList.get(i), underTestList.get(i));
}
+ } else if (key.equals(WindowCapability.KEY_DYNAMIC_UPDATE_CAPABILITIES)) {
+ JSONArray referenceArray = JsonUtils.readJsonArrayFromJsonObject(reference.getJSONObject(key), DynamicUpdateCapabilities.KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES);
+ JSONArray underTestArray = JsonUtils.readJsonArrayFromJsonObject(underTest.getJSONObject(key), DynamicUpdateCapabilities.KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES);
+ List<ImageFieldName> imageFieldNameListReference = new ArrayList<>();
+ List<ImageFieldName> imageFieldNameListTest = new ArrayList<>();
+ boolean referenceBool = JsonUtils.readBooleanFromJsonObject(reference.getJSONObject(key), DynamicUpdateCapabilities.KEY_SUPPORTS_DYNAMIC_SUB_MENUS);
+ boolean underTestBool = JsonUtils.readBooleanFromJsonObject(underTest.getJSONObject(key), DynamicUpdateCapabilities.KEY_SUPPORTS_DYNAMIC_SUB_MENUS);
+
+ assertEquals(TestValues.MATCH, referenceBool, underTestBool);
+ assertEquals(TestValues.MATCH, referenceArray.length(), underTestArray.length());
+
+ for (int i = 0; i < referenceArray.length(); i++) {
+ imageFieldNameListReference.add( (ImageFieldName) referenceArray.get(i));
+ imageFieldNameListTest.add( (ImageFieldName) underTestArray.get(i));
+ }
+ assertTrue(TestValues.TRUE, imageFieldNameListReference.containsAll(imageFieldNameListTest) && imageFieldNameListTest.containsAll(imageFieldNameListReference));
} else {
assertEquals(TestValues.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ImageFieldNameTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ImageFieldNameTests.java
index 3bca4edc9..c1b0b6cd7 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ImageFieldNameTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ImageFieldNameTests.java
@@ -10,7 +10,7 @@ import java.util.List;
/**
* This is a unit test class for the SmartDeviceLink library project class :
- * {@link com.smartdevicelink.rpc.enums.ImageFieldName}
+ * {@link com.smartdevicelink.proxy.rpc.enums.ImageFieldName}
*/
public class ImageFieldNameTests extends TestCase {
@@ -109,6 +109,8 @@ public class ImageFieldNameTests extends TestCase {
enumTestList.add(ImageFieldName.locationImage);
enumTestList.add(ImageFieldName.secondaryGraphic);
enumTestList.add(ImageFieldName.alertIcon);
+ enumTestList.add(ImageFieldName.subtleAlertIcon);
+ enumTestList.add(ImageFieldName.subMenuIcon);
assertTrue("Enum value list does not match enum class list",
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrndlTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrndlTests.java
index 394d0cd37..26ea35573 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrndlTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/PrndlTests.java
@@ -47,6 +47,10 @@ public class PrndlTests extends TestCase {
PRNDL enumSeventh = PRNDL.valueForString(example);
example = "EIGHTH";
PRNDL enumEighth = PRNDL.valueForString(example);
+ example = "NINTH";
+ PRNDL enumNinth = PRNDL.valueForString(example);
+ example = "TENTH";
+ PRNDL enumTenth = PRNDL.valueForString(example);
example = "UNKNOWN";
PRNDL enumUnknown = PRNDL.valueForString(example);
example = "FAULT";
@@ -66,6 +70,8 @@ public class PrndlTests extends TestCase {
assertNotNull("SIXTH returned null", enumSixth);
assertNotNull("SEVENTH returned null", enumSeventh);
assertNotNull("EIGHTH returned null", enumEighth);
+ assertNotNull("NINTH returned null", enumNinth);
+ assertNotNull("TENTH returned null", enumTenth);
assertNotNull("UNKNOWN returned null", enumUnknown);
assertNotNull("FAULT returned null", enumFault);
}
@@ -119,7 +125,9 @@ public class PrndlTests extends TestCase {
enumTestList.add(PRNDL.SIXTH);
enumTestList.add(PRNDL.SEVENTH);
enumTestList.add(PRNDL.EIGHTH);
- enumTestList.add(PRNDL.UNKNOWN);
+ enumTestList.add(PRNDL.NINTH);
+ enumTestList.add(PRNDL.TENTH);
+ enumTestList.add(PRNDL.UNKNOWN);
enumTestList.add(PRNDL.FAULT);
assertTrue("Enum value list does not match enum class list",
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TextFieldNameTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TextFieldNameTests.java
index cb55330eb..8c8122fd8 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TextFieldNameTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TextFieldNameTests.java
@@ -175,6 +175,9 @@ public class TextFieldNameTests extends TestCase {
enumTestList.add(TextFieldName.addressLines);
enumTestList.add(TextFieldName.phoneNumber);
enumTestList.add(TextFieldName.templateTitle);
+ enumTestList.add(TextFieldName.subtleAlertText1);
+ enumTestList.add(TextFieldName.subtleAlertText2);
+ enumTestList.add(TextFieldName.subtleAlertSoftButtonText);
assertTrue("Enum value list does not match enum class list",
enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TransmissionTypeTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TransmissionTypeTests.java
new file mode 100644
index 000000000..6a21c7cc2
--- /dev/null
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/TransmissionTypeTests.java
@@ -0,0 +1,92 @@
+package com.smartdevicelink.test.rpc.enums;
+
+import com.smartdevicelink.proxy.rpc.enums.TransmissionType;
+
+import junit.framework.TestCase;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class TransmissionTypeTests extends TestCase {
+ /**
+ * Verifies that the enum values are not null upon valid assignment.
+ */
+ public void testValidEnums () {
+ String example = "MANUAL";
+ TransmissionType manual = TransmissionType.valueForString(example);
+ example = "AUTOMATIC";
+ TransmissionType automatic = TransmissionType.valueForString(example);
+ example = "SEMI_AUTOMATIC";
+ TransmissionType semiAutomatic = TransmissionType.valueForString(example);
+ example = "DUAL_CLUTCH";
+ TransmissionType dualClutch = TransmissionType.valueForString(example);
+ example = "CONTINUOUSLY_VARIABLE";
+ TransmissionType continuouslyVariable = TransmissionType.valueForString(example);
+ example = "INFINITELY_VARIABLE";
+ TransmissionType infinitelyVariable = TransmissionType.valueForString(example);
+ example = "ELECTRIC_VARIABLE";
+ TransmissionType electricVariable = TransmissionType.valueForString(example);
+ example = "DIRECT_DRIVE";
+ TransmissionType directDrive = TransmissionType.valueForString(example);
+
+ assertNotNull("MANUAL returned null", manual);
+ assertNotNull("AUTOMATIC returned null", automatic);
+ assertNotNull("SEMI_AUTOMATIC returned null", semiAutomatic);
+ assertNotNull("DUAL_CLUTCH returned null", dualClutch);
+ assertNotNull("CONTINUOUSLY_VARIABLE returned null", continuouslyVariable);
+ assertNotNull("INFINITELY_VARIABLE returned null", infinitelyVariable);
+ assertNotNull("ELECTRIC_VARIABLE returned null", electricVariable);
+ assertNotNull("DIRECT_DRIVE returned null", directDrive);
+ assertNotNull("DIRECT_DRIVE returned null", directDrive);
+
+ }
+
+ /**
+ * Verifies that an invalid assignment is null.
+ */
+ public void testInvalidEnum () {
+ String example = "pARk";
+ try {
+ TransmissionType temp = TransmissionType.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ }
+ catch (IllegalArgumentException exception) {
+ fail("Invalid enum throws IllegalArgumentException.");
+ }
+ }
+
+ /**
+ * Verifies that a null assignment is invalid.
+ */
+ public void testNullEnum () {
+ String example = null;
+ try {
+ TransmissionType temp = TransmissionType.valueForString(example);
+ assertNull("Result of valueForString should be null.", temp);
+ }
+ catch (NullPointerException exception) {
+ fail("Null string throws NullPointerException.");
+ }
+ }
+
+ /**
+ * Verifies the possible enum values of TransmissionType.
+ */
+ public void testListEnum() {
+ List<TransmissionType> enumValueList = Arrays.asList(TransmissionType.values());
+
+ List<TransmissionType> enumTestList = new ArrayList<TransmissionType>();
+ enumTestList.add(TransmissionType.MANUAL);
+ enumTestList.add(TransmissionType.AUTOMATIC);
+ enumTestList.add(TransmissionType.SEMI_AUTOMATIC);
+ enumTestList.add(TransmissionType.DUAL_CLUTCH);
+ enumTestList.add(TransmissionType.CONTINUOUSLY_VARIABLE);
+ enumTestList.add(TransmissionType.INFINITELY_VARIABLE);
+ enumTestList.add(TransmissionType.ELECTRIC_VARIABLE);
+ enumTestList.add(TransmissionType.DIRECT_DRIVE);
+
+ assertTrue("Enum value list does not match enum class list",
+ enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
+ }
+}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VehicleDataTypeTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VehicleDataTypeTests.java
index 6b6b8a144..37793b489 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VehicleDataTypeTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VehicleDataTypeTests.java
@@ -84,7 +84,8 @@ public class VehicleDataTypeTests extends TestCase {
VehicleDataType enumVehicleDataOemVehicleDataType= VehicleDataType.valueForString(example);
example = "VEHICLEDATA_HANDSOFFSTEERING";
VehicleDataType enumVehicleDataHandsOffSteeringType= VehicleDataType.valueForString(example);
-
+ example = "VEHICLEDATA_GEARSTATUS";
+ VehicleDataType enumVehicleDataGearStatus= VehicleDataType.valueForString(example);
example = "VEHICLEDATA_WINDOWSTATUS";
VehicleDataType enumVehicleDataTypeWindowStatus= VehicleDataType.valueForString(example);
@@ -122,6 +123,7 @@ public class VehicleDataTypeTests extends TestCase {
assertNotNull("VEHICLEDATA_OEM_CUSTOM_DATA returned null", enumVehicleDataOemVehicleDataType);
assertNotNull("VEHICLEDATA_HANDSOFFSTEERING returned null", enumVehicleDataHandsOffSteeringType);
assertNotNull("VEHICLEDATA_WINDOWSTATUS returned null", enumVehicleDataTypeWindowStatus);
+ assertNotNull("VEHICLEDATA_GEARSTATUS returned null", enumVehicleDataGearStatus);
}
/**
@@ -193,6 +195,7 @@ public class VehicleDataTypeTests extends TestCase {
enumTestList.add(VehicleDataType.VEHICLEDATA_OEM_CUSTOM_DATA);
enumTestList.add(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING);
enumTestList.add(VehicleDataType.VEHICLEDATA_WINDOWSTATUS);
+ enumTestList.add(VehicleDataType.VEHICLEDATA_GEARSTATUS);
assertTrue("Enum value list does not match enum class list",
enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VrCapabilitiesTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VrCapabilitiesTests.java
index e95fdf887..3d8925e29 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VrCapabilitiesTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/VrCapabilitiesTests.java
@@ -61,7 +61,6 @@ public class VrCapabilitiesTests extends TestCase {
List<VrCapabilities> enumTestList = new ArrayList<VrCapabilities>();
enumTestList.add(VrCapabilities.TEXT);
- enumTestList.add(VrCapabilities.Text);
assertTrue("Enum value list does not match enum class list",
enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList));
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java
deleted file mode 100644
index d73b39beb..000000000
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package com.smartdevicelink.test.rpc.notifications;
-
-import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.rpc.OnHMIStatus;
-import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
-import com.smartdevicelink.proxy.rpc.enums.HMILevel;
-import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus;
-import com.smartdevicelink.test.BaseRpcTests;
-import com.smartdevicelink.test.TestValues;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.junit.Test;
-
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.assertNotNull;
-import static junit.framework.TestCase.assertNull;
-import static junit.framework.TestCase.fail;
-
-/**
- * This is a unit test class for the SmartDeviceLink library project class :
- * {@link com.smartdevicelink.rpc.OnLockScreenStatus}
- */
-public class OnLockScreenStatusTests extends BaseRpcTests{
-
- @Override
- protected RPCMessage createMessage(){
- OnLockScreenStatus msg = new OnLockScreenStatus();
-
- msg.setDriverDistractionStatus(TestValues.GENERAL_BOOLEAN);
- msg.setHMILevel(TestValues.GENERAL_HMILEVEL);
- msg.setShowLockScreen(TestValues.GENERAL_LOCKSCREENSTATUS);
- msg.setUserSelected(TestValues.GENERAL_BOOLEAN);
-
- return msg;
- }
-
- @Override
- protected String getMessageType(){
- return RPCMessage.KEY_NOTIFICATION;
- }
-
- @Override
- protected String getCommandType(){
- return FunctionID.ON_LOCK_SCREEN_STATUS.toString();
- }
-
- @Override
- protected JSONObject getExpectedParameters(int sdlVersion){
- JSONObject result = new JSONObject();
-
- try{
- result.put(OnLockScreenStatus.KEY_DRIVER_DISTRACTION, TestValues.GENERAL_BOOLEAN);
- result.put(OnHMIStatus.KEY_HMI_LEVEL, TestValues.GENERAL_HMILEVEL);
- result.put(OnLockScreenStatus.KEY_SHOW_LOCK_SCREEN, TestValues.GENERAL_LOCKSCREENSTATUS);
- result.put(OnLockScreenStatus.KEY_USER_SELECTED, TestValues.GENERAL_BOOLEAN);
- }catch(JSONException e){
- fail(TestValues.JSON_FAIL);
- }
-
- return result;
- }
-
- /**
- * Tests the expected values of the RPC message.
- */
- @Test
- public void testRpcValues () {
- // Test Values
- Boolean status = ( (OnLockScreenStatus) msg ).getDriverDistractionStatus();
- HMILevel hmiLevel = ( (OnLockScreenStatus) msg ).getHMILevel();
- LockScreenStatus lockScreen = ( (OnLockScreenStatus) msg ).getShowLockScreen();
- boolean userSelected = ( (OnLockScreenStatus) msg ).getUserSelected();
-
- // Valid Tests
- assertEquals(TestValues.MATCH, (Boolean) TestValues.GENERAL_BOOLEAN, status);
- assertEquals(TestValues.MATCH, TestValues.GENERAL_HMILEVEL, hmiLevel);
- assertEquals(TestValues.MATCH, TestValues.GENERAL_LOCKSCREENSTATUS, lockScreen);
- assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, userSelected);
-
- // Invalid/Null Tests
- OnLockScreenStatus msg = new OnLockScreenStatus();
- assertNotNull(TestValues.NOT_NULL, msg);
- testNullBase(msg);
-
- assertNull(TestValues.NULL, msg.getDriverDistractionStatus());
- assertNull(TestValues.NULL, msg.getHMILevel());
- assertNull(TestValues.NULL, msg.getShowLockScreen());
- assertNull(TestValues.NULL, msg.getUserSelected());
- }
-} \ No newline at end of file
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java
deleted file mode 100644
index f3efebe84..000000000
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.smartdevicelink.test.rpc.notifications;
-
-import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.rpc.OnSdlChoiceChosen;
-import com.smartdevicelink.proxy.rpc.OnSdlChoiceChosen.SdlChoice;
-import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-import com.smartdevicelink.test.BaseRpcTests;
-import com.smartdevicelink.test.TestValues;
-import com.smartdevicelink.test.Validator;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.junit.Test;
-
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.assertNotNull;
-import static junit.framework.TestCase.assertNull;
-import static junit.framework.TestCase.assertTrue;
-import static junit.framework.TestCase.fail;
-
-/**
- * This is a unit test class for the SmartDeviceLink library project class :
- * {@link com.smartdevicelink.proxy.rpc.OnSdlChoiceChosen}
- */
-public class OnSdlChoiceChosenTests extends BaseRpcTests{
-
- SdlChoice sdlChoice;
-
- @Override
- protected RPCMessage createMessage(){
- OnSdlChoiceChosen msg = new OnSdlChoiceChosen();
- sdlChoice = msg.new SdlChoice(TestValues.GENERAL_CHOICE);
-
- msg.setTriggerSource(TestValues.GENERAL_TRIGGERSOURCE);
- msg.setSdlChoice(sdlChoice);
-
- return msg;
- }
-
- @Override
- protected String getMessageType(){
- return RPCMessage.KEY_NOTIFICATION;
- }
-
- @Override
- protected String getCommandType(){
- return FunctionID.ON_SDL_CHOICE_CHOSEN.toString();
- }
-
- @Override
- protected JSONObject getExpectedParameters(int sdlVersion){
- JSONObject result = new JSONObject();
-
- try{
- result.put(OnSdlChoiceChosen.KEY_TRIGGER_SOURCE, TestValues.GENERAL_TRIGGERSOURCE);
- result.put(OnSdlChoiceChosen.KEY_SDL_CHOICE, sdlChoice);
- }catch(JSONException e){
- fail(TestValues.JSON_FAIL);
- }
-
- return result;
- }
-
- /**
- * Tests the expected values of the RPC message.
- */
- @Test
- public void testRpcValues () {
- // Test Values
- SdlChoice data = ( (OnSdlChoiceChosen) msg ).getSdlChoice();
- TriggerSource source = ( (OnSdlChoiceChosen) msg ).getTriggerSource();
-
- // Valid Tests
- assertTrue(TestValues.MATCH, Validator.validateChoice(TestValues.GENERAL_CHOICE, data.getChoice()));
- assertEquals(TestValues.MATCH, TestValues.GENERAL_TRIGGERSOURCE, source);
-
- // Invalid/Null Tests
- OnSdlChoiceChosen msg = new OnSdlChoiceChosen();
- assertNotNull(TestValues.NOT_NULL, msg);
- testNullBase(msg);
-
- assertNull(TestValues.NULL, msg.getTriggerSource());
- assertNull(TestValues.NULL, msg.getSdlChoice());
- }
-} \ No newline at end of file
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java
deleted file mode 100644
index 863abf4e0..000000000
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java
+++ /dev/null
@@ -1,83 +0,0 @@
-package com.smartdevicelink.test.rpc.notifications;
-
-import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.rpc.OnStreamRPC;
-import com.smartdevicelink.test.BaseRpcTests;
-import com.smartdevicelink.test.TestValues;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.junit.Test;
-
-import static junit.framework.TestCase.assertEquals;
-import static junit.framework.TestCase.assertNotNull;
-import static junit.framework.TestCase.assertNull;
-import static junit.framework.TestCase.fail;
-
-/**
- * Created by austinkirk on 6/7/17.
- */
-
-public class OnStreamRPCTests extends BaseRpcTests {
- @Override
- protected RPCMessage createMessage(){
- OnStreamRPC msg = new OnStreamRPC();
-
- msg.setBytesComplete(TestValues.GENERAL_LONG);
- msg.setFileName(TestValues.GENERAL_STRING);
- msg.setFileSize(TestValues.GENERAL_LONG);
-
- return msg;
- }
-
- @Override
- protected String getMessageType(){
- return RPCMessage.KEY_NOTIFICATION;
- }
-
- @Override
- protected String getCommandType(){
- return FunctionID.ON_STREAM_RPC.toString();
- }
-
- @Override
- protected JSONObject getExpectedParameters(int sdlVersion){
- JSONObject result = new JSONObject();
-
- try{
- result.put(OnStreamRPC.KEY_BYTESCOMPLETE, TestValues.GENERAL_LONG);
- result.put(OnStreamRPC.KEY_FILENAME, TestValues.GENERAL_STRING);
- result.put(OnStreamRPC.KEY_FILESIZE, TestValues.GENERAL_LONG);
- }catch(JSONException e){
- fail(TestValues.JSON_FAIL);
- }
-
- return result;
- }
-
- /**
- * Tests the expected values of the RPC message.
- */
- @Test
- public void testRpcValues () {
- // Test Values
- Long bytes = ((OnStreamRPC) msg).getBytesComplete();
- String fileName = ((OnStreamRPC) msg).getFileName();
- Long fileSize = ((OnStreamRPC) msg).getFileSize();
-
- // Valid Tests
- assertEquals(TestValues.MATCH, TestValues.GENERAL_LONG, bytes);
- assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, fileName);
- assertEquals(TestValues.MATCH, TestValues.GENERAL_LONG, fileSize);
-
- // Invalid/Null Tests
- OnStreamRPC msg = new OnStreamRPC();
- assertNotNull(TestValues.NOT_NULL, msg);
- testNullBase(msg);
-
- assertNull(TestValues.NULL, msg.getBytesComplete());
- assertNull(TestValues.NULL, msg.getFileName());
- assertNull(TestValues.NULL, msg.getFileSize());
- }
-}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateFileTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateFileTest.java
new file mode 100644
index 000000000..03dc524a1
--- /dev/null
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateFileTest.java
@@ -0,0 +1,73 @@
+package com.smartdevicelink.test.rpc.notifications;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCMessage;
+import com.smartdevicelink.proxy.rpc.OnUpdateFile;
+import com.smartdevicelink.test.BaseRpcTests;
+import com.smartdevicelink.test.TestValues;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.Test;
+
+import static junit.framework.TestCase.assertNotNull;
+import static junit.framework.TestCase.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.proxy.rpc.OnUpdateFile}
+ */
+public class OnUpdateFileTest extends BaseRpcTests {
+ @Override
+ protected RPCMessage createMessage() {
+ OnUpdateFile msg = new OnUpdateFile();
+
+ msg.setFileName(TestValues.GENERAL_STRING);
+
+ return msg;
+ }
+
+ @Override
+ protected String getMessageType() {
+ return RPCMessage.KEY_NOTIFICATION;
+ }
+
+ @Override
+ protected String getCommandType() {
+ return FunctionID.ON_UPDATE_FILE.toString();
+ }
+
+ @Override
+ protected JSONObject getExpectedParameters(int sdlVersion) {
+ JSONObject result = new JSONObject();
+
+ try{
+ result.put(OnUpdateFile.KEY_FILE_NAME, TestValues.GENERAL_STRING);
+ }catch(JSONException e){
+ fail(TestValues.JSON_FAIL);
+ }
+
+ return result;
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ @Test
+ public void testRpcValues () {
+ // Test Values
+ String fileName = ( (OnUpdateFile) msg).getFileName();
+
+ // Valid Tests
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, fileName);
+
+ // Invalid/Null Tests
+ OnUpdateFile msg = new OnUpdateFile();
+ assertNotNull(TestValues.NOT_NULL, msg);
+ testNullBase(msg);
+
+ assertNull(TestValues.NULL, msg.getFileName());
+ }
+}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateSubMenuTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateSubMenuTest.java
new file mode 100644
index 000000000..afcaf1310
--- /dev/null
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnUpdateSubMenuTest.java
@@ -0,0 +1,78 @@
+package com.smartdevicelink.test.rpc.notifications;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCMessage;
+import com.smartdevicelink.proxy.rpc.OnUpdateSubMenu;
+import com.smartdevicelink.test.BaseRpcTests;
+import com.smartdevicelink.test.TestValues;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.Test;
+
+import static junit.framework.TestCase.assertNotNull;
+import static junit.framework.TestCase.fail;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.proxy.rpc.OnUpdateSubMenu}
+ */
+public class OnUpdateSubMenuTest extends BaseRpcTests {
+ @Override
+ protected RPCMessage createMessage() {
+ OnUpdateSubMenu msg = new OnUpdateSubMenu();
+
+ msg.setMenuID(TestValues.GENERAL_INT);
+ msg.setUpdateSubCells(TestValues.GENERAL_BOOLEAN);
+
+ return msg;
+ }
+
+ @Override
+ protected String getMessageType() {
+ return RPCMessage.KEY_NOTIFICATION;
+ }
+
+ @Override
+ protected String getCommandType() {
+ return FunctionID.ON_UPDATE_SUB_MENU.toString();
+ }
+
+ @Override
+ protected JSONObject getExpectedParameters(int sdlVersion) {
+ JSONObject result = new JSONObject();
+
+ try{
+ result.put(OnUpdateSubMenu.KEY_MENU_ID, TestValues.GENERAL_INT);
+ result.put(OnUpdateSubMenu.KEY_UPDATE_SUB_CELLS, TestValues.GENERAL_BOOLEAN);
+ }catch(JSONException e){
+ fail(TestValues.JSON_FAIL);
+ }
+
+ return result;
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ @Test
+ public void testRpcValues () {
+ // Test Values
+ int menuId = ( (OnUpdateSubMenu) msg ).getMenuID();
+ boolean updateSubCells = ( (OnUpdateSubMenu) msg ).getUpdateSubCells();
+
+ // Valid Tests
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_INT, menuId);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, updateSubCells);
+
+ // Invalid/Null Tests
+ OnUpdateSubMenu msg = new OnUpdateSubMenu();
+ assertNotNull(TestValues.NOT_NULL, msg);
+ testNullBase(msg);
+
+ assertNull(TestValues.NULL, msg.getMenuID());
+ assertNull(TestValues.NULL, msg.getUpdateSubCells());
+ }
+}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java
index 45c3b29ee..d333d3b5a 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java
@@ -12,6 +12,7 @@ import com.smartdevicelink.proxy.rpc.ECallInfo;
import com.smartdevicelink.proxy.rpc.EmergencyEvent;
import com.smartdevicelink.proxy.rpc.FuelRange;
import com.smartdevicelink.proxy.rpc.GPSData;
+import com.smartdevicelink.proxy.rpc.GearStatus;
import com.smartdevicelink.proxy.rpc.HeadLampStatus;
import com.smartdevicelink.proxy.rpc.MyKey;
import com.smartdevicelink.proxy.rpc.OnVehicleData;
@@ -101,6 +102,7 @@ public class OnVehicleDataTests extends BaseRpcTests{
result.put(OnVehicleData.KEY_TURN_SIGNAL, VehicleDataHelper.TURN_SIGNAL);
result.put(OnVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS);
result.put(OnVehicleData.KEY_HANDS_OFF_STEERING, VehicleDataHelper.HANDS_OFF_STEERING);
+ result.put(OnVehicleData.KEY_GEAR_STATUS, VehicleDataHelper.GEAR_STATUS);
result.put(OnVehicleData.KEY_WINDOW_STATUS, VehicleDataHelper.WINDOW_STATUS_LIST);
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE);
} catch(JSONException e) {
@@ -146,6 +148,7 @@ public class OnVehicleDataTests extends BaseRpcTests{
List<WindowStatus> windowStatusList = ( (OnVehicleData) msg).getWindowStatus();
TurnSignal turnSignal = ( (OnVehicleData) msg).getTurnSignal();
ElectronicParkBrakeStatus electronicParkBrakeStatus = ( (OnVehicleData) msg).getElectronicParkBrakeStatus();
+ GearStatus gearStatus = ( (OnVehicleData) msg).getGearStatus();
Object oemCustomVehicleData = ( (OnVehicleData) msg).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
Boolean handsOffSteering = ( (OnVehicleData) msg).getHandsOffSteering();
// Valid Tests
@@ -179,6 +182,7 @@ public class OnVehicleDataTests extends BaseRpcTests{
assertTrue(TestValues.TRUE, Validator.validateWindowStatuses(VehicleDataHelper.WINDOW_STATUS_LIST, windowStatusList));
assertEquals(TestValues.MATCH, VehicleDataHelper.TURN_SIGNAL, turnSignal);
assertEquals(TestValues.MATCH, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS, electronicParkBrakeStatus);
+ assertEquals(TestValues.MATCH, VehicleDataHelper.GEAR_STATUS, gearStatus);
assertEquals(TestValues.MATCH, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE, oemCustomVehicleData);
assertEquals(TestValues.MATCH, VehicleDataHelper.HANDS_OFF_STEERING, handsOffSteering);
// Invalid/Null Tests
@@ -217,6 +221,7 @@ public class OnVehicleDataTests extends BaseRpcTests{
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
assertNull(TestValues.NULL, msg.getHandsOffSteering());
assertNull(TestValues.NULL, msg.getWindowStatus());
+ assertNull(TestValues.NULL, msg.getGearStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -238,6 +243,7 @@ public class OnVehicleDataTests extends BaseRpcTests{
JSONObject myKeyObj = new JSONObject();
JSONObject fuelRangeObj = new JSONObject();
JSONObject windowStatusObj = new JSONObject();
+ JSONObject gearStatusObj = new JSONObject();
JSONArray fuelRangeArrayObj = new JSONArray();
JSONArray windowStatusArrayObj = new JSONArray();
@@ -371,6 +377,11 @@ public class OnVehicleDataTests extends BaseRpcTests{
windowStatusObj.put(WindowStatus.KEY_STATE, VehicleDataHelper.WINDOW_STATE);
windowStatusArrayObj.put(windowStatusObj);
+ // GEAR STATUS
+ gearStatusObj.put(GearStatus.KEY_USER_SELECTED_GEAR, VehicleDataHelper.USER_SELECTED_GEAR);
+ gearStatusObj.put(GearStatus.KEY_TRANSMISSION_TYPE, VehicleDataHelper.TRANSMISSION_TYPE);
+ gearStatusObj.put(GearStatus.KEY_ACTUAL_GEAR, VehicleDataHelper.ACTUAL_GEAR);
+
reference.put(OnVehicleData.KEY_SPEED, VehicleDataHelper.SPEED);
reference.put(OnVehicleData.KEY_RPM, VehicleDataHelper.RPM);
reference.put(OnVehicleData.KEY_EXTERNAL_TEMPERATURE, VehicleDataHelper.EXTERNAL_TEMPERATURE);
@@ -402,6 +413,7 @@ public class OnVehicleDataTests extends BaseRpcTests{
reference.put(OnVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS);
reference.put(OnVehicleData.KEY_HANDS_OFF_STEERING, VehicleDataHelper.HANDS_OFF_STEERING);
reference.put(OnVehicleData.KEY_WINDOW_STATUS, windowStatusArrayObj);
+ reference.put(OnVehicleData.KEY_GEAR_STATUS, gearStatusObj);
reference.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE);
JSONObject underTest = msg.serializeJSON();
@@ -497,6 +509,14 @@ public class OnVehicleDataTests extends BaseRpcTests{
new MyKey(JsonRPCMarshaller.deserializeJSONObject(myKeyObjReference)),
new MyKey(JsonRPCMarshaller.deserializeJSONObject(myKeyObjTest))));
}
+ else if (key.equals(OnVehicleData.KEY_GEAR_STATUS)) {
+ JSONObject myKeyObjReference = JsonUtils.readJsonObjectFromJsonObject(reference, key);
+ JSONObject myKeyObjTest = JsonUtils.readJsonObjectFromJsonObject(underTest, key);
+
+ assertTrue(TestValues.TRUE, Validator.validateGearStatuses(
+ new GearStatus(JsonRPCMarshaller.deserializeJSONObject(myKeyObjReference)),
+ new GearStatus(JsonRPCMarshaller.deserializeJSONObject(myKeyObjTest))));
+ }
else if (key.equals(OnVehicleData.KEY_ENGINE_OIL_LIFE)) {
assertEquals(JsonUtils.readDoubleFromJsonObject(reference, key), JsonUtils.readDoubleFromJsonObject(underTest, key));
}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java
index 67bfb42ec..f3b4b564e 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java
@@ -63,6 +63,7 @@ public class GetVehicleDataTests extends BaseRpcTests {
msg.setElectronicParkBrakeStatus(TestValues.GENERAL_BOOLEAN);
msg.setHandsOffSteering(TestValues.GENERAL_BOOLEAN);
msg.setWindowStatus(TestValues.GENERAL_BOOLEAN);
+ msg.setGearStatus(TestValues.GENERAL_BOOLEAN);
msg.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_BOOLEAN);
return msg;
@@ -113,6 +114,7 @@ public class GetVehicleDataTests extends BaseRpcTests {
result.put(GetVehicleData.KEY_TURN_SIGNAL, TestValues.GENERAL_BOOLEAN);
result.put(GetVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS, TestValues.GENERAL_BOOLEAN);
result.put(GetVehicleData.KEY_HANDS_OFF_STEERING, TestValues.GENERAL_BOOLEAN);
+ result.put(GetVehicleData.KEY_GEAR_STATUS, TestValues.GENERAL_BOOLEAN);
result.put(GetVehicleData.KEY_WINDOW_STATUS, TestValues.GENERAL_BOOLEAN);
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_BOOLEAN);
}catch(JSONException e){
@@ -160,6 +162,7 @@ public class GetVehicleDataTests extends BaseRpcTests {
assertTrue(TestValues.TRUE, ( (GetVehicleData) msg ).getElectronicParkBrakeStatus());
assertTrue(TestValues.TRUE, ( (GetVehicleData) msg ).getHandsOffSteering());
assertTrue(TestValues.TRUE, ( (GetVehicleData) msg ).getWindowStatus());
+ assertTrue(TestValues.TRUE, ( (GetVehicleData) msg ).getGearStatus());
assertTrue(TestValues.TRUE, ( (GetVehicleData) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
// Invalid/Null Tests
@@ -198,6 +201,7 @@ public class GetVehicleDataTests extends BaseRpcTests {
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
assertNull(TestValues.NULL, msg.getHandsOffSteering());
assertNull(TestValues.NULL, msg.getWindowStatus());
+ assertNull(TestValues.NULL, msg.getGearStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -252,6 +256,7 @@ public class GetVehicleDataTests extends BaseRpcTests {
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, GetVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS), cmd.getElectronicParkBrakeStatus());
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, GetVehicleData.KEY_HANDS_OFF_STEERING), cmd.getHandsOffSteering());
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, GetVehicleData.KEY_WINDOW_STATUS), cmd.getWindowStatus());
+ assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, GetVehicleData.KEY_GEAR_STATUS), cmd.getGearStatus());
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME), cmd.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
} catch (JSONException e) {
fail(TestValues.JSON_FAIL);
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java
index c7b5b9678..fee5ddd25 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java
@@ -62,6 +62,7 @@ public class SubscribeVehicleDataTests extends BaseRpcTests {
msg.setElectronicParkBrakeStatus(TestValues.GENERAL_BOOLEAN);
msg.setHandsOffSteering(TestValues.GENERAL_BOOLEAN);
msg.setWindowStatus(TestValues.GENERAL_BOOLEAN);
+ msg.setGearStatus(TestValues.GENERAL_BOOLEAN);
msg.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_BOOLEAN);
return msg;
@@ -112,6 +113,7 @@ public class SubscribeVehicleDataTests extends BaseRpcTests {
result.put(SubscribeVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS, TestValues.GENERAL_BOOLEAN);
result.put(SubscribeVehicleData.KEY_HANDS_OFF_STEERING, TestValues.GENERAL_BOOLEAN);
result.put(SubscribeVehicleData.KEY_WINDOW_STATUS, TestValues.GENERAL_BOOLEAN);
+ result.put(SubscribeVehicleData.KEY_GEAR_STATUS, TestValues.GENERAL_BOOLEAN);
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_BOOLEAN);
} catch (JSONException e) {
fail(TestValues.JSON_FAIL);
@@ -157,6 +159,7 @@ public class SubscribeVehicleDataTests extends BaseRpcTests {
assertTrue(TestValues.MATCH,( (SubscribeVehicleData) msg ).getElectronicParkBrakeStatus());
assertTrue(TestValues.MATCH,( (SubscribeVehicleData) msg ).getHandsOffSteering());
assertTrue(TestValues.MATCH,( (SubscribeVehicleData) msg ).getWindowStatus());
+ assertTrue(TestValues.MATCH,( (SubscribeVehicleData) msg ).getGearStatus());
assertTrue(TestValues.MATCH,( (SubscribeVehicleData) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
// Invalid/Null Tests
@@ -194,6 +197,7 @@ public class SubscribeVehicleDataTests extends BaseRpcTests {
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
assertNull(TestValues.NULL, msg.getHandsOffSteering());
assertNull(TestValues.NULL, msg.getWindowStatus());
+ assertNull(TestValues.NULL, msg.getGearStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubtleAlertTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubtleAlertTests.java
new file mode 100644
index 000000000..7c5a49534
--- /dev/null
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubtleAlertTests.java
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 2019 Livio, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Livio Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Created by Nicole Yarroch on 7/17/19 10:06 AM
+ */
+
+package com.smartdevicelink.test.rpc.requests;
+
+import com.smartdevicelink.marshal.JsonRPCMarshaller;
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCMessage;
+import com.smartdevicelink.proxy.rpc.Image;
+import com.smartdevicelink.proxy.rpc.SoftButton;
+import com.smartdevicelink.proxy.rpc.SubtleAlert;
+import com.smartdevicelink.proxy.rpc.TTSChunk;
+import com.smartdevicelink.test.BaseRpcTests;
+import com.smartdevicelink.test.JsonUtils;
+import com.smartdevicelink.test.TestValues;
+import com.smartdevicelink.test.Validator;
+import com.smartdevicelink.test.json.rpc.JsonFileReader;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.Test;
+
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
+import static junit.framework.TestCase.assertEquals;
+import static junit.framework.TestCase.assertNotNull;
+import static junit.framework.TestCase.assertNull;
+import static junit.framework.TestCase.assertTrue;
+import static junit.framework.TestCase.fail;
+
+/**
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.proxy.rpc.SubtleAlert}
+ */
+public class SubtleAlertTests extends BaseRpcTests {
+
+ @Override
+ protected RPCMessage createMessage() {
+ SubtleAlert msg = new SubtleAlert();
+ msg.setAlertText1(TestValues.GENERAL_STRING);
+ msg.setAlertText2(TestValues.GENERAL_STRING);
+ msg.setAlertIcon(TestValues.GENERAL_IMAGE);
+ msg.setTtsChunks(TestValues.GENERAL_TTSCHUNK_LIST);
+ msg.setDuration(TestValues.GENERAL_INTEGER);
+ msg.setSoftButtons(TestValues.GENERAL_SOFTBUTTON_LIST);
+ msg.setCancelID(TestValues.GENERAL_INTEGER);
+ return msg;
+ }
+
+ @Override
+ protected String getMessageType(){
+ return RPCMessage.KEY_REQUEST;
+ }
+
+ @Override
+ protected String getCommandType(){
+ return FunctionID.SUBTLE_ALERT.toString();
+ }
+
+ @Override
+ protected JSONObject getExpectedParameters(int sdlVersion) {
+ JSONObject result = new JSONObject();
+
+ try {
+ result.put(SubtleAlert.KEY_ALERT_TEXT_1, TestValues.GENERAL_STRING);
+ result.put(SubtleAlert.KEY_ALERT_TEXT_2, TestValues.GENERAL_STRING);
+ result.put(SubtleAlert.KEY_ALERT_ICON, TestValues.JSON_IMAGE);
+ result.put(SubtleAlert.KEY_TTS_CHUNKS, TestValues.JSON_TTSCHUNKS);
+ result.put(SubtleAlert.KEY_DURATION, TestValues.GENERAL_INTEGER);
+ result.put(SubtleAlert.KEY_SOFT_BUTTONS, TestValues.JSON_SOFTBUTTONS);
+ result.put(SubtleAlert.KEY_CANCEL_ID, TestValues.GENERAL_INTEGER);
+ } catch (JSONException e) {
+ fail(TestValues.JSON_FAIL);
+ }
+
+ return result;
+ }
+
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ @Test
+ public void testRpcValues () {
+ // Test Values
+ String testAlertText1 = ((SubtleAlert) msg).getAlertText1();
+ String testAlertText2 = ((SubtleAlert) msg).getAlertText2();
+ Image testAlertIcon = ((SubtleAlert) msg).getAlertIcon();
+ List<TTSChunk> testTtsChunks = ((SubtleAlert) msg).getTtsChunks();
+ Integer testDuration = ((SubtleAlert) msg).getDuration();
+ List<SoftButton> testSoftButtons = ((SubtleAlert) msg).getSoftButtons();
+ Integer testCancelID = ((SubtleAlert) msg).getCancelID();
+
+ // Valid Tests
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testAlertText1);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_STRING, testAlertText2);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_IMAGE, testAlertIcon);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_TTSCHUNK_LIST, testTtsChunks);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_INTEGER, testDuration);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_SOFTBUTTON_LIST, testSoftButtons);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_INTEGER, testCancelID);
+
+ // Invalid/Null Tests
+ SubtleAlert msg = new SubtleAlert();
+ assertNotNull(TestValues.NOT_NULL, msg);
+ testNullBase(msg);
+
+ assertNull(TestValues.NULL, msg.getAlertText1());
+ assertNull(TestValues.NULL, msg.getAlertText2());
+ assertNull(TestValues.NULL, msg.getAlertIcon());
+ assertNull(TestValues.NULL, msg.getTtsChunks());
+ assertNull(TestValues.NULL, msg.getDuration());
+ assertNull(TestValues.NULL, msg.getSoftButtons());
+ assertNull(TestValues.NULL, msg.getCancelID());
+ }
+
+ /**
+ * Tests a valid JSON construction of this RPC message.
+ */
+ @Test
+ public void testJsonConstructor () {
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
+ assertNotNull(TestValues.NOT_NULL, commandJson);
+
+ try {
+ Hashtable<String, Object> hash = JsonRPCMarshaller.deserializeJSONObject(commandJson);
+ SubtleAlert cmd = new SubtleAlert(hash);
+ JSONObject body = JsonUtils.readJsonObjectFromJsonObject(commandJson, getMessageType());
+ assertNotNull(TestValues.NOT_NULL, body);
+
+ // Test everything in the json body.
+ assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(body, RPCMessage.KEY_FUNCTION_NAME), cmd.getFunctionName());
+ assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(body, RPCMessage.KEY_CORRELATION_ID), cmd.getCorrelationID());
+ JSONObject parameters = JsonUtils.readJsonObjectFromJsonObject(body, RPCMessage.KEY_PARAMETERS);
+
+ assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, SubtleAlert.KEY_ALERT_TEXT_1), cmd.getAlertText1());
+ assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, SubtleAlert.KEY_ALERT_TEXT_2), cmd.getAlertText2());
+
+ JSONObject alertIcon = JsonUtils.readJsonObjectFromJsonObject(parameters, SubtleAlert.KEY_ALERT_ICON);
+ Image referenceAlertIcon = new Image(JsonRPCMarshaller.deserializeJSONObject(alertIcon));
+ assertTrue(TestValues.TRUE, Validator.validateImage(referenceAlertIcon, cmd.getAlertIcon()));
+
+ JSONArray ttsChunkArray = JsonUtils.readJsonArrayFromJsonObject(parameters, SubtleAlert.KEY_TTS_CHUNKS);
+ List<TTSChunk> ttsChunkList = new ArrayList<TTSChunk>();
+ for (int index = 0; index < ttsChunkArray.length(); index++) {
+ TTSChunk chunk = new TTSChunk(JsonRPCMarshaller.deserializeJSONObject( (JSONObject)ttsChunkArray.get(index)) );
+ ttsChunkList.add(chunk);
+ }
+ assertTrue(TestValues.TRUE, Validator.validateTtsChunks(ttsChunkList, cmd.getTtsChunks()));
+
+ assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(parameters, SubtleAlert.KEY_DURATION), cmd.getDuration());
+
+ JSONArray softButtonArray = JsonUtils.readJsonArrayFromJsonObject(parameters, SubtleAlert.KEY_SOFT_BUTTONS);
+ List<SoftButton> softButtonList = new ArrayList<SoftButton>();
+ for (int index = 0; index < softButtonArray.length(); index++) {
+ SoftButton chunk = new SoftButton(JsonRPCMarshaller.deserializeJSONObject( (JSONObject)softButtonArray.get(index)) );
+ softButtonList.add(chunk);
+ }
+ assertTrue(TestValues.TRUE, Validator.validateSoftButtons(softButtonList, cmd.getSoftButtons()));
+
+ assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(parameters, SubtleAlert.KEY_CANCEL_ID), cmd.getCancelID());
+
+ }
+ catch (JSONException e) {
+ fail(TestValues.JSON_FAIL);
+ }
+ }
+}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java
index 98eaf599c..747b61563 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java
@@ -63,6 +63,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
msg.setTurnSignal(TestValues.GENERAL_BOOLEAN);
msg.setElectronicParkBrakeStatus(TestValues.GENERAL_BOOLEAN);
msg.setCloudAppVehicleID(TestValues.GENERAL_BOOLEAN);
+ msg.setGearStatus(TestValues.GENERAL_BOOLEAN);
msg.setHandsOffSteering(TestValues.GENERAL_BOOLEAN);
msg.setWindowStatus(TestValues.GENERAL_BOOLEAN);
msg.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_BOOLEAN);
@@ -116,6 +117,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
result.put(UnsubscribeVehicleData.KEY_CLOUD_APP_VEHICLE_ID, TestValues.GENERAL_BOOLEAN);
result.put(UnsubscribeVehicleData.KEY_HANDS_OFF_STEERING, TestValues.GENERAL_BOOLEAN);
result.put(UnsubscribeVehicleData.KEY_WINDOW_STATUS, TestValues.GENERAL_BOOLEAN);
+ result.put(UnsubscribeVehicleData.KEY_GEAR_STATUS, TestValues.GENERAL_BOOLEAN);
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_BOOLEAN);
} catch (JSONException e) {
fail(TestValues.JSON_FAIL);
@@ -161,6 +163,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
assertTrue(TestValues.TRUE,( (UnsubscribeVehicleData) msg ).getCloudAppVehicleID());
assertTrue(TestValues.TRUE,( (UnsubscribeVehicleData) msg ).getHandsOffSteering());
assertTrue(TestValues.TRUE,( (UnsubscribeVehicleData) msg ).getWindowStatus());
+ assertTrue(TestValues.TRUE,( (UnsubscribeVehicleData) msg ).getGearStatus());
assertTrue(TestValues.TRUE,( (UnsubscribeVehicleData) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
// Invalid/Null Tests
UnsubscribeVehicleData msg = new UnsubscribeVehicleData();
@@ -198,6 +201,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
assertNull(TestValues.NULL, msg.getCloudAppVehicleID());
assertNull(TestValues.NULL, msg.getHandsOffSteering());
assertNull(TestValues.NULL, msg.getWindowStatus());
+ assertNull(TestValues.NULL, msg.getGearStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -252,6 +256,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_CLOUD_APP_VEHICLE_ID), cmd.getCloudAppVehicleID());
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_HANDS_OFF_STEERING), cmd.getHandsOffSteering());
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_WINDOW_STATUS), cmd.getWindowStatus());
+ assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_GEAR_STATUS), cmd.getGearStatus());
assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME), cmd.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
index 001bf54f2..6ebc03f80 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
@@ -12,6 +12,7 @@ import com.smartdevicelink.proxy.rpc.ECallInfo;
import com.smartdevicelink.proxy.rpc.EmergencyEvent;
import com.smartdevicelink.proxy.rpc.FuelRange;
import com.smartdevicelink.proxy.rpc.GPSData;
+import com.smartdevicelink.proxy.rpc.GearStatus;
import com.smartdevicelink.proxy.rpc.GetVehicleDataResponse;
import com.smartdevicelink.proxy.rpc.HeadLampStatus;
import com.smartdevicelink.proxy.rpc.MyKey;
@@ -101,6 +102,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
result.put(GetVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS);
result.put(GetVehicleDataResponse.KEY_WINDOW_STATUS, VehicleDataHelper.WINDOW_STATUS_LIST);
result.put(GetVehicleDataResponse.KEY_HANDS_OFF_STEERING, VehicleDataHelper.HANDS_OFF_STEERING);
+ result.put(GetVehicleDataResponse.KEY_GEAR_STATUS, VehicleDataHelper.GEAR_STATUS);
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE);
} catch(JSONException e){
fail(TestValues.JSON_FAIL);
@@ -127,6 +129,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
JSONObject myKeyObj = new JSONObject();
JSONObject fuelRangeObj = new JSONObject();
JSONObject windowStatusObj = new JSONObject();
+ JSONObject gearStatusObj = new JSONObject();
JSONArray fuelRangeArrayObj = new JSONArray();
JSONArray windowStatusArrayObj = new JSONArray();
@@ -254,6 +257,11 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
fuelRangeObj.put(FuelRange.KEY_RANGE, VehicleDataHelper.FUEL_RANGE_RANGE);
fuelRangeArrayObj.put(fuelRangeObj);
+ //GEAR_STATUS
+ gearStatusObj.put(GearStatus.KEY_USER_SELECTED_GEAR, VehicleDataHelper.USER_SELECTED_GEAR);
+ gearStatusObj.put(GearStatus.KEY_TRANSMISSION_TYPE, VehicleDataHelper.TRANSMISSION_TYPE);
+ gearStatusObj.put(GearStatus.KEY_ACTUAL_GEAR, VehicleDataHelper.ACTUAL_GEAR);
+
// WINDOW_STATUS
windowStatusObj.put(WindowStatus.KEY_LOCATION, VehicleDataHelper.LOCATION_GRID);
windowStatusObj.put(WindowStatus.KEY_STATE, VehicleDataHelper.WINDOW_STATE);
@@ -287,6 +295,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
reference.put(GetVehicleDataResponse.KEY_MY_KEY, myKeyObj);
reference.put(GetVehicleDataResponse.KEY_FUEL_RANGE, fuelRangeArrayObj);
reference.put(GetVehicleDataResponse.KEY_TURN_SIGNAL, TurnSignal.OFF);
+ reference.put(GetVehicleDataResponse.KEY_GEAR_STATUS, gearStatusObj);
reference.put(GetVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS);
reference.put(GetVehicleDataResponse.KEY_WINDOW_STATUS, windowStatusArrayObj);
reference.put(GetVehicleDataResponse.KEY_HANDS_OFF_STEERING, VehicleDataHelper.HANDS_OFF_STEERING);
@@ -408,6 +417,14 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
assertEquals("JSON value didn't match expected value for key \"" + key + "\".",
JsonUtils.readDoubleFromJsonObject(reference, key), JsonUtils.readDoubleFromJsonObject(underTest, key));
}
+ else if (key.equals(GetVehicleDataResponse.KEY_GEAR_STATUS)) {
+ JSONObject myKeyObjReference = JsonUtils.readJsonObjectFromJsonObject(reference, key);
+ JSONObject myKeyObjTest = JsonUtils.readJsonObjectFromJsonObject(underTest, key);
+
+ assertTrue(TestValues.TRUE, Validator.validateGearStatuses(
+ new GearStatus(JsonRPCMarshaller.deserializeJSONObject(myKeyObjReference)),
+ new GearStatus(JsonRPCMarshaller.deserializeJSONObject(myKeyObjTest))));
+ }
else if (key.equals(GetVehicleDataResponse.KEY_FUEL_RANGE)) {
JSONArray fuelRangeArrayObjReference = JsonUtils.readJsonArrayFromJsonObject(reference, key);
List<FuelRange> fuelRangeRefereceList = new ArrayList<FuelRange>();
@@ -495,6 +512,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
assertEquals(TestValues.MATCH, VehicleDataHelper.TURN_SIGNAL, ( (GetVehicleDataResponse) msg ).getTurnSignal());
assertEquals(TestValues.MATCH, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS, ( (GetVehicleDataResponse) msg ).getElectronicParkBrakeStatus());
assertEquals(TestValues.MATCH, VehicleDataHelper.WINDOW_STATUS_LIST, ( (GetVehicleDataResponse) msg ).getWindowStatus());
+ assertEquals(TestValues.MATCH, VehicleDataHelper.GEAR_STATUS, ( (GetVehicleDataResponse) msg ).getGearStatus());
assertEquals(TestValues.MATCH, VehicleDataHelper.HANDS_OFF_STEERING, ( (GetVehicleDataResponse) msg ).getHandsOffSteering());
assertEquals(TestValues.MATCH, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE, ( (GetVehicleDataResponse) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
@@ -530,6 +548,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
assertNull(TestValues.NULL, msg.getMyKey());
assertNull(TestValues.NULL, msg.getTurnSignal());
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
+ assertNull(TestValues.NULL, msg.getGearStatus());
assertNull(TestValues.NULL, msg.getHandsOffSteering());
assertNull(TestValues.NULL, msg.getWindowStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
@@ -615,7 +634,12 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
JSONObject clusterModeStatusObj = JsonUtils.readJsonObjectFromJsonObject(parameters, GetVehicleDataResponse.KEY_CLUSTER_MODE_STATUS);
ClusterModeStatus clusterModeStatus = new ClusterModeStatus(JsonRPCMarshaller.deserializeJSONObject(clusterModeStatusObj));
assertTrue(TestValues.TRUE, Validator.validateClusterModeStatus(clusterModeStatus, cmd.getClusterModeStatus()) );
-
+
+ JSONObject gearStatusObj = JsonUtils.readJsonObjectFromJsonObject(parameters, GetVehicleDataResponse.KEY_GEAR_STATUS);
+ GearStatus gearStatus = new GearStatus(JsonRPCMarshaller.deserializeJSONObject(gearStatusObj));
+ GearStatus cmdStatus = cmd.getGearStatus();
+ assertTrue(TestValues.TRUE, Validator.validateGearStatuses(gearStatus, cmdStatus));
+
JSONObject myKeyObj = JsonUtils.readJsonObjectFromJsonObject(parameters, GetVehicleDataResponse.KEY_MY_KEY);
MyKey myKey = new MyKey(JsonRPCMarshaller.deserializeJSONObject(myKeyObj));
assertTrue(TestValues.TRUE, Validator.validateMyKey(myKey, cmd.getMyKey()) );
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
index def395e1e..643935a02 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
@@ -65,6 +65,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
msg.setFuelRange(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELRANGE.ordinal()));
msg.setTurnSignal(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TURNSIGNAL.ordinal()));
msg.setElectronicParkBrakeStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()));
+ msg.setGearStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_GEARSTATUS.ordinal()));
msg.setHandsOffSteering(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()));
msg.setWindowStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()));
msg.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA);
@@ -120,6 +121,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
result.put(SubscribeVehicleDataResponse.KEY_FUEL_RANGE, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELRANGE.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_TURN_SIGNAL, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TURNSIGNAL.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_WINDOW_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()).serializeJSON());
+ result.put(SubscribeVehicleDataResponse.KEY_GEAR_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_GEARSTATUS.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_HANDS_OFF_STEERING, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()).serializeJSON());
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA.serializeJSON());
@@ -166,6 +168,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult testEBrakeStatus = ( (SubscribeVehicleDataResponse) msg ).getElectronicParkBrakeStatus();
VehicleDataResult testHOffSteering = ( (SubscribeVehicleDataResponse) msg ).getHandsOffSteering();
VehicleDataResult testWindowStatus = ( (SubscribeVehicleDataResponse) msg ).getWindowStatus();
+ VehicleDataResult testGearStatus = ( (SubscribeVehicleDataResponse) msg ).getGearStatus();
VehicleDataResult testOEMCustomVehicleData = ( (SubscribeVehicleDataResponse) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
// Valid Tests
@@ -198,6 +201,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
assertTrue(TestValues.TRUE, testTurnSignal.getDataType().equals(VehicleDataType.VEHICLEDATA_TURNSIGNAL));
assertTrue(TestValues.TRUE, testEBrakeStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS));
assertTrue(TestValues.TRUE, testHOffSteering.getDataType().equals(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING));
+ assertTrue(TestValues.TRUE, testGearStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_GEARSTATUS));
assertTrue(TestValues.TRUE, testWindowStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_WINDOWSTATUS));
assertTrue(TestValues.TRUE, testOEMCustomVehicleData.getOEMCustomVehicleDataType().equals(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
@@ -236,6 +240,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
assertNull(TestValues.NULL, msg.getHandsOffSteering());
assertNull(TestValues.NULL, msg.getWindowStatus());
+ assertNull(TestValues.NULL, msg.getGearStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -380,6 +385,10 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult referenceWindowStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(windowStatus));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceWindowStatus, cmd.getWindowStatus()));
+ JSONObject gearStatus = JsonUtils.readJsonObjectFromJsonObject(parameters, SubscribeVehicleDataResponse.KEY_GEAR_STATUS);
+ VehicleDataResult referenceGearStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(gearStatus));
+ assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceGearStatus, cmd.getGearStatus()));
+
JSONObject oemCustomVehicleDataName = JsonUtils.readJsonObjectFromJsonObject(parameters, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
VehicleDataResult referenceOemCustomData = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(oemCustomVehicleDataName));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceOemCustomData, cmd.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME)));
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubtleAlertResponseTests.java
index 2dcfb0509..8d2e6370f 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubtleAlertResponseTests.java
@@ -3,7 +3,7 @@ package com.smartdevicelink.test.rpc.responses;
import com.smartdevicelink.marshal.JsonRPCMarshaller;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCMessage;
-import com.smartdevicelink.proxy.rpc.StreamRPCResponse;
+import com.smartdevicelink.proxy.rpc.SubtleAlertResponse;
import com.smartdevicelink.test.BaseRpcTests;
import com.smartdevicelink.test.JsonUtils;
import com.smartdevicelink.test.TestValues;
@@ -14,43 +14,46 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
+
import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
-
+import static junit.framework.TestCase.assertNull;
+import static junit.framework.TestCase.fail;
/**
- * Created by austinkirk on 6/7/17.
+ * This is a unit test class for the SmartDeviceLink library project class :
+ * {@link com.smartdevicelink.proxy.rpc.SubtleAlertResponse}
*/
+public class SubtleAlertResponseTests extends BaseRpcTests {
+
+ private static final int TRY_AGAIN_TIME = 400;
-public class StreamRPCResponseTests extends BaseRpcTests {
@Override
- protected RPCMessage createMessage(){
- StreamRPCResponse response = new StreamRPCResponse();
- response.setFileSize((Long) TestValues.GENERAL_LONG);
- response.setFileName(TestValues.GENERAL_STRING);
- return response;
+ protected RPCMessage createMessage() {
+ SubtleAlertResponse alert = new SubtleAlertResponse();
+ alert.setTryAgainTime(TRY_AGAIN_TIME);
+ return alert;
}
@Override
- protected String getMessageType(){
+ protected String getMessageType() {
return RPCMessage.KEY_RESPONSE;
}
@Override
- protected String getCommandType(){
- return FunctionID.STREAM_RPC.toString();
+ protected String getCommandType() {
+ return FunctionID.SUBTLE_ALERT.toString();
}
@Override
- protected JSONObject getExpectedParameters(int sdlVersion){
+ protected JSONObject getExpectedParameters(int sdlVersion) {
JSONObject result = new JSONObject();
try {
- result.put(StreamRPCResponse.KEY_FILESIZE, (Long) TestValues.GENERAL_LONG);
- result.put(StreamRPCResponse.KEY_FILENAME, TestValues.GENERAL_STRING);
+ result.put(SubtleAlertResponse.KEY_TRY_AGAIN_TIME, TRY_AGAIN_TIME);
} catch (JSONException e) {
- e.printStackTrace();
+ fail(TestValues.JSON_FAIL);
}
return result;
@@ -60,25 +63,32 @@ public class StreamRPCResponseTests extends BaseRpcTests {
* Tests the expected values of the RPC message.
*/
@Test
- public void testRpcValues () {
+ public void testRpcValues() {
+ // Test Values
+ int tryAgainTime = ((SubtleAlertResponse) msg).getTryAgainTime();
+
+ // Valid Tests
+ assertEquals(TestValues.MATCH, TRY_AGAIN_TIME, tryAgainTime);
+
// Invalid/Null Tests
- StreamRPCResponse msg = new StreamRPCResponse();
+ SubtleAlertResponse msg = new SubtleAlertResponse();
assertNotNull(TestValues.NOT_NULL, msg);
testNullBase(msg);
+
+ assertNull(TestValues.NULL, msg.getTryAgainTime());
}
/**
* Tests a valid JSON construction of this RPC message.
*/
@Test
- public void testJsonConstructor () {
+ public void testJsonConstructor() {
JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
Hashtable<String, Object> hash = JsonRPCMarshaller.deserializeJSONObject(commandJson);
- StreamRPCResponse cmd = new StreamRPCResponse(hash);
-
+ SubtleAlertResponse cmd = new SubtleAlertResponse(hash);
JSONObject body = JsonUtils.readJsonObjectFromJsonObject(commandJson, getMessageType());
assertNotNull(TestValues.NOT_NULL, body);
@@ -87,10 +97,10 @@ public class StreamRPCResponseTests extends BaseRpcTests {
assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(body, RPCMessage.KEY_CORRELATION_ID), cmd.getCorrelationID());
JSONObject parameters = JsonUtils.readJsonObjectFromJsonObject(body, RPCMessage.KEY_PARAMETERS);
- assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, StreamRPCResponse.KEY_FILENAME), cmd.getFileName());
- assertEquals(TestValues.MATCH, JsonUtils.readLongFromJsonObject(parameters, StreamRPCResponse.KEY_FILESIZE), cmd.getFileSize());
+ assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(parameters, SubtleAlertResponse.KEY_TRY_AGAIN_TIME), cmd.getTryAgainTime());
+
} catch (JSONException e) {
e.printStackTrace();
}
}
-}
+} \ No newline at end of file
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
index b79ddc4cf..dc69b66ae 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
@@ -69,6 +69,7 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
msg.setElectronicParkBrakeStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()));
msg.setWindowStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()));
msg.setHandsOffSteering(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()));
+ msg.setGearStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_GEARSTATUS.ordinal()));
msg.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA);
return msg;
@@ -121,7 +122,8 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
result.put(SubscribeVehicleDataResponse.KEY_MY_KEY, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_MYKEY.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_FUEL_RANGE, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELRANGE.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_TURN_SIGNAL, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TURNSIGNAL.ordinal()).serializeJSON());
- result.put(SubscribeVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()).serializeJSON());
+ result.put(SubscribeVehicleDataResponse.KEY_GEAR_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_GEARSTATUS.ordinal()).serializeJSON());
+ result.put(SubscribeVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_HANDS_OFF_STEERING, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_WINDOW_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()).serializeJSON());
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA.serializeJSON());
@@ -167,6 +169,7 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult testTurnSignal = ( (UnsubscribeVehicleDataResponse) msg ).getTurnSignal();
VehicleDataResult testEBrakeStatus = ( (UnsubscribeVehicleDataResponse) msg ).getElectronicParkBrakeStatus();
VehicleDataResult testHOffSteering = ( (UnsubscribeVehicleDataResponse) msg ).getHandsOffSteering();
+ VehicleDataResult testGearStatus = ( (UnsubscribeVehicleDataResponse) msg ).getGearStatus();
VehicleDataResult testWindowStatus = ( (UnsubscribeVehicleDataResponse) msg ).getWindowStatus();
VehicleDataResult testOemCustomData = ( (UnsubscribeVehicleDataResponse) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
@@ -202,7 +205,8 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
assertTrue(TestValues.TRUE, testHOffSteering.getDataType().equals(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING));
assertTrue(TestValues.TRUE, testWindowStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_WINDOWSTATUS));
assertTrue(TestValues.TRUE, testOemCustomData.getOEMCustomVehicleDataType().equals(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
-
+ assertTrue(TestValues.TRUE, testGearStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_GEARSTATUS));
+
// Invalid/Null Tests
UnsubscribeVehicleDataResponse msg = new UnsubscribeVehicleDataResponse();
assertNotNull("Null object creation failed.", msg);
@@ -236,8 +240,9 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
assertNull(TestValues.NULL, msg.getFuelRange());
assertNull(TestValues.NULL, msg.getTurnSignal());
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
- assertNull(TestValues.NULL, msg.getHandsOffSteering());
- assertNull(TestValues.NULL, msg.getWindowStatus());
+ assertNull(TestValues.NULL, msg.getGearStatus());
+ assertNull(TestValues.NULL, msg.getHandsOffSteering());
+ assertNull(TestValues.NULL, msg.getWindowStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -378,6 +383,10 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult referenceHandsOffSteering = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(handsOffSteering));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceHandsOffSteering, cmd.getHandsOffSteering()));
+ JSONObject gearStatus = JsonUtils.readJsonObjectFromJsonObject(parameters, UnsubscribeVehicleDataResponse.KEY_GEAR_STATUS);
+ VehicleDataResult referenceGearStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(gearStatus));
+ assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceGearStatus, cmd.getGearStatus()));
+
JSONObject windowStatus = JsonUtils.readJsonObjectFromJsonObject(parameters, UnsubscribeVehicleDataResponse.KEY_WINDOW_STATUS);
VehicleDataResult referenceWindowStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(windowStatus));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceWindowStatus, cmd.getWindowStatus()));
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java b/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java
index fd5e5c891..69180d255 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/managers/ProxyBridge.java
@@ -80,10 +80,8 @@ import com.smartdevicelink.proxy.rpc.OnHashChange;
import com.smartdevicelink.proxy.rpc.OnInteriorVehicleData;
import com.smartdevicelink.proxy.rpc.OnKeyboardInput;
import com.smartdevicelink.proxy.rpc.OnLanguageChange;
-import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
import com.smartdevicelink.proxy.rpc.OnPermissionsChange;
import com.smartdevicelink.proxy.rpc.OnRCStatus;
-import com.smartdevicelink.proxy.rpc.OnStreamRPC;
import com.smartdevicelink.proxy.rpc.OnSystemCapabilityUpdated;
import com.smartdevicelink.proxy.rpc.OnSystemRequest;
import com.smartdevicelink.proxy.rpc.OnTBTClientState;
@@ -113,7 +111,6 @@ import com.smartdevicelink.proxy.rpc.ShowConstantTbtResponse;
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.SubscribeWayPointsResponse;
@@ -227,16 +224,16 @@ public class ProxyBridge implements IProxyListener{
lifecycleListener.onError(info, e);
}
- @Override
- public void onOnStreamRPC(OnStreamRPC notification) {
- onRPCReceived(notification);
-
- }
-
- @Override
- public void onStreamRPCResponse(StreamRPCResponse response) {
- onRPCReceived(response);
- }
+// @Override
+// public void onOnStreamRPC(OnStreamRPC notification) {
+// onRPCReceived(notification);
+//
+// }
+//
+// @Override
+// public void onStreamRPCResponse(StreamRPCResponse response) {
+// onRPCReceived(response);
+// }
@Override
public void onOnHMIStatus(OnHMIStatus notification) {
@@ -505,10 +502,10 @@ public class ProxyBridge implements IProxyListener{
}
- @Override
- public void onOnLockScreenNotification(OnLockScreenStatus notification) {
- onRPCReceived(notification);
- }
+// @Override
+// public void onOnLockScreenNotification(OnLockScreenStatus notification) {
+// onRPCReceived(notification);
+// }
@Override
public void onDialNumberResponse(DialNumberResponse response) {
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/managers/audio/AudioStreamManager.java b/android/sdl_android/src/main/java/com/smartdevicelink/managers/audio/AudioStreamManager.java
index 2656b4b58..38bc357b6 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/managers/audio/AudioStreamManager.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/managers/audio/AudioStreamManager.java
@@ -44,13 +44,13 @@ import androidx.annotation.NonNull;
import com.smartdevicelink.SdlConnection.SdlSession;
import com.smartdevicelink.managers.CompletionListener;
import com.smartdevicelink.managers.StreamingStateMachine;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.protocol.enums.SessionType;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.interfaces.IAudioStreamListener;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.interfaces.ISdlServiceListener;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.AudioPassThruCapabilities;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java b/android/sdl_android/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java
index ac8942dcb..4fe5e3898 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/managers/file/filetypes/SdlFile.java
@@ -53,8 +53,8 @@ public class SdlFile{
private boolean persistentFile;
private boolean isStaticIcon;
private boolean shouldAutoGenerateName;
- // Overwrite property by default is set to true in SdlFile constructors indicating that a file can be overwritten
- private boolean overwrite = true;
+ // Overwrite property by default is set to false in SdlFile constructors indicating that a file will not be overwritten
+ private boolean overwrite = false;
/**
* Creates a new instance of SdlFile
@@ -248,7 +248,7 @@ public class SdlFile{
}
/**
- * Gets the overwrite property for an SdlFile by default its set to true
+ * Gets the overwrite property for an SdlFile by default its set to false
* @return a boolean value that indicates if a file can be overwritten.
*/
public boolean getOverwrite() {
@@ -256,7 +256,7 @@ public class SdlFile{
}
/**
- * Sets the overwrite property for an SdlFile by default its set to true
+ * Sets the overwrite property for an SdlFile by default its set to false
* @param overwrite a boolean value that indicates if a file can be overwritten
*/
public void setOverwrite(boolean overwrite) {
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/managers/video/VideoStreamManager.java b/android/sdl_android/src/main/java/com/smartdevicelink/managers/video/VideoStreamManager.java
index fb5ccdb07..81db89049 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/managers/video/VideoStreamManager.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/managers/video/VideoStreamManager.java
@@ -45,13 +45,13 @@ import com.smartdevicelink.encoder.VirtualDisplayEncoder;
import com.smartdevicelink.managers.BaseSubManager;
import com.smartdevicelink.managers.CompletionListener;
import com.smartdevicelink.managers.StreamingStateMachine;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.protocol.enums.SessionType;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.interfaces.ISdlServiceListener;
import com.smartdevicelink.proxy.interfaces.IVideoStreamListener;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.DisplayCapabilities;
import com.smartdevicelink.proxy.rpc.ImageResolution;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java
index d94372740..6cb19000e 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/LockScreenManager.java
@@ -33,7 +33,6 @@ package com.smartdevicelink.proxy;
import android.graphics.Bitmap;
-import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.LockScreenStatus;
import com.smartdevicelink.util.AndroidTools;
@@ -84,17 +83,17 @@ public class LockScreenManager {
}
}
- public synchronized OnLockScreenStatus getLockObj(/*int SessionID*/)
- {
- //int iSessionID = SessionID;
- OnLockScreenStatus myLock = new OnLockScreenStatus();
- myLock.setDriverDistractionStatus(bDriverDistStatus);
- myLock.setHMILevel(hmiLevel);
- myLock.setUserSelected(bUserSelected);
- myLock.setShowLockScreen(getLockScreenStatus());
-
- return myLock;
- }
+// public synchronized OnLockScreenStatus getLockObj(/*int SessionID*/)
+// {
+// //int iSessionID = SessionID;
+// OnLockScreenStatus myLock = new OnLockScreenStatus();
+// myLock.setDriverDistractionStatus(bDriverDistStatus);
+// myLock.setHMILevel(hmiLevel);
+// myLock.setUserSelected(bUserSelected);
+// myLock.setShowLockScreen(getLockScreenStatus());
+//
+// return myLock;
+// }
private synchronized LockScreenStatus getLockScreenStatus()
{
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java
index d046fe5ad..1d1216b40 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/RPCRequestFactory.java
@@ -868,7 +868,7 @@ public class RPCRequestFactory {
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setPrndl(prndl);
@@ -894,7 +894,7 @@ public class RPCRequestFactory {
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setPrndl(prndl);
@@ -920,7 +920,7 @@ public class RPCRequestFactory {
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setVin(vin);
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
index daf203b5f..90dba74bd 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/proxy/SdlProxyBase.java
@@ -40,7 +40,6 @@ import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
-import androidx.annotation.NonNull;
import android.telephony.TelephonyManager;
import android.util.DisplayMetrics;
import android.util.SparseArray;
@@ -49,6 +48,8 @@ import android.view.InputDevice;
import android.view.MotionEvent;
import android.view.Surface;
+import androidx.annotation.NonNull;
+
import com.livio.taskmaster.Taskmaster;
import com.smartdevicelink.BuildConfig;
import com.smartdevicelink.Dispatcher.IDispatchingStrategy;
@@ -58,8 +59,8 @@ import com.smartdevicelink.SdlConnection.SdlSession;
import com.smartdevicelink.encoder.VirtualDisplayEncoder;
import com.smartdevicelink.exception.SdlException;
import com.smartdevicelink.exception.SdlExceptionCause;
-//import com.smartdevicelink.managers.video.HapticInterfaceManager;
import com.smartdevicelink.managers.ServiceEncryptionListener;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.managers.lifecycle.RpcConverter;
import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.marshal.JsonRPCMarshaller;
@@ -67,7 +68,6 @@ import com.smartdevicelink.protocol.ProtocolMessage;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.protocol.enums.MessageType;
import com.smartdevicelink.protocol.enums.SessionType;
-import com.smartdevicelink.protocol.heartbeat.HeartbeatMonitor;
import com.smartdevicelink.proxy.LockScreenManager.OnLockScreenIconDownloadedListener;
import com.smartdevicelink.proxy.callbacks.InternalProxyMessage;
import com.smartdevicelink.proxy.callbacks.OnError;
@@ -80,7 +80,7 @@ import com.smartdevicelink.proxy.interfaces.IPutFileResponseListener;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.interfaces.ISdlServiceListener;
import com.smartdevicelink.proxy.interfaces.IVideoStreamListener;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
+//import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.*;
import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
import com.smartdevicelink.proxy.rpc.enums.AudioStreamingState;
@@ -98,7 +98,6 @@ import com.smartdevicelink.proxy.rpc.enums.PrerecordedSpeech;
import com.smartdevicelink.proxy.rpc.enums.RequestType;
import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.enums.SamplingRate;
-import com.smartdevicelink.proxy.rpc.enums.SdlConnectionState;
import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
import com.smartdevicelink.proxy.rpc.enums.SdlInterfaceAvailability;
import com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType;
@@ -106,7 +105,6 @@ import com.smartdevicelink.proxy.rpc.enums.TextAlignment;
import com.smartdevicelink.proxy.rpc.enums.TouchType;
import com.smartdevicelink.proxy.rpc.enums.UpdateMode;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
-import com.smartdevicelink.proxy.rpc.listeners.OnPutFileUpdateListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCRequestListener;
@@ -160,6 +158,8 @@ import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
import java.util.concurrent.ScheduledExecutorService;
+//import com.smartdevicelink.managers.video.HapticInterfaceManager;
+
/**
* @deprecated use {@link com.smartdevicelink.managers.SdlManager} instead.
@@ -270,7 +270,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
protected Boolean _haveReceivedFirstFocusLevel = false;
protected Boolean _haveReceivedFirstFocusLevelFull = false;
protected Boolean _proxyDisposed = false;
- protected SdlConnectionState _sdlConnectionState = null;
+ //protected SdlConnectionState _sdlConnectionState = null;
protected SdlInterfaceAvailability _sdlIntefaceAvailablity = null;
protected HMILevel _hmiLevel = null;
protected OnHMIStatus lastHmiStatus;
@@ -1601,7 +1601,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
// ALM Specific Cleanup
if (_advancedLifecycleManagementEnabled) {
- _sdlConnectionState = SdlConnectionState.SDL_DISCONNECTED;
+ //_sdlConnectionState = SdlConnectionState.SDL_DISCONNECTED;
firstTimeFull = true;
@@ -2144,7 +2144,9 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
RPCRequest request = (RPCRequest) message;
OnRPCResponseListener listener = ((RPCRequest) message).getOnRPCResponseListener();
if (listener != null) {
- listener.onError(request.getCorrelationID(), Result.ABORTED, errorInfo);
+ GenericResponse response = new GenericResponse(false, Result.REJECTED);
+ response.setInfo(errorInfo);
+ listener.onResponse(request.getCorrelationID(), response);
}
}
DebugTool.logWarning(TAG, errorInfo);
@@ -2207,23 +2209,6 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
}
/**
- * Only call this method for a PutFile response. It will cause a class cast exception if not.
- * @param correlationId correlation id of the packet being updated
- * @param bytesWritten how many bytes were written
- * @param totalSize the total size in bytes
- */
- @SuppressWarnings("unused")
- public void onPacketProgress(int correlationId, long bytesWritten, long totalSize){
- synchronized(ON_UPDATE_LISTENER_LOCK){
- if(rpcResponseListeners !=null
- && rpcResponseListeners.indexOfKey(correlationId)>=0){
- ((OnPutFileUpdateListener)rpcResponseListeners.get(correlationId)).onUpdate(correlationId, bytesWritten, totalSize);
- }
- }
-
- }
-
- /**
* Will provide callback to the listener either onFinish or onError depending on the RPCResponses result code,
* <p>Will automatically remove the listener for the list of listeners on completion.
* @param msg The RPCResponse message that was received
@@ -2236,11 +2221,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
if(rpcResponseListeners !=null
&& rpcResponseListeners.indexOfKey(correlationId)>=0){
OnRPCResponseListener listener = rpcResponseListeners.get(correlationId);
- if(msg.getSuccess()){
- listener.onResponse(correlationId, msg);
- }else{
- listener.onError(correlationId, msg.getResultCode(), msg.getInfo());
- }
+ listener.onResponse(correlationId, msg);
rpcResponseListeners.remove(correlationId);
return true;
}
@@ -2258,9 +2239,6 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
synchronized(ON_UPDATE_LISTENER_LOCK){
if(rpcResponseListeners!=null
&& listener !=null){
- if(listener.getListenerType() == OnRPCResponseListener.UPDATE_LISTENER_TYPE_PUT_FILE){
- ((OnPutFileUpdateListener)listener).setTotalSize(totalSize);
- }
listener.onStart(correlationId);
rpcResponseListeners.put(correlationId, listener);
}
@@ -2575,7 +2553,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
sendBroadcastIntent(sendIntent);
// Send onSdlConnected message in ALM
- _sdlConnectionState = SdlConnectionState.SDL_CONNECTED;
+ //_sdlConnectionState = SdlConnectionState.SDL_CONNECTED;
// If registerAppInterface failed, exit with OnProxyUnusable
if (!msg.getSuccess()) {
@@ -2736,7 +2714,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
if (_advancedLifecycleManagementEnabled) {
// Send onSdlConnected message in ALM
- _sdlConnectionState = SdlConnectionState.SDL_CONNECTED;
+ //_sdlConnectionState = SdlConnectionState.SDL_CONNECTED;
// If registerAppInterface failed, exit with OnProxyUnusable
if (!msg.getSuccess()) {
@@ -4517,27 +4495,9 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} catch (SdlException e) {
e.printStackTrace();
if (listener != null) {
- listener.onError(correlationId, Result.GENERIC_ERROR, e.toString());
- }
- }
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- if (devOnRPCResponseListener != null){
- devOnRPCResponseListener.onError(correlationId, resultCode, info);
- }
- if (listener != null) {
- listener.onError(correlationId, resultCode, info);
- listener.onUpdate(rpcs.size());
- }
- try {
- // recurse after onError
- sendSequentialRequests(rpcs, listener);
- } catch (SdlException e) {
- e.printStackTrace();
- if (listener != null) {
- listener.onError(correlationId, Result.GENERIC_ERROR, e.toString());
+ GenericResponse genericResponse = new GenericResponse(false, Result.GENERIC_ERROR);
+ genericResponse.setInfo(e.toString());
+ listener.onResponse(correlationId, genericResponse);
}
}
}
@@ -4555,7 +4515,9 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
} catch (SdlException e) {
e.printStackTrace();
if (listener != null) {
- listener.onError(0, Result.GENERIC_ERROR, e.toString());
+ GenericResponse response = new GenericResponse(false, Result.REJECTED);
+ response.setInfo(e.toString());
+ listener.onResponse(0, response);
}
}
}
@@ -4619,17 +4581,6 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
listener.getSingleRpcResponseListener().onResponse(correlationId, response);
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- super.onError(correlationId, resultCode, info);
- if (devOnRPCResponseListener != null){
- devOnRPCResponseListener.onError(correlationId, resultCode, info);
- }
- if (listener.getSingleRpcResponseListener() != null) {
- listener.getSingleRpcResponseListener().onError(correlationId, resultCode, info);
- }
- }
});
}
sendRPCMessagePrivate(request);
@@ -7128,7 +7079,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setPrndl(prndl);
@@ -7177,7 +7128,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setPrndl(prndl);
@@ -7228,7 +7179,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setPrndl(prndl);
@@ -7278,7 +7229,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setPrndl(prndl);
@@ -7329,7 +7280,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setVin(vin);
@@ -7380,7 +7331,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
msg.setSpeed(speed);
msg.setRpm(rpm);
msg.setFuelLevel(fuelLevel);
- msg.setFuelLevel_State(fuelLevel_State);
+ msg.setFuelLevelState(fuelLevel_State);
msg.setInstantFuelConsumption(instantFuelConsumption);
msg.setExternalTemperature(externalTemperature);
msg.setVin(vin);
@@ -7603,17 +7554,17 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* core to elsewhere in the system.
* @throws SdlException if an unrecoverable error is encountered
*/
- @SuppressWarnings("unused")
- public void putFileStream(InputStream inputStream, @NonNull String fileName, Long offset, Long length, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, OnPutFileUpdateListener cb) throws SdlException {
- PutFile msg = new PutFile(fileName, FileType.BINARY);
- msg.setCorrelationID(10000);
- msg.setSystemFile(true);
- msg.setOffset(offset);
- msg.setLength(length);
- msg.setOnPutFileUpdateListener(cb);
- startRPCStream(inputStream, msg);
- }
-
+// @SuppressWarnings("unused")
+// public void putFileStream(InputStream inputStream, @NonNull String fileName, Long offset, Long length, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, OnPutFileUpdateListener cb) throws SdlException {
+// PutFile msg = new PutFile(fileName, FileType.BINARY);
+// msg.setCorrelationID(10000);
+// msg.setSystemFile(true);
+// msg.setOffset(offset);
+// msg.setLength(length);
+// //msg.setOnPutFileUpdateListener(cb);
+// startRPCStream(inputStream, msg);
+// }
+//
/**
* Used to push a binary stream of file data onto the module from a mobile device.
* Responses are captured through callback on IProxyListener.
@@ -7660,17 +7611,17 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* core to elsewhere in the system.
* @throws SdlException if an unrecoverable error is encountered
*/
- @SuppressWarnings("unused")
- public OutputStream putFileStream(@NonNull String fileName, Long offset, Long length, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, OnPutFileUpdateListener cb) throws SdlException {
- PutFile msg = new PutFile(fileName, FileType.BINARY);
- msg.setCorrelationID(10000);
- msg.setSystemFile(true);
- msg.setOffset(offset);
- msg.setLength(length);
- msg.setOnPutFileUpdateListener(cb);
-
- return startRPCStream(msg);
- }
+// @SuppressWarnings("unused")
+// public OutputStream putFileStream(@NonNull String fileName, Long offset, Long length, FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, OnPutFileUpdateListener cb) throws SdlException {
+// PutFile msg = new PutFile(fileName, FileType.BINARY);
+// msg.setCorrelationID(10000);
+// msg.setSystemFile(true);
+// msg.setOffset(offset);
+// msg.setLength(length);
+// //msg.setOnPutFileUpdateListener(cb);
+//
+// return startRPCStream(msg);
+// }
/**
* Used to push a stream of putfile RPC's containing binary data from a mobile device to the module.
@@ -7686,7 +7637,7 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* @param iCorrelationID - 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 if an unrecoverable error is encountered
- * @see #putFileStream(String, String, Long, FileType, Boolean, Boolean, Boolean, Integer, OnPutFileUpdateListener)
+// * @see #putFileStream(String, String, Long, FileType, Boolean, Boolean, Boolean, Integer, OnPutFileUpdateListener)
*/
@SuppressWarnings("unused")
@Deprecated
@@ -7724,19 +7675,19 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
* returned .
* @throws SdlException if an unrecoverable error is encountered
*/
- @SuppressWarnings("unused")
- public RPCStreamController putFileStream(String path, @NonNull String fileName, Long offset, @NonNull FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, Boolean isPayloadProtected, Integer correlationId, OnPutFileUpdateListener cb ) throws SdlException {
- PutFile msg = new PutFile(fileName, fileType);
- msg.setCorrelationID(correlationId);
- msg.setPersistentFile(isPersistentFile);
- msg.setSystemFile(isSystemFile);
- msg.setOffset(offset);
- msg.setLength(0L);
- msg.setPayloadProtected(isPayloadProtected);
- msg.setOnPutFileUpdateListener(cb);
-
- return startPutFileStream(path,msg);
- }
+// @SuppressWarnings("unused")
+// public RPCStreamController putFileStream(String path, @NonNull String fileName, Long offset, @NonNull FileType fileType, Boolean isPersistentFile, Boolean isSystemFile, Boolean isPayloadProtected, Integer correlationId, OnPutFileUpdateListener cb ) throws SdlException {
+// PutFile msg = new PutFile(fileName, fileType);
+// msg.setCorrelationID(correlationId);
+// msg.setPersistentFile(isPersistentFile);
+// msg.setSystemFile(isSystemFile);
+// msg.setOffset(offset);
+// msg.setLength(0L);
+// msg.setPayloadProtected(isPayloadProtected);
+// //msg.setOnPutFileUpdateListener(cb);
+//
+// return startPutFileStream(path,msg);
+// }
/**
* Used to push a stream of putfile RPC's containing binary data from a mobile device to the module.
@@ -7762,8 +7713,8 @@ public abstract class SdlProxyBase<proxyListenerType extends IProxyListenerBase>
msg.setCorrelationID(iCorrelationID);
msg.setPersistentFile(bPersistentFile);
msg.setSystemFile(bSystemFile);
- msg.setOffset(iOffset);
- msg.setLength(iLength);
+ msg.setOffset(Long.valueOf(iOffset));
+ msg.setLength(Long.valueOf(iLength));
return startPutFileStream(is, msg);
}
diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/streaming/StreamRPCPacketizer.java b/android/sdl_android/src/main/java/com/smartdevicelink/streaming/StreamRPCPacketizer.java
index 59904888d..91623dd9d 100644
--- a/android/sdl_android/src/main/java/com/smartdevicelink/streaming/StreamRPCPacketizer.java
+++ b/android/sdl_android/src/main/java/com/smartdevicelink/streaming/StreamRPCPacketizer.java
@@ -42,23 +42,18 @@ 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;
-import com.smartdevicelink.proxy.rpc.listeners.OnPutFileUpdateListener;
import com.smartdevicelink.util.Version;
import java.io.IOException;
import java.io.InputStream;
-import java.util.Hashtable;
@Deprecated
public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileResponseListener, Runnable{
private Integer iInitialCorrID = 0;
- private Hashtable<Integer, OnStreamRPC> notificationList = new Hashtable<Integer, OnStreamRPC>();
+ //private Hashtable<Integer, OnStreamRPC> notificationList = new Hashtable<Integer, OnStreamRPC>();
private Thread thread = null;
private long lFileSize = 0;
private String sFileName;
@@ -68,7 +63,7 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
private Object mPauseLock;
private boolean mPaused;
private boolean isRPCProtected = false;
- private OnPutFileUpdateListener callBack;
+ //private OnPutFileUpdateListener callBack;
private Version rpcSpecVersion;
@@ -86,7 +81,7 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
_proxy.addPutFileResponseListener(this);
}
if(_request.getFunctionName().equalsIgnoreCase(FunctionID.PUT_FILE.toString())){
- callBack = ((PutFile)_request).getOnPutFileUpdateListener();
+ //callBack = ((PutFile)_request).getOnPutFileUpdateListener();
}
}
@@ -104,7 +99,7 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
_proxy.addPutFileResponseListener(this);
}
if(_request.getFunctionName().equalsIgnoreCase(FunctionID.PUT_FILE.toString())){
- callBack = ((PutFile)_request).getOnPutFileUpdateListener();
+ //callBack = ((PutFile)_request).getOnPutFileUpdateListener();
}
}
@@ -130,50 +125,50 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
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;
+// 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;
+// 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;
}
@Override
@@ -195,7 +190,7 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
int length;
byte[] msgBytes;
ProtocolMessage pm;
- OnStreamRPC notification;
+ //OnStreamRPC notification;
// Moves the current Thread into the background
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_BACKGROUND);
@@ -217,7 +212,7 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
}
Long iFileLength = msg.getLength();
- notificationList.clear();
+ //notificationList.clear();
//start reading from the stream at the given offset
long iSkipBytes = is.skip(iOffsetCounter);
@@ -226,9 +221,9 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
{
handleStreamException(null,null," Error, PutFile offset invalid for file: " + sFileName);
}
- if(callBack!=null){
- callBack.onStart(_request.getCorrelationID(), lFileSize);
- }
+// if(callBack!=null){
+// callBack.onStart(_request.getCorrelationID(), lFileSize);
+// }
while (!Thread.interrupted()) {
synchronized (mPauseLock)
@@ -273,12 +268,12 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
priorityCoefficient++;
pm.setPriorityCoefficient(priorityCoefficient);
- notification = new OnStreamRPC();
- notification.setFileName(msg.getSdlFileName());
- notification.setFileSize(iFileLength);
- iOffsetCounter = iOffsetCounter + length;
- notification.setBytesComplete(iOffsetCounter);
- notificationList.put(msg.getCorrelationID(),notification);
+// 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;
@@ -296,36 +291,36 @@ public class StreamRPCPacketizer extends AbstractPacketizer implements IPutFileR
public void onPutFileResponse(PutFileResponse response)
{
- OnStreamRPC streamNote = notificationList.get(response.getCorrelationID());
- if (streamNote == null) return;
-
- if (response.getSuccess())
- {
- if(callBack!=null){
- callBack.onUpdate(response.getCorrelationID(), streamNote.getBytesComplete(), lFileSize);
- }
- if (_proxyListener != null){
- _proxyListener.onOnStreamRPC(streamNote);
- }
-
- }
- else
- {
- if(callBack!=null){
- callBack.onError(response.getCorrelationID(), response.getResultCode(), response.getInfo());
- }
- handleStreamException(response, null, "");
-
- }
-
- if (response.getSuccess() && streamNote.getBytesComplete().equals(streamNote.getFileSize()) )
- {
- if(callBack!=null){
- callBack.onResponse(iInitialCorrID, response, streamNote.getBytesComplete());
- }
- handleStreamSuccess(response, streamNote.getBytesComplete());
-
- }
+// OnStreamRPC streamNote = notificationList.get(response.getCorrelationID());
+// if (streamNote == null) return;
+//
+// if (response.getSuccess())
+// {
+// if(callBack!=null){
+// callBack.onUpdate(response.getCorrelationID(), streamNote.getBytesComplete(), lFileSize);
+// }
+// if (_proxyListener != null){
+// _proxyListener.onOnStreamRPC(streamNote);
+// }
+//
+// }
+// else
+// {
+// if(callBack!=null){
+// callBack.onError(response.getCorrelationID(), response.getResultCode(), response.getInfo());
+// }
+// handleStreamException(response, null, "");
+//
+// }
+//
+// if (response.getSuccess() && streamNote.getBytesComplete().equals(streamNote.getFileSize()) )
+// {
+// if(callBack!=null){
+// callBack.onResponse(iInitialCorrID, response, streamNote.getBytesComplete());
+// }
+// handleStreamSuccess(response, streamNote.getBytesComplete());
+//
+// }
}
@Override
diff --git a/base/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java b/base/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java
index 5dc9a3e75..8332f9d0e 100644
--- a/base/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/BaseSdlManager.java
@@ -38,6 +38,7 @@ import com.smartdevicelink.managers.file.FileManagerConfig;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
import com.smartdevicelink.managers.lifecycle.LifecycleConfigurationUpdate;
import com.smartdevicelink.managers.lifecycle.LifecycleManager;
+import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.managers.permission.PermissionManager;
import com.smartdevicelink.managers.screen.ScreenManager;
import com.smartdevicelink.protocol.enums.FunctionID;
@@ -46,7 +47,6 @@ import com.smartdevicelink.proxy.RPCMessage;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.rpc.ChangeRegistration;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
@@ -56,7 +56,6 @@ import com.smartdevicelink.proxy.rpc.TTSChunk;
import com.smartdevicelink.proxy.rpc.TemplateColorScheme;
import com.smartdevicelink.proxy.rpc.enums.AppHMIType;
import com.smartdevicelink.proxy.rpc.enums.Language;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
@@ -200,6 +199,12 @@ abstract class BaseSdlManager {
@Override
public void onResponse(int correlationId, RPCResponse response) {
if (response.getSuccess()) {
+ try {
+ DebugTool.logInfo(TAG, response.serializeJSON().toString());
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+
// go through and change sdlManager properties that were changed via the LCU update
hmiLanguage = actualHMILanguage;
language = actualLanguage;
@@ -219,18 +224,10 @@ abstract class BaseSdlManager {
if (lcu.getVoiceRecognitionCommandNames() != null) {
vrSynonyms = lcu.getVoiceRecognitionCommandNames();
}
+ } else {
+ DebugTool.logError(TAG, "Change Registration onError: " + response.getResultCode() + " | Info: " + response.getInfo());
+ retryChangeRegistration();
}
- try {
- DebugTool.logInfo(TAG, response.serializeJSON().toString());
- } catch (JSONException e) {
- e.printStackTrace();
- }
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "Change Registration onError: " + resultCode + " | Info: " + info);
- retryChangeRegistration();
}
});
this.sendRPC(changeRegistration);
diff --git a/base/src/main/java/com/smartdevicelink/managers/file/BaseFileManager.java b/base/src/main/java/com/smartdevicelink/managers/file/BaseFileManager.java
index c08cb17e0..6056cdbf6 100644
--- a/base/src/main/java/com/smartdevicelink/managers/file/BaseFileManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/file/BaseFileManager.java
@@ -146,24 +146,21 @@ abstract class BaseFileManager extends BaseSubManager {
@Override
public void onResponse(int correlationId, RPCResponse response) {
ListFilesResponse listFilesResponse = (ListFilesResponse) response;
- if(listFilesResponse.getSuccess()){
+ if (listFilesResponse.getSuccess()) {
bytesAvailable = listFilesResponse.getSpaceAvailable() != null ? listFilesResponse.getSpaceAvailable() : SPACE_AVAILABLE_MAX_VALUE;
- if(listFilesResponse.getFilenames() != null){
+ if (listFilesResponse.getFilenames() != null) {
remoteFiles.addAll(listFilesResponse.getFilenames());
}
// on callback set manager to ready state
transitionToState(BaseSubManager.READY);
+ } else {
+ // file list could not be received. assume that setting can work and allow SDLManager to start
+ DebugTool.logError(TAG, "File Manager could not list files");
+ bytesAvailable = SPACE_AVAILABLE_MAX_VALUE;
+ transitionToState(BaseSubManager.READY);
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- // file list could not be received. assume that setting can work and allow SDLManager to start
- DebugTool.logError(TAG, "File Manager could not list files");
- bytesAvailable = SPACE_AVAILABLE_MAX_VALUE;
- transitionToState(BaseSubManager.READY);
- }
});
internalInterface.sendRPC(listFiles);
}
@@ -273,23 +270,6 @@ abstract class BaseFileManager extends BaseSubManager {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- final RPCRequest request = requestMap.get(correlationId);
- if (request != null) {
- if (!deletionOperation) {
- if (shouldReUploadFile(((PutFile) request).getSdlFileName(), ((PutFile) request).getFileType())) {
- request.setOnRPCResponseListener(null);
- requestsToResend.add(request);
- } else {
- errors.put(((PutFile) request).getSdlFileName(), buildErrorString(resultCode, info));
- }
- } else {
- errors.put(((DeleteFile) request).getSdlFileName(), buildErrorString(resultCode, info));
- }
- }
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
if (response.getSuccess()) {
if (response instanceof PutFileResponse) {
@@ -310,9 +290,22 @@ abstract class BaseFileManager extends BaseSubManager {
uploadedEphemeralFileNames.remove(((DeleteFile) requestMap.get(correlationId)).getSdlFileName());
}
}
+ } else {
+ final RPCRequest request = requestMap.get(correlationId);
+ if (request != null) {
+ if (!deletionOperation) {
+ if (shouldReUploadFile(((PutFile) request).getSdlFileName(), ((PutFile) request).getFileType())) {
+ request.setOnRPCResponseListener(null);
+ requestsToResend.add(request);
+ } else {
+ errors.put(((PutFile) request).getSdlFileName(), buildErrorString(response.getResultCode(), response.getInfo()));
+ }
+ } else {
+ errors.put(((DeleteFile) request).getSdlFileName(), buildErrorString(response.getResultCode(), response.getInfo()));
+ }
+ }
}
}
-
};
internalInterface.sendRequests(requests, onMultipleRequestListener);
}
@@ -342,19 +335,15 @@ abstract class BaseFileManager extends BaseSubManager {
bytesAvailable = putFileResponse.getSpaceAvailable() != null ? putFileResponse.getSpaceAvailable() : SPACE_AVAILABLE_MAX_VALUE;
remoteFiles.add(file.getName());
uploadedEphemeralFileNames.add(file.getName());
- }
- if (listener != null) {
- listener.onComplete(putFileResponse.getSuccess());
- }
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- super.onError(correlationId, resultCode, info);
- if (shouldReUploadFile(file.getName(), file.getType())) {
- uploadFile(file, listener);
- } else if (listener != null) {
- listener.onComplete(false);
+ if (listener != null) {
+ listener.onComplete(true);
+ }
+ } else {
+ if (shouldReUploadFile(file.getName(), file.getType())) {
+ uploadFile(file, listener);
+ } else if (listener != null) {
+ listener.onComplete(false);
+ }
}
}
});
@@ -369,9 +358,9 @@ abstract class BaseFileManager extends BaseSubManager {
*/
private boolean shouldReUploadFile(String fileName, FileType fileType) {
if (!failedFileUploadsIndex.containsKey(fileName)) {
- if (fileType.equals(FileType.GRAPHIC_JPEG) ||
- fileType.equals(FileType.GRAPHIC_BMP) ||
- fileType.equals(FileType.GRAPHIC_PNG)) {
+ if (FileType.GRAPHIC_JPEG.equals(fileType) ||
+ FileType.GRAPHIC_BMP.equals(fileType) ||
+ FileType.GRAPHIC_PNG.equals(fileType)) {
failedFileUploadsIndex.put(fileName, fileManagerConfig.getArtworkRetryCount());
} else {
failedFileUploadsIndex.put(fileName, fileManagerConfig.getFileRetryCount());
diff --git a/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseLifecycleManager.java b/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseLifecycleManager.java
index 75469a69d..77fac4cfe 100644
--- a/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseLifecycleManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseLifecycleManager.java
@@ -50,12 +50,11 @@ import com.smartdevicelink.proxy.RPCMessage;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.managers.lifecycle.BaseSystemCapabilityManager;
import com.smartdevicelink.proxy.interfaces.IAudioStreamListener;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.interfaces.ISdlServiceListener;
import com.smartdevicelink.proxy.interfaces.IVideoStreamListener;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
+import com.smartdevicelink.proxy.rpc.GenericResponse;
import com.smartdevicelink.proxy.rpc.OnAppInterfaceUnregistered;
import com.smartdevicelink.proxy.rpc.OnButtonEvent;
import com.smartdevicelink.proxy.rpc.OnButtonPress;
@@ -81,7 +80,6 @@ import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.enums.SdlDisconnectedReason;
import com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
-import com.smartdevicelink.proxy.rpc.listeners.OnPutFileUpdateListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCRequestListener;
@@ -210,17 +208,6 @@ abstract class BaseLifecycleManager {
listener.getSingleRpcResponseListener().onResponse(correlationId, response);
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- super.onError(correlationId, resultCode, info);
- if (devOnRPCResponseListener != null) {
- devOnRPCResponseListener.onError(correlationId, resultCode, info);
- }
- if (listener.getSingleRpcResponseListener() != null) {
- listener.getSingleRpcResponseListener().onError(correlationId, resultCode, info);
- }
- }
});
}
sendRPCMessagePrivate(request, false);
@@ -270,20 +257,6 @@ abstract class BaseLifecycleManager {
// recurse after onResponse
sendSequentialRPCs(messages, listener);
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- if (devOnRPCResponseListener != null) {
- devOnRPCResponseListener.onError(correlationId, resultCode, info);
- }
- if (listener != null) {
- listener.onError(correlationId, resultCode, info);
- listener.onUpdate(messages.size());
-
- }
- // recurse after onError
- sendSequentialRPCs(messages, listener);
- }
});
sendRPCMessagePrivate(request, false);
} else {
@@ -530,24 +503,6 @@ abstract class BaseLifecycleManager {
}
/**
- * Only call this method for a PutFile response. It will cause a class cast exception if not.
- *
- * @param correlationId correlation id of the packet being updated
- * @param bytesWritten how many bytes were written
- * @param totalSize the total size in bytes
- */
- @SuppressWarnings("unused")
- private void onPacketProgress(int correlationId, long bytesWritten, long totalSize) {
- synchronized (ON_UPDATE_LISTENER_LOCK) {
- if (rpcResponseListeners != null
- && rpcResponseListeners.containsKey(correlationId)) {
- ((OnPutFileUpdateListener) rpcResponseListeners.get(correlationId)).onUpdate(correlationId, bytesWritten, totalSize);
- }
- }
-
- }
-
- /**
* Will provide callback to the listener either onFinish or onError depending on the RPCResponses result code,
* <p>Will automatically remove the listener for the list of listeners on completion.
*
@@ -561,10 +516,8 @@ abstract class BaseLifecycleManager {
if (rpcResponseListeners != null
&& rpcResponseListeners.containsKey(correlationId)) {
OnRPCResponseListener listener = rpcResponseListeners.get(correlationId);
- if (msg.getSuccess()) {
+ if (listener != null) {
listener.onResponse(correlationId, msg);
- } else {
- listener.onError(correlationId, msg.getResultCode(), msg.getInfo());
}
rpcResponseListeners.remove(correlationId);
return true;
@@ -578,15 +531,11 @@ abstract class BaseLifecycleManager {
*
* @param listener that will get called back when a response is received
* @param correlationId of the RPCRequest that was sent
- * @param totalSize only include if this is an OnPutFileUpdateListener. Otherwise it will be ignored.
*/
- private void addOnRPCResponseListener(OnRPCResponseListener listener, int correlationId, int totalSize) {
+ private void addOnRPCResponseListener(OnRPCResponseListener listener, int correlationId) {
synchronized (ON_UPDATE_LISTENER_LOCK) {
if (rpcResponseListeners != null
&& listener != null) {
- if (listener.getListenerType() == OnRPCResponseListener.UPDATE_LISTENER_TYPE_PUT_FILE) {
- ((OnPutFileUpdateListener) listener).setTotalSize(totalSize);
- }
listener.onStart(correlationId);
rpcResponseListeners.put(correlationId, listener);
}
@@ -735,7 +684,9 @@ abstract class BaseLifecycleManager {
// Test for illegal correlation ID
if (request.getCorrelationID() == REGISTER_APP_INTERFACE_CORRELATION_ID || request.getCorrelationID() == UNREGISTER_APP_INTERFACE_CORRELATION_ID || request.getCorrelationID() == PoliciesFetcher.POLICIES_CORRELATION_ID) {
if (listener != null) {
- request.getOnRPCResponseListener().onError(request.getCorrelationID(), Result.REJECTED, "Invalid correlation ID. The correlation ID, " + request.getCorrelationID() + " , is a reserved correlation ID.");
+ GenericResponse response = new GenericResponse(false, Result.REJECTED);
+ response.setInfo("Invalid correlation ID. The correlation ID, " + request.getCorrelationID() + " , is a reserved correlation ID.");
+ request.getOnRPCResponseListener().onResponse(request.getCorrelationID(), response);
}
return;
}
@@ -743,7 +694,9 @@ abstract class BaseLifecycleManager {
// Prevent developer from sending RAI or UAI manually
if (request.getFunctionName().equals(FunctionID.REGISTER_APP_INTERFACE.toString()) || request.getFunctionName().equals(FunctionID.UNREGISTER_APP_INTERFACE.toString())) {
if (listener != null) {
- request.getOnRPCResponseListener().onError(request.getCorrelationID(), Result.REJECTED, "The RPCRequest, " + message.getFunctionName() + ", is un-allowed to be sent manually by the developer.");
+ GenericResponse response = new GenericResponse(false, Result.REJECTED);
+ response.setInfo("The RPCRequest, " + message.getFunctionName() + ", is un-allowed to be sent manually by the developer.");
+ request.getOnRPCResponseListener().onResponse(request.getCorrelationID(), response);
}
return;
}
@@ -803,7 +756,9 @@ abstract class BaseLifecycleManager {
RPCRequest request = (RPCRequest) message;
OnRPCResponseListener listener = ((RPCRequest) message).getOnRPCResponseListener();
if (listener != null) {
- listener.onError(request.getCorrelationID(), Result.ABORTED, errorInfo);
+ GenericResponse response = new GenericResponse(false, Result.ABORTED);
+ response.setInfo(errorInfo);
+ request.getOnRPCResponseListener().onResponse(request.getCorrelationID(), response);
}
}
DebugTool.logWarning(TAG, errorInfo);
@@ -821,7 +776,7 @@ abstract class BaseLifecycleManager {
OnRPCResponseListener listener = ((RPCRequest) message).getOnRPCResponseListener();
if (listener != null) {
- addOnRPCResponseListener(listener, corrId, msgBytes.length);
+ addOnRPCResponseListener(listener, corrId);
}
}
} else if (RPCMessage.KEY_RESPONSE.equals(message.getMessageType())) { // Response Specifics
@@ -1204,7 +1159,7 @@ abstract class BaseLifecycleManager {
} else if (notification instanceof OnButtonPress) {
OnButtonPress onButtonPress = new OnButtonPress();
onButtonPress.setButtonPressMode(((OnButtonPress) notification).getButtonPressMode());
- onButtonPress.setCustomButtonName(((OnButtonPress) notification).getCustomButtonName());
+ onButtonPress.setCustomButtonID(((OnButtonPress) notification).getCustomButtonID());
notification2 = onButtonPress;
} else {
return null;
diff --git a/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseSystemCapabilityManager.java b/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseSystemCapabilityManager.java
index a86f716fd..ede4d7fbe 100644
--- a/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseSystemCapabilityManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/lifecycle/BaseSystemCapabilityManager.java
@@ -36,7 +36,6 @@ import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCMessage;
import com.smartdevicelink.proxy.RPCResponse;
import com.smartdevicelink.proxy.interfaces.ISdl;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.AppServiceCapability;
import com.smartdevicelink.proxy.rpc.AppServicesCapabilities;
import com.smartdevicelink.proxy.rpc.ButtonCapabilities;
@@ -59,7 +58,6 @@ import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.ImageType;
import com.smartdevicelink.proxy.rpc.enums.MediaClockFormat;
import com.smartdevicelink.proxy.rpc.enums.PredefinedWindows;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType;
import com.smartdevicelink.proxy.rpc.enums.WindowType;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCListener;
@@ -620,13 +618,6 @@ abstract class BaseSystemCapabilityManager {
}
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- if (scListener != null) {
- scListener.onError(info);
- }
- }
});
request.setCorrelationID(CorrelationIdGenerator.generateId());
diff --git a/base/src/main/java/com/smartdevicelink/managers/lifecycle/OnSystemCapabilityListener.java b/base/src/main/java/com/smartdevicelink/managers/lifecycle/OnSystemCapabilityListener.java
index f1dd490a8..e4b54b207 100644
--- a/base/src/main/java/com/smartdevicelink/managers/lifecycle/OnSystemCapabilityListener.java
+++ b/base/src/main/java/com/smartdevicelink/managers/lifecycle/OnSystemCapabilityListener.java
@@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
-package com.smartdevicelink.proxy.interfaces;
+package com.smartdevicelink.managers.lifecycle;
public interface OnSystemCapabilityListener {
void onCapabilityRetrieved(Object capability);
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java
index da2ed1173..81df9f9f7 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/BaseSoftButtonManager.java
@@ -38,11 +38,11 @@ import com.livio.taskmaster.Task;
import com.smartdevicelink.managers.BaseSubManager;
import com.smartdevicelink.managers.CompletionListener;
import com.smartdevicelink.managers.file.FileManager;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.proxy.interfaces.ISdl;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.DisplayCapability;
import com.smartdevicelink.proxy.rpc.OnButtonEvent;
import com.smartdevicelink.proxy.rpc.OnButtonPress;
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/BaseSubscribeButtonManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/BaseSubscribeButtonManager.java
index ba9e8aa53..3bdde236a 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/BaseSubscribeButtonManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/BaseSubscribeButtonManager.java
@@ -13,7 +13,6 @@ import com.smartdevicelink.proxy.rpc.OnButtonPress;
import com.smartdevicelink.proxy.rpc.SubscribeButton;
import com.smartdevicelink.proxy.rpc.UnsubscribeButton;
import com.smartdevicelink.proxy.rpc.enums.ButtonName;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
import com.smartdevicelink.util.DebugTool;
@@ -124,12 +123,11 @@ abstract class BaseSubscribeButtonManager extends BaseSubManager {
unsubscribeButtonRequest.setOnRPCResponseListener(new OnRPCResponseListener() {
@Override
public void onResponse(int correlationId, RPCResponse response) {
- onButtonListeners.remove(buttonName);
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- listener.onError("Attempt to unsubscribe to button named " + buttonName + " Failed. ResultCode: " + resultCode + " info: " + info);
+ if (response.getSuccess()) {
+ onButtonListeners.remove(buttonName);
+ } else {
+ listener.onError("Attempt to unsubscribe to button named " + buttonName + " Failed. ResultCode: " + response.getResultCode() + " info: " + response.getInfo());
+ }
}
});
internalInterface.sendRPC(unsubscribeButtonRequest);
@@ -146,13 +144,12 @@ abstract class BaseSubscribeButtonManager extends BaseSubManager {
subscribeButtonRequest.setOnRPCResponseListener(new OnRPCResponseListener() {
@Override
public void onResponse(int correlationId, RPCResponse response) {
- onButtonListeners.put(buttonName, new CopyOnWriteArrayList<OnButtonListener>());
- onButtonListeners.get(buttonName).add(listener);
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- listener.onError("Attempt to subscribe to button named " + buttonName + " Failed . ResultCode: " + resultCode + " info: " + info);
+ if (response.getSuccess()) {
+ onButtonListeners.put(buttonName, new CopyOnWriteArrayList<OnButtonListener>());
+ onButtonListeners.get(buttonName).add(listener);
+ } else {
+ listener.onError("Attempt to subscribe to button named " + buttonName + " Failed . ResultCode: " + response.getResultCode() + " info: " + response.getInfo());
+ }
}
});
internalInterface.sendRPC(subscribeButtonRequest);
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/BaseTextAndGraphicManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/BaseTextAndGraphicManager.java
index b8190edaa..007328c10 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/BaseTextAndGraphicManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/BaseTextAndGraphicManager.java
@@ -39,11 +39,12 @@ import com.smartdevicelink.managers.BaseSubManager;
import com.smartdevicelink.managers.CompletionListener;
import com.smartdevicelink.managers.file.FileManager;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
+import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.proxy.interfaces.ISdl;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.DisplayCapability;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
import com.smartdevicelink.proxy.rpc.Show;
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonReplaceOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonReplaceOperation.java
index 106806562..00b3824e1 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonReplaceOperation.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonReplaceOperation.java
@@ -10,7 +10,6 @@ import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.rpc.Show;
import com.smartdevicelink.proxy.rpc.SoftButton;
import com.smartdevicelink.proxy.rpc.SoftButtonCapabilities;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.enums.SoftButtonType;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
import com.smartdevicelink.util.DebugTool;
@@ -229,14 +228,6 @@ class SoftButtonReplaceOperation extends Task {
completionListener.onComplete(response.getSuccess());
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logWarning(TAG, "Failed to update soft buttons with text buttons");
- if (completionListener != null) {
- completionListener.onComplete(false);
- }
- }
});
show.setMainField1(currentMainField1);
show.setSoftButtons(softButtons);
@@ -285,14 +276,6 @@ class SoftButtonReplaceOperation extends Task {
completionListener.onComplete(response.getSuccess());
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logWarning(TAG, "Failed to update soft buttons with text buttons");
- if (completionListener != null) {
- completionListener.onComplete(false);
- }
- }
});
show.setMainField1(currentMainField1);
show.setSoftButtons(textButtons);
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonTransitionOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonTransitionOperation.java
index 355c6aeaf..4ef5e715a 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonTransitionOperation.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/SoftButtonTransitionOperation.java
@@ -5,7 +5,6 @@ import com.smartdevicelink.proxy.RPCResponse;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.rpc.Show;
import com.smartdevicelink.proxy.rpc.SoftButton;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
import com.smartdevicelink.util.DebugTool;
@@ -53,13 +52,6 @@ class SoftButtonTransitionOperation extends Task {
}
onFinished();
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- super.onError(correlationId, resultCode, info);
- DebugTool.logWarning(TAG, "Failed to transition soft button to new state. " + info);
- onFinished();
- }
});
show.setMainField1(currentMainField1);
show.setSoftButtons(currentStateSoftButtonsForObjects(softButtonObjects));
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/BaseChoiceSetManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/BaseChoiceSetManager.java
index 7de4f3434..0abb94e0a 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/BaseChoiceSetManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/BaseChoiceSetManager.java
@@ -42,11 +42,11 @@ import com.livio.taskmaster.Task;
import com.smartdevicelink.managers.BaseSubManager;
import com.smartdevicelink.managers.CompletionListener;
import com.smartdevicelink.managers.file.FileManager;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.proxy.interfaces.ISdl;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.DisplayCapability;
import com.smartdevicelink.proxy.rpc.KeyboardProperties;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/CheckChoiceVROptionalOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/CheckChoiceVROptionalOperation.java
index 6e606b62d..6cc0283d9 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/CheckChoiceVROptionalOperation.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/CheckChoiceVROptionalOperation.java
@@ -41,7 +41,6 @@ import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.rpc.Choice;
import com.smartdevicelink.proxy.rpc.CreateInteractionChoiceSet;
import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
import com.smartdevicelink.util.DebugTool;
@@ -86,12 +85,6 @@ class CheckChoiceVROptionalOperation extends Task {
sendTestChoiceWithVR();
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logWarning(TAG, "Head unit doesn't support choices with no VR. Error: " + info + " resultCode: " + resultCode);
- sendTestChoiceWithVR();
- }
});
if (internalInterface.get() != null) {
@@ -123,17 +116,6 @@ class CheckChoiceVROptionalOperation extends Task {
CheckChoiceVROptionalOperation.super.onFinished();
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logError(TAG, "There was an error in the check choice vr optional operation. Send test choice with VR failed. Error: " + info + " resultCode: " + resultCode);
- isVROptional = false;
- if (checkChoiceVROptionalInterface != null){
- checkChoiceVROptionalInterface.onError(info);
- }
-
- CheckChoiceVROptionalOperation.super.onFinished();
- }
});
if (internalInterface.get() != null) {
@@ -146,24 +128,17 @@ class CheckChoiceVROptionalOperation extends Task {
delete.setOnRPCResponseListener(new OnRPCResponseListener() {
@Override
public void onResponse(int correlationId, RPCResponse response) {
- if (response.getSuccess() != null){
+ if (response.getSuccess()){
DebugTool.logInfo(TAG, "Delete choice test set: "+ response.getSuccess());
+ if (checkChoiceVROptionalInterface != null){
+ checkChoiceVROptionalInterface.onCheckChoiceVROperationComplete(isVROptional);
+ }
+ } else {
+ DebugTool.logError(TAG, "There was an error presenting the keyboard. Finishing operation - choice set manager - . Error: " + response.getInfo() + " resultCode: " + response.getResultCode());
+ if (checkChoiceVROptionalInterface != null){
+ checkChoiceVROptionalInterface.onError(response.getInfo());
+ }
}
-
- if (checkChoiceVROptionalInterface != null){
- checkChoiceVROptionalInterface.onCheckChoiceVROperationComplete(isVROptional);
- }
-
- CheckChoiceVROptionalOperation.super.onFinished();
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logError(TAG, "There was an error presenting the keyboard. Finishing operation - choice set manager - . Error: " + info + " resultCode: " + resultCode);
- if (checkChoiceVROptionalInterface != null){
- checkChoiceVROptionalInterface.onError(info);
- }
-
CheckChoiceVROptionalOperation.super.onFinished();
}
});
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/DeleteChoicesOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/DeleteChoicesOperation.java
index de328b8eb..8672b1b83 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/DeleteChoicesOperation.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/DeleteChoicesOperation.java
@@ -40,7 +40,6 @@ import com.smartdevicelink.managers.CompletionListener;
import com.smartdevicelink.proxy.RPCResponse;
import com.smartdevicelink.proxy.interfaces.ISdl;
import com.smartdevicelink.proxy.rpc.DeleteInteractionChoiceSet;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
import com.smartdevicelink.util.DebugTool;
@@ -91,17 +90,15 @@ class DeleteChoicesOperation extends Task {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- if (completionListener != null) {
- completionListener.onComplete(false);
- }
- DebugTool.logError(TAG, "Failed to delete choice: " + info + " | Corr ID: " + correlationId);
-
- DeleteChoicesOperation.super.onFinished();
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
+ if (!response.getSuccess()) {
+ if (completionListener != null) {
+ completionListener.onComplete(false);
+ }
+ DebugTool.logError(TAG, "Failed to delete choice: " + response.getInfo() + " | Corr ID: " + correlationId);
+
+ DeleteChoicesOperation.super.onFinished();
+ }
}
});
}
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadChoicesOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadChoicesOperation.java
index ffce35694..d8a921b8a 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadChoicesOperation.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PreloadChoicesOperation.java
@@ -51,7 +51,6 @@ import com.smartdevicelink.proxy.rpc.Image;
import com.smartdevicelink.proxy.rpc.WindowCapability;
import com.smartdevicelink.proxy.rpc.enums.DisplayType;
import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.enums.TextFieldName;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
import com.smartdevicelink.util.DebugTool;
@@ -171,14 +170,11 @@ class PreloadChoicesOperation extends Task {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "There was an error uploading a choice cell: "+ info + " resultCode: " + resultCode);
- choiceError = true;
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
-
+ if (!response.getSuccess()) {
+ DebugTool.logError(TAG, "There was an error uploading a choice cell: "+ response.getInfo() + " resultCode: " + response.getResultCode());
+ choiceError = true;
+ }
}
});
}else{
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java
index 7038a48ab..121b1f6c0 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentChoiceSetOperation.java
@@ -159,14 +159,6 @@ class PresentChoiceSetOperation extends Task {
}
DebugTool.logInfo(TAG, "Success Setting keyboard properties in present choice set operation");
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- if (listener != null){
- listener.onComplete(false);
- }
- DebugTool.logError(TAG, "Error Setting keyboard properties in present keyboard operation - choice manager - " + info);
- }
});
if (internalInterface.get() != null){
internalInterface.get().sendRPC(setGlobalProperties);
@@ -187,6 +179,7 @@ class PresentChoiceSetOperation extends Task {
choiceSetSelectionListener.onError(response.getInfo());
}
finishOperation();
+ return;
}
PerformInteractionResponse performInteractionResponse = (PerformInteractionResponse) response;
@@ -199,16 +192,6 @@ class PresentChoiceSetOperation extends Task {
finishOperation();
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "Presenting Choice set failed: " + resultCode + ", " + info);
-
- if (choiceSetSelectionListener != null){
- choiceSetSelectionListener.onError(resultCode + ", " + info);
- }
- finishOperation();
- }
});
if (internalInterface.get() != null){
internalInterface.get().sendRPC(pi);
@@ -225,14 +208,12 @@ class PresentChoiceSetOperation extends Task {
setGlobalProperties.setOnRPCResponseListener(new OnRPCResponseListener() {
@Override
public void onResponse(int correlationId, RPCResponse response) {
- updatedKeyboardProperties = false;
- DebugTool.logInfo(TAG, "Successfully reset choice keyboard properties to original config");
- PresentChoiceSetOperation.super.onFinished();
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "Failed to reset choice keyboard properties to original config " + resultCode + ", " + info);
+ if (response.getSuccess()) {
+ updatedKeyboardProperties = false;
+ DebugTool.logInfo(TAG, "Successfully reset choice keyboard properties to original config");
+ } else {
+ DebugTool.logError(TAG, "Failed to reset choice keyboard properties to original config " + response.getResultCode() + ", " + response.getInfo());
+ }
PresentChoiceSetOperation.super.onFinished();
}
});
@@ -272,11 +253,6 @@ class PresentChoiceSetOperation extends Task {
public void onResponse(int correlationId, RPCResponse response) {
DebugTool.logInfo(TAG, "Canceled the presented choice set " + ((response.getResultCode() == Result.SUCCESS) ? "successfully" : "unsuccessfully"));
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logError(TAG, "Error canceling the presented choice set " + resultCode + " " + info);
- }
});
if (internalInterface.get() != null){
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java
index 446826616..33db35607 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/choiceset/PresentKeyboardOperation.java
@@ -124,12 +124,9 @@ class PresentKeyboardOperation extends Task {
pi.setOnRPCResponseListener(new OnRPCResponseListener() {
@Override
public void onResponse(int correlationId, RPCResponse response) {
- finishOperation();
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logError(TAG, "There was an error presenting the keyboard. Finishing operation - choice set manager - . Error: " + info + " resultCode: " + resultCode);
+ if (!response.getSuccess()) {
+ DebugTool.logError(TAG, "There was an error presenting the keyboard. Finishing operation - choice set manager - . Error: " + response.getInfo() + " resultCode: " + response.getResultCode());
+ }
finishOperation();
}
});
@@ -167,11 +164,6 @@ class PresentKeyboardOperation extends Task {
public void onResponse(int correlationId, RPCResponse response) {
DebugTool.logInfo(TAG, "Canceled the presented keyboard " + ((response.getResultCode() == Result.SUCCESS) ? "successfully" : "unsuccessfully"));
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logError(TAG, "Error canceling the presented keyboard " + resultCode + " " + info);
- }
});
if (internalInterface.get() != null){
internalInterface.get().sendRPC(cancelInteraction);
@@ -213,15 +205,6 @@ class PresentKeyboardOperation extends Task {
}
DebugTool.logInfo(TAG, "Success Setting keyboard properties in present keyboard operation - choice manager");
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- if (listener != null){
- listener.onComplete(false);
- }
- DebugTool.logError(TAG, "Error Setting keyboard properties in present keyboard operation - choice manager - " + info);
- super.onError(correlationId, resultCode, info);
- }
});
if (internalInterface.get() != null){
@@ -239,14 +222,12 @@ class PresentKeyboardOperation extends Task {
setGlobalProperties.setOnRPCResponseListener(new OnRPCResponseListener() {
@Override
public void onResponse(int correlationId, RPCResponse response) {
- updatedKeyboardProperties = false;
- DebugTool.logInfo(TAG, "Successfully reset choice keyboard properties to original config");
- PresentKeyboardOperation.super.onFinished();
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "Failed to reset choice keyboard properties to original config " + resultCode + ", " + info);
+ if (response.getSuccess()) {
+ updatedKeyboardProperties = false;
+ DebugTool.logInfo(TAG, "Successfully reset choice keyboard properties to original config");
+ } else {
+ DebugTool.logError(TAG, "Failed to reset choice keyboard properties to original config " + response.getResultCode() + ", " + response.getInfo());
+ }
PresentKeyboardOperation.super.onFinished();
}
});
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseMenuManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseMenuManager.java
index 0fcfc2c4c..c4c18ee16 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseMenuManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseMenuManager.java
@@ -36,34 +36,33 @@ import androidx.annotation.NonNull;
import com.smartdevicelink.managers.BaseSubManager;
import com.smartdevicelink.managers.CompletionListener;
+import com.smartdevicelink.managers.ManagerUtility;
import com.smartdevicelink.managers.file.FileManager;
import com.smartdevicelink.managers.file.MultipleFileCompletionListener;
import com.smartdevicelink.managers.file.filetypes.SdlArtwork;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
+import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.managers.lifecycle.SystemCapabilityManager;
import com.smartdevicelink.proxy.interfaces.ISdl;
-import com.smartdevicelink.proxy.interfaces.OnSystemCapabilityListener;
import com.smartdevicelink.proxy.rpc.AddCommand;
import com.smartdevicelink.proxy.rpc.AddSubMenu;
import com.smartdevicelink.proxy.rpc.DeleteCommand;
import com.smartdevicelink.proxy.rpc.DeleteSubMenu;
import com.smartdevicelink.proxy.rpc.DisplayCapability;
-import com.smartdevicelink.managers.ManagerUtility;
import com.smartdevicelink.proxy.rpc.MenuParams;
import com.smartdevicelink.proxy.rpc.OnCommand;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
-import com.smartdevicelink.proxy.rpc.ShowAppMenu;
import com.smartdevicelink.proxy.rpc.SetGlobalProperties;
+import com.smartdevicelink.proxy.rpc.ShowAppMenu;
import com.smartdevicelink.proxy.rpc.WindowCapability;
import com.smartdevicelink.proxy.rpc.enums.DisplayType;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
import com.smartdevicelink.proxy.rpc.enums.PredefinedWindows;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.enums.SystemCapabilityType;
import com.smartdevicelink.proxy.rpc.enums.SystemContext;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
@@ -285,11 +284,6 @@ abstract class BaseMenuManager extends BaseSubManager {
DebugTool.logError(TAG, "Open Main Menu Request Failed");
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logError(TAG, "Open Main Menu onError: "+ resultCode+ " | Info: "+ info);
- }
});
internalInterface.sendRPC(showAppMenu);
return true;
@@ -334,11 +328,6 @@ abstract class BaseMenuManager extends BaseSubManager {
DebugTool.logError(TAG, "Open Sub Menu Request Failed");
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info){
- DebugTool.logError(TAG, "Open Sub Menu onError: "+ resultCode+ " | Info: "+ info);
- }
});
internalInterface.sendRPC(showAppMenu);
@@ -381,13 +370,10 @@ abstract class BaseMenuManager extends BaseSubManager {
public void onResponse(int correlationId, RPCResponse response) {
if (response.getSuccess()) {
DebugTool.logInfo(TAG, "Menu Configuration successfully set: " + menuConfiguration.toString());
+ } else {
+ DebugTool.logError(TAG, "onError: " + response.getResultCode() + " | Info: " + response.getInfo());
}
}
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "onError: " + resultCode + " | Info: " + info);
- }
});
internalInterface.sendRPC(setGlobalProperties);
} else {
@@ -1175,16 +1161,15 @@ abstract class BaseMenuManager extends BaseSubManager {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "Result: " + resultCode.toString() + " Info: " + info);
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
- try {
- DebugTool.logInfo(TAG, "Main Menu response: " + response.serializeJSON().toString());
- } catch (JSONException e) {
- e.printStackTrace();
+ if (response.getSuccess()) {
+ try {
+ DebugTool.logInfo(TAG, "Main Menu response: " + response.serializeJSON().toString());
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ } else {
+ DebugTool.logError(TAG, "Result: " + response.getResultCode() + " Info: " + response.getInfo());
}
}
});
@@ -1214,19 +1199,18 @@ abstract class BaseMenuManager extends BaseSubManager {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "Failed to send sub menu commands: "+ info);
- if (listener != null){
- listener.onComplete(false);
- }
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
- try {
- DebugTool.logInfo(TAG, "Sub Menu response: "+ response.serializeJSON().toString());
- } catch (JSONException e) {
- e.printStackTrace();
+ if (response.getSuccess()) {
+ try {
+ DebugTool.logInfo(TAG, "Sub Menu response: " + response.serializeJSON().toString());
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ } else {
+ DebugTool.logError(TAG, "Failed to send sub menu commands: "+ response.getInfo());
+ if (listener != null){
+ listener.onComplete(false);
+ }
}
}
});
@@ -1267,16 +1251,15 @@ abstract class BaseMenuManager extends BaseSubManager {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- DebugTool.logError(TAG, "Result: " + resultCode.toString() + " Info: " + info);
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
- try {
- DebugTool.logInfo(TAG, "Dynamic Sub Menu response: " + response.serializeJSON().toString());
- } catch (JSONException e) {
- e.printStackTrace();
+ if (response.getSuccess()) {
+ try {
+ DebugTool.logInfo(TAG, "Dynamic Sub Menu response: " + response.serializeJSON().toString());
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
+ } else {
+ DebugTool.logError(TAG, "Result: " + response.getResultCode() + " Info: " + response.getInfo());
}
}
});
@@ -1331,10 +1314,6 @@ abstract class BaseMenuManager extends BaseSubManager {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
}
diff --git a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java
index c615408fd..f96452bb2 100644
--- a/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java
+++ b/base/src/main/java/com/smartdevicelink/managers/screen/menu/BaseVoiceCommandManager.java
@@ -46,7 +46,6 @@ import com.smartdevicelink.proxy.rpc.OnCommand;
import com.smartdevicelink.proxy.rpc.OnHMIStatus;
import com.smartdevicelink.proxy.rpc.enums.HMILevel;
import com.smartdevicelink.proxy.rpc.enums.PredefinedWindows;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import com.smartdevicelink.proxy.rpc.listeners.OnMultipleRequestListener;
import com.smartdevicelink.proxy.rpc.listeners.OnRPCNotificationListener;
import com.smartdevicelink.util.DebugTool;
@@ -206,11 +205,6 @@ abstract class BaseVoiceCommandManager extends BaseSubManager {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
-
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {}
});
@@ -245,11 +239,6 @@ abstract class BaseVoiceCommandManager extends BaseSubManager {
}
@Override
- public void onError(int correlationId, Result resultCode, String info) {
-
- }
-
- @Override
public void onResponse(int correlationId, RPCResponse response) {
}
});
diff --git a/base/src/main/java/com/smartdevicelink/protocol/enums/FunctionID.java b/base/src/main/java/com/smartdevicelink/protocol/enums/FunctionID.java
index 928f0dade..b9471209c 100644
--- a/base/src/main/java/com/smartdevicelink/protocol/enums/FunctionID.java
+++ b/base/src/main/java/com/smartdevicelink/protocol/enums/FunctionID.java
@@ -110,6 +110,7 @@ public enum FunctionID{
DELETE_WINDOW(61, "DeleteWindow"),
GET_INTERIOR_VEHICLE_DATA_CONSENT(62, "GetInteriorVehicleDataConsent"),
RELEASE_INTERIOR_VEHICLE_MODULE(63, "ReleaseInteriorVehicleDataModule"),
+ SUBTLE_ALERT(64, "SubtleAlert"),
// NOTIFICATIONS
ON_HMI_STATUS(32768, "OnHMIStatus"),
ON_APP_INTERFACE_UNREGISTERED(32769, "OnAppInterfaceUnregistered"),
@@ -131,17 +132,9 @@ public enum FunctionID{
ON_RC_STATUS(32785, "OnRCStatus"),
ON_APP_SERVICE_DATA(32786, "OnAppServiceData"),
ON_SYSTEM_CAPABILITY_UPDATED(32787, "OnSystemCapabilityUpdated"),
-
- // MOCKED FUNCTIONS (NOT SENT FROM HEAD-UNIT)
- @Deprecated
- ON_LOCK_SCREEN_STATUS(-1, "OnLockScreenStatus"),
- @Deprecated
- ON_SDL_CHOICE_CHOSEN(-1, "OnSdlChoiceChosen"),
- @Deprecated
- ON_STREAM_RPC(-1, "OnStreamRPC"),
- @Deprecated
- STREAM_RPC(-1, "StreamRPC"),
-
+ ON_SUBTLE_ALERT_PRESSED(32788, "OnSubtleAlertPressed"),
+ ON_UPDATE_FILE(32789, "OnUpdateFile"),
+ ON_UPDATE_SUB_MENU(32790, "OnUpdateSubMenu"),
;
public static final int INVALID_ID = -1;
diff --git a/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java b/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
index 988325bd9..e00309fb5 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/interfaces/IProxyListenerBase.java
@@ -73,10 +73,8 @@ import com.smartdevicelink.proxy.rpc.OnHashChange;
import com.smartdevicelink.proxy.rpc.OnInteriorVehicleData;
import com.smartdevicelink.proxy.rpc.OnKeyboardInput;
import com.smartdevicelink.proxy.rpc.OnLanguageChange;
-import com.smartdevicelink.proxy.rpc.OnLockScreenStatus;
import com.smartdevicelink.proxy.rpc.OnPermissionsChange;
import com.smartdevicelink.proxy.rpc.OnRCStatus;
-import com.smartdevicelink.proxy.rpc.OnStreamRPC;
import com.smartdevicelink.proxy.rpc.OnSystemCapabilityUpdated;
import com.smartdevicelink.proxy.rpc.OnSystemRequest;
import com.smartdevicelink.proxy.rpc.OnTBTClientState;
@@ -105,7 +103,6 @@ import com.smartdevicelink.proxy.rpc.ShowConstantTbtResponse;
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.SubscribeWayPointsResponse;
@@ -146,9 +143,9 @@ public interface IProxyListenerBase {
public void onServiceNACKed(OnServiceNACKed serviceNACKed);
- public void onOnStreamRPC(OnStreamRPC notification);
+ //public void onOnStreamRPC(OnStreamRPC notification);
- public void onStreamRPCResponse(StreamRPCResponse response);
+ //public void onStreamRPCResponse(StreamRPCResponse response);
/**
* onProxyError() being called indicates that the SDL Proxy experenced an error.
@@ -370,7 +367,7 @@ public interface IProxyListenerBase {
public void onGetDTCsResponse(GetDTCsResponse response);
- public void onOnLockScreenNotification(OnLockScreenStatus notification);
+ //public void onOnLockScreenNotification(OnLockScreenStatus notification);
public void onDialNumberResponse(DialNumberResponse response);
diff --git a/base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java b/base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java
index a4183f01a..6a1b1b97d 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/interfaces/ISdl.java
@@ -3,6 +3,7 @@ package com.smartdevicelink.proxy.interfaces;
import androidx.annotation.NonNull;
import com.livio.taskmaster.Taskmaster;
+import com.smartdevicelink.managers.lifecycle.OnSystemCapabilityListener;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.protocol.enums.SessionType;
import com.smartdevicelink.proxy.RPCMessage;
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java
index da346d0f9..ff01b72e4 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/BeltStatus.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
@@ -160,7 +160,6 @@ public class BeltStatus extends RPCStruct {
public static final String KEY_LEFT_ROW_3_BUCKLE_BELTED = "leftRow3BuckleBelted";
public static final String KEY_RIGHT_ROW_3_BUCKLE_BELTED = "rightRow3BuckleBelted";
- @Deprecated public static final String KEY_REAR_INFLATABLE_BELTED = "rearInflatableBelted";
public static final String KEY_LEFT_REAR_INFLATABLE_BELTED = "leftRearInflatableBelted";
public static final String KEY_RIGHT_REAR_INFLATABLE_BELTED = "rightRearInflatableBelted";
public static final String KEY_MIDDLE_ROW_1_BELT_DEPLOYED = "middleRow1BeltDeployed";
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/CancelInteraction.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/CancelInteraction.java
index 7df082734..9016458a6 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/CancelInteraction.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/CancelInteraction.java
@@ -91,8 +91,8 @@ public class CancelInteraction extends RPCRequest {
// Custom Getters / Setters
/**
- * The ID of the type of interaction to dismiss.
- * Only values 10 (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), and 26 (SliderID) are permitted.
+ * Gets the ID of the type of interaction the developer wants to dismiss.
+ * Only values 10 (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), 26 (SliderID), and 64 (SubtleAlertID) are permitted.
* @return - the functionID
*/
public Integer getInteractionFunctionID() {
@@ -100,8 +100,8 @@ public class CancelInteraction extends RPCRequest {
}
/**
- * The ID of the type of interaction to dismiss.
- * Only values 10 (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), and 26 (SliderID) are permitted.
+ * Sets the ID of the type of interaction the developer wants to dismiss.
+ * Only values 10 (PerformInteractionID), 12 (AlertID), 25 (ScrollableMessageID), 26 (SliderID), and 64 (SubtleAlertID) are permitted.
* @param functionID - the functionID
*/
public void setInteractionFunctionID(@NonNull Integer functionID) {
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java
index 931752c73..72fb49a91 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/Choice.java
@@ -127,22 +127,6 @@ public class Choice extends RPCStruct {
setChoiceID(choiceID);
setMenuName(menuName);
}
-
- /**
- * Constructs a newly allocated Choice object
- * @param choiceID Min: 0 Max: 65535
- * @param menuName the menu name
- * @param vrCommands the List of vrCommands
- *
- * Deprecated - use {@link #Choice(Integer, String)}
- */
- @Deprecated
- public Choice(@NonNull Integer choiceID, @NonNull String menuName, @NonNull List<String> vrCommands) {
- this();
- setChoiceID(choiceID);
- setMenuName(menuName);
- setVrCommands(vrCommands);
- }
/**
* VrCommands became optional as of RPC Spec 5.0. On legacy systems, we must still set VrCommands, as
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
index d8876a692..e1076935b 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/DeleteFileResponse.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
@@ -61,22 +61,6 @@ public class DeleteFileResponse extends RPCResponse {
}
/**
- * @deprecated use {@link DeleteFileResponse#DeleteFileResponse(Boolean, Result)} instead <br>
- *
- * Constructs a new DeleteFileResponse object
- * @param success whether the request is successfully processed
- * @param resultCode whether the request is successfully processed
- * @param spaceAvailable the total local space available on the module for the registered app.
- */
- @Deprecated
- public DeleteFileResponse(@NonNull Boolean success, @NonNull Result resultCode, @NonNull Integer spaceAvailable) {
- this();
- setSuccess(success);
- setResultCode(resultCode);
- setSpaceAvailable(spaceAvailable);
- }
-
- /**
* Constructs a new DeleteFileResponse object
* @param success whether the request is successfully processed
* @param resultCode whether the request is successfully processed
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java
index 8113f2add..c19068eb0 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/DeviceInfo.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import com.smartdevicelink.proxy.RPCStruct;
@@ -108,8 +108,6 @@ public class DeviceInfo extends RPCStruct{
public static final String KEY_OS_VERSION = "osVersion";
public static final String KEY_CARRIER = "carrier";
public static final String KEY_MAX_NUMBER_RFCOMM_PORTS = "maxNumberRFCOMMPorts";
- @Deprecated
- public static final String DEVICE_OS = "Android";
public DeviceInfo() { }
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
index ce6492a64..c1a1cf5cb 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/DiagnosticMessageResponse.java
@@ -57,19 +57,6 @@ public class DiagnosticMessageResponse extends RPCResponse {
public DiagnosticMessageResponse(Hashtable<String, Object> hash) {
super(hash);
}
- /**
- * Constructs a new DiagnosticMessageResponse object
- * @param success whether the request is successfully processed
- * @param resultCode whether the request is successfully processed
- * @deprecated use {@link DiagnosticMessageResponse#DiagnosticMessageResponse(Boolean, Result)}
- */
- @Deprecated
- public DiagnosticMessageResponse(@NonNull Boolean success, @NonNull Result resultCode, @NonNull List<Integer> messageDataResult) {
- this();
- setSuccess(success);
- setResultCode(resultCode);
- setMessageDataResult(messageDataResult);
- }
/**
* Constructs a new DiagnosticMessageResponse object
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
index d1334f1ed..43b4b408e 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/DisplayCapabilities.java
@@ -94,7 +94,7 @@ import java.util.List;
*
*/
public class DisplayCapabilities extends RPCStruct {
- public static final String KEY_DISPLAY_TYPE = "displayType";
+ @Deprecated public static final String KEY_DISPLAY_TYPE = "displayType";
public static final String KEY_DISPLAY_NAME = "displayName";
public static final String KEY_MEDIA_CLOCK_FORMATS = "mediaClockFormats";
public static final String KEY_TEXT_FIELDS = "textFields";
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/DynamicUpdateCapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/DynamicUpdateCapabilities.java
new file mode 100644
index 000000000..f8b16ce29
--- /dev/null
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/DynamicUpdateCapabilities.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2017 - 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.ImageFieldName;
+
+import java.util.Hashtable;
+import java.util.List;
+
+/**
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Required</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>supportedDynamicImageFieldNames</td>
+ * <td>List<ImageFieldName></td>
+ * <td>An array of ImageFieldName values for which the system supports sending OnFileUpdatenotifications. If you send an Image struct for that image field with a name without havinguploaded the image data using PutFile that matches that name, the system will request thatyou upload the data with PutFile at a later point when the HMI needs it. The HMI will thendisplay the image in the appropriate field. If not sent, assume false.</td>
+ * <td>N</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>supportsDynamicSubMenus</td>
+ * <td>Boolean</td>
+ * <td>If true, the head unit supports dynamic sub-menus by sending OnUpdateSubMenunotifications. If true, you should not send AddCommands that attach to a parentID for anAddSubMenu until OnUpdateSubMenu is received with the menuID. At that point, you shouldsend all AddCommands with a parentID that match the menuID. If not set, assume false.</td>
+ * <td>N</td>
+ * <td></td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 7.0.0
+ */
+public class DynamicUpdateCapabilities extends RPCStruct {
+ public static final String KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES = "supportedDynamicImageFieldNames";
+ public static final String KEY_SUPPORTS_DYNAMIC_SUB_MENUS = "supportsDynamicSubMenus";
+
+ /**
+ * Constructs a new DynamicUpdateCapabilities object
+ */
+ public DynamicUpdateCapabilities() { }
+
+ /**
+ * Constructs a new DynamicUpdateCapabilities object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public DynamicUpdateCapabilities(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets the supportedDynamicImageFieldNames.
+ *
+ * @param supportedDynamicImageFieldNames An array of ImageFieldName values for which the system supports sending OnFileUpdate
+ * notifications. If you send an Image struct for that image field with a name without having
+ * uploaded the image data using PutFile that matches that name, the system will request that
+ * you upload the data with PutFile at a later point when the HMI needs it. The HMI will then
+ * display the image in the appropriate field. If not sent, assume false.
+ */
+ public void setSupportedDynamicImageFieldNames(List<ImageFieldName> supportedDynamicImageFieldNames) {
+ setValue(KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES, supportedDynamicImageFieldNames);
+ }
+
+ /**
+ * Gets the supportedDynamicImageFieldNames.
+ *
+ * @return List<ImageFieldName> An array of ImageFieldName values for which the system supports sending OnFileUpdate
+ * notifications. If you send an Image struct for that image field with a name without having
+ * uploaded the image data using PutFile that matches that name, the system will request that
+ * you upload the data with PutFile at a later point when the HMI needs it. The HMI will then
+ * display the image in the appropriate field. If not sent, assume false.
+ */
+ @SuppressWarnings("unchecked")
+ public List<ImageFieldName> getSupportedDynamicImageFieldNames() {
+ return (List<ImageFieldName>) getObject(ImageFieldName.class, KEY_SUPPORTED_DYNAMIC_IMAGE_FIELD_NAMES);
+ }
+
+ /**
+ * Sets the supportsDynamicSubMenus.
+ *
+ * @param supportsDynamicSubMenus If true, the head unit supports dynamic sub-menus by sending OnUpdateSubMenu
+ * notifications. If true, you should not send AddCommands that attach to a parentID for an
+ * AddSubMenu until OnUpdateSubMenu is received with the menuID. At that point, you should
+ * send all AddCommands with a parentID that match the menuID. If not set, assume false.
+ */
+ public void setSupportsDynamicSubMenus(Boolean supportsDynamicSubMenus) {
+ setValue(KEY_SUPPORTS_DYNAMIC_SUB_MENUS, supportsDynamicSubMenus);
+ }
+
+ /**
+ * Gets the supportsDynamicSubMenus.
+ *
+ * @return Boolean If true, the head unit supports dynamic sub-menus by sending OnUpdateSubMenu
+ * notifications. If true, you should not send AddCommands that attach to a parentID for an
+ * AddSubMenu until OnUpdateSubMenu is received with the menuID. At that point, you should
+ * send all AddCommands with a parentID that match the menuID. If not set, assume false.
+ */
+ public Boolean getSupportsDynamicSubMenus() {
+ return getBoolean(KEY_SUPPORTS_DYNAMIC_SUB_MENUS);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
index baeecc2f4..f36cd6127 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GPSData.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
@@ -195,7 +195,7 @@ public class GPSData extends RPCStruct {
public static final String KEY_ALTITUDE = "altitude";
public static final String KEY_HEADING = "heading";
public static final String KEY_SPEED = "speed";
- public static final String KEY_SHIFTED = "shifted";
+ public static final String KEY_SHIFTED = "shifted";
/**
* Constructs a newly allocated GPSData object
@@ -212,37 +212,6 @@ public class GPSData extends RPCStruct {
/**
* Constructs a newly allocated GPSData object
- * @deprecated Use {@link #GPSData(@NonNull Double, @NonNull Double)()} instead
- */
- @Deprecated
- public GPSData(@NonNull Double longitudeDegrees, @NonNull Double latitudeDegrees, @NonNull Integer utcYear,
- @NonNull Integer utcMonth, @NonNull Integer utcDay, @NonNull Integer utcHours,
- @NonNull Integer utcMinutes, @NonNull Integer utcSeconds, @NonNull CompassDirection compassDirection,
- @NonNull Double pdop, @NonNull Double hdop, @NonNull Double vdop, @NonNull Boolean actual,
- @NonNull Integer satellites, @NonNull Dimension dimension, @NonNull Double altitude, @NonNull Double heading, @NonNull Double speed) {
- this();
- setLongitudeDegrees(longitudeDegrees);
- setLatitudeDegrees(latitudeDegrees);
- setUtcYear(utcYear);
- setUtcMonth(utcMonth);
- setUtcDay(utcDay);
- setUtcHours(utcHours);
- setUtcMinutes(utcMinutes);
- setUtcSeconds(utcSeconds);
- setCompassDirection(compassDirection);
- setPdop(pdop);
- setHdop(hdop);
- setVdop(vdop);
- setActual(actual);
- setSatellites(satellites);
- setDimension(dimension);
- setAltitude(altitude);
- setHeading(heading);
- setSpeed(speed);
- }
-
- /**
- * Constructs a newly allocated GPSData object
*/
public GPSData(@NonNull Double longitudeDegrees, @NonNull Double latitudeDegrees) {
this();
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GearStatus.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GearStatus.java
new file mode 100644
index 000000000..131e7f831
--- /dev/null
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GearStatus.java
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2017 - 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.proxy.RPCStruct;
+import com.smartdevicelink.proxy.rpc.enums.PRNDL;
+import com.smartdevicelink.proxy.rpc.enums.TransmissionType;
+
+import java.util.Hashtable;
+
+/**
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Required</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>userSelectedGear</td>
+ * <td>PRNDL</td>
+ * <td>Gear position selected by the user i.e. Park, Drive, Reverse</td>
+ * <td>N</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>actualGear</td>
+ * <td>PRNDL</td>
+ * <td>Actual Gear in use by the transmission</td>
+ * <td>N</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>transmissionType</td>
+ * <td>TransmissionType</td>
+ * <td>Tells the transmission type</td>
+ * <td>N</td>
+ * <td></td>
+ * </tr>
+ * </table>
+ * @since SmartDeviceLink 7.0.0
+ */
+public class GearStatus extends RPCStruct {
+ public static final String KEY_USER_SELECTED_GEAR = "userSelectedGear";
+ public static final String KEY_ACTUAL_GEAR = "actualGear";
+ public static final String KEY_TRANSMISSION_TYPE = "transmissionType";
+
+ /**
+ * Constructs a newly allocated GearStatus object
+ */
+ public GearStatus() {}
+
+ /**
+ * Constructs a new GearStatus object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public GearStatus(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets the userSelectedGear.
+ *
+ * @param userSelectedGear Gear position selected by the user i.e. Park, Drive, Reverse
+ */
+ public void setUserSelectedGear(PRNDL selectedGear){
+ setValue(KEY_USER_SELECTED_GEAR, selectedGear);
+ }
+
+ /**
+ * Gets the userSelectedGear.
+ *
+ * @return PRNDL Gear position selected by the user i.e. Park, Drive, Reverse
+ */
+ @SuppressWarnings("unchecked")
+ public PRNDL getUserSelectedGear(){
+ return (PRNDL)getObject(PRNDL.class, KEY_USER_SELECTED_GEAR);
+ }
+
+ /**
+ * Sets the actualGear.
+ *
+ * @param actualGear Actual Gear in use by the transmission
+ */
+ public void setActualGear(PRNDL actualGear){
+ setValue(KEY_ACTUAL_GEAR, actualGear);
+ }
+
+ /**
+ * Gets the actualGear.
+ *
+ * @return PRNDL Actual Gear in use by the transmission
+ */
+ @SuppressWarnings("unchecked")
+ public PRNDL getActualGear(){
+ return (PRNDL)getObject(PRNDL.class, KEY_ACTUAL_GEAR);
+ }
+
+ /**
+ * Sets the transmissionType.
+ *
+ * @param transmissionType Tells the transmission type
+ */
+ public void setTransmissionType(TransmissionType transmissionType){
+ setValue(KEY_TRANSMISSION_TYPE, transmissionType);
+ }
+
+ /**
+ * Gets the transmissionType.
+ *
+ * @return TransmissionType Tells the transmission type
+ */
+ public TransmissionType getTransmissionType(){
+ return (TransmissionType)getObject(TransmissionType.class, KEY_TRANSMISSION_TYPE);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
index 023abc3c5..e7c54c02b 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetDTCsResponse.java
@@ -62,21 +62,6 @@ public class GetDTCsResponse extends RPCResponse{
* Constructs a new GetDTCsResponse object
* @param success whether the request is successfully processed
* @param resultCode whether the request is successfully processed
- * @param ecuHeader representation of the ecu header that was returned from the GetDTC request
- * @deprecated use {@link GetDTCsResponse#GetDTCsResponse(Boolean, Result)}
- */
- @Deprecated
- public GetDTCsResponse(@NonNull Boolean success, @NonNull Result resultCode, @NonNull Integer ecuHeader) {
- this();
- setSuccess(success);
- setResultCode(resultCode);
- setEcuHeader(ecuHeader);
- }
-
- /**
- * Constructs a new GetDTCsResponse object
- * @param success whether the request is successfully processed
- * @param resultCode whether the request is successfully processed
*/
public GetDTCsResponse(@NonNull Boolean success, @NonNull Result resultCode) {
this();
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java
index c504c5d24..ccf1e7913 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetInteriorVehicleDataResponse.java
@@ -64,21 +64,6 @@ public class GetInteriorVehicleDataResponse extends RPCResponse {
/**
* Constructs a new GetInteriorVehicleDataResponse object
- * @param moduleData specific data for the module that was requested
- * @param resultCode whether the request is successfully processed
- * @param success whether the request is successfully processed
- * @deprecated use {@link GetInteriorVehicleDataResponse#GetInteriorVehicleDataResponse(Result, Boolean)}
- */
- @Deprecated
- public GetInteriorVehicleDataResponse(@NonNull ModuleData moduleData, @NonNull Result resultCode, @NonNull Boolean success) {
- this();
- setModuleData(moduleData);
- setResultCode(resultCode);
- setSuccess(success);
- }
-
- /**
- * Constructs a new GetInteriorVehicleDataResponse object
* @param resultCode whether the request is successfully processed
* @param success whether the request is successfully processed
*/
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetSystemCapabilityResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetSystemCapabilityResponse.java
index ebaf547b8..29803499e 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetSystemCapabilityResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetSystemCapabilityResponse.java
@@ -66,21 +66,6 @@ public class GetSystemCapabilityResponse extends RPCResponse {
/**
* Constructs a new GetSystemCapabilityResponse object
- * @param systemCapability SystemCapability object
- * @param resultCode whether the request is successfully processed
- * @param success whether the request is successfully processed
- * @deprecated use {@link GetSystemCapabilityResponse#GetSystemCapabilityResponse(Result, Boolean)}
- */
- @Deprecated
- public GetSystemCapabilityResponse(@NonNull SystemCapability systemCapability, @NonNull Result resultCode, @NonNull Boolean success) {
- this();
- setSystemCapability(systemCapability);
- setResultCode(resultCode);
- setSuccess(success);
- }
-
- /**
- * Constructs a new GetSystemCapabilityResponse object
* @param resultCode whether the request is successfully processed
* @param success whether the request is successfully processed
*/
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java
index ea3fc3496..4699de61f 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleData.java
@@ -114,13 +114,20 @@ import java.util.Hashtable;
* <td>SmartDeviceLink 2.0</td>
* </tr>
* <tr>
- * <td>prndl</td>
- * <td>Boolean</td>
- * <td>Currently selected gear.</td>
- * <td>N</td>
- * <td>Subscribable</td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
+ * <tr>
+ * <td>gearStatus</td>
+ * <td>Boolean</td>
+ * <td>See GearStatus</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>Boolean</td>
+ * <td>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
* <tr>
* <td>tirePressure</td>
* <td>Boolean</td>
@@ -303,6 +310,7 @@ public class GetVehicleData extends RPCRequest {
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
public static final String KEY_WINDOW_STATUS = "windowStatus";
public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
+ public static final String KEY_GEAR_STATUS = "gearStatus";
/**
* Constructs a new GetVehicleData object
@@ -348,14 +356,6 @@ public class GetVehicleData extends RPCRequest {
public Boolean getFuelLevel() {
return getBoolean(KEY_FUEL_LEVEL);
}
- @Deprecated
- public void setFuelLevel_State(Boolean fuelLevel_State) {
- setFuelLevelState(fuelLevel_State);
- }
- @Deprecated
- public Boolean getFuelLevel_State() {
- return getFuelLevelState();
- }
public void setFuelLevelState(Boolean fuelLevelState) {
setParameters(KEY_FUEL_LEVEL_STATE, fuelLevelState);
}
@@ -382,9 +382,24 @@ public class GetVehicleData extends RPCRequest {
return getBoolean(KEY_VIN);
}
+ /**
+ * Sets the prndl.
+ *
+ * @param prndl See PRNDL.
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public void setPrndl(Boolean prndl) {
setParameters(KEY_PRNDL, prndl);
}
+
+ /**
+ * Gets the prndl.
+ *
+ * @return Boolean See PRNDL.
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public Boolean getPrndl() {
return getBoolean(KEY_PRNDL);
}
@@ -613,4 +628,24 @@ public class GetVehicleData extends RPCRequest {
public Boolean getHandsOffSteering() {
return getBoolean(KEY_HANDS_OFF_STEERING);
}
+
+ /**
+ * Sets the gearStatus.
+ *
+ * @param gearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setGearStatus(Boolean gearStatus) {
+ setParameters(KEY_GEAR_STATUS, gearStatus);
+ }
+
+ /**
+ * Gets the gearStatus.
+ *
+ * @return GearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public Boolean getGearStatus() {
+ return getBoolean(KEY_GEAR_STATUS);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
index a70082cd6..1226baa45 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/GetVehicleDataResponse.java
@@ -85,6 +85,7 @@ public class GetVehicleDataResponse extends RPCResponse {
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
public static final String KEY_WINDOW_STATUS = "windowStatus";
+ public static final String KEY_GEAR_STATUS = "gearStatus";
public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
/**
@@ -134,14 +135,6 @@ public class GetVehicleDataResponse extends RPCResponse {
Object object = getParameters(KEY_FUEL_LEVEL);
return SdlDataTypeConverter.objectToDouble(object);
}
- @Deprecated
- public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
- setFuelLevelState(fuelLevel_State);
- }
- @Deprecated
- public ComponentVolumeStatus getFuelLevel_State() {
- return getFuelLevelState();
- }
public void setFuelLevelState(ComponentVolumeStatus fuelLevelState) {
setParameters(KEY_FUEL_LEVEL_STATE, fuelLevelState);
}
@@ -168,9 +161,25 @@ public class GetVehicleDataResponse extends RPCResponse {
public String getVin() {
return getString(KEY_VIN);
}
+
+ /**
+ * Sets the prndl.
+ *
+ * @param prndl See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public void setPrndl(PRNDL prndl) {
setParameters(KEY_PRNDL, prndl);
}
+
+ /**
+ * Gets the prndl.
+ *
+ * @return PRNDL See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public PRNDL getPrndl() {
return (PRNDL) getObject(PRNDL.class, KEY_PRNDL);
}
@@ -433,4 +442,24 @@ public class GetVehicleDataResponse extends RPCResponse {
public Boolean getHandsOffSteering() {
return getBoolean(KEY_HANDS_OFF_STEERING);
}
+
+ /**
+ * Sets the gearStatus.
+ *
+ * @param gearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setGearStatus(GearStatus gearStatus) {
+ setParameters(KEY_GEAR_STATUS, gearStatus);
+ }
+
+ /**
+ * Gets the gearStatus.
+ *
+ * @return GearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public GearStatus getGearStatus() {
+ return (GearStatus) getObject(GearStatus.class, KEY_GEAR_STATUS);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
index cad593aba..e69e0a900 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/ListFilesResponse.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
@@ -62,21 +62,6 @@ public class ListFilesResponse extends RPCResponse {
}
/**
- * @deprecated use {@link ListFilesResponse#ListFilesResponse(Boolean, Result)} instead <br>
- *
- * Constructs a new ListFilesResponse object
- * @param success whether the request is successfully processed
- * @param resultCode whether the request is successfully processed
- */
- @Deprecated
- public ListFilesResponse(@NonNull Boolean success, @NonNull Result resultCode, @NonNull Integer spaceAvailable) {
- this();
- setSuccess(success);
- setResultCode(resultCode);
- setSpaceAvailable(spaceAvailable);
- }
-
- /**
* Constructs a new ListFilesResponse object
* @param success whether the request is successfully processed
* @param resultCode whether the request is successfully processed
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java
index f66ca4000..8c0003db8 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnButtonPress.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
@@ -180,22 +180,6 @@ public class OnButtonPress extends RPCNotification {
setParameters(KEY_BUTTON_PRESS_MODE, buttonPressMode);
}
- @Deprecated
- /**
- * @deprecated use {@link #setCustomButtonID(Integer)} ()} instead.
- */
- public void setCustomButtonName(Integer customButtonID) {
- setParameters(KEY_CUSTOM_BUTTON_ID, customButtonID);
- }
-
- @Deprecated
- /**
- * @deprecated use {@link #getCustomButtonID()} ()} instead.
- */
- public Integer getCustomButtonName() {
- return getInteger(KEY_CUSTOM_BUTTON_ID);
- }
-
/**
* Set CustomButtonID of the button
* If ButtonName is "CUSTOM_BUTTON", this references the integer ID passed by a custom button. (e.g. softButton ID)
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java
deleted file mode 100644
index dd8c75a01..000000000
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnLockScreenStatus.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package com.smartdevicelink.proxy.rpc;
-
-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 static com.smartdevicelink.proxy.rpc.OnHMIStatus.KEY_HMI_LEVEL;
-
-/**
- * The lockscreen must perform the following:
- * Limit all application control usability from the mobile device with a full-screen static image overlay or separate view.
- * For simplicity, the OnLockScreenStatus RPC will be provided via the onOnLockScreenNotification call back. The call back will include the LockScreenStatus enum which indicates if the lockscreen is required, optional or not required.
- * The call back also includes details regarding the current HMI_Status level, driver distraction status and user selection status of the application.
- *
- *
- */
-@Deprecated
-public class OnLockScreenStatus extends RPCNotification {
- public static final String KEY_DRIVER_DISTRACTION = "driverDistraction";
- public static final String KEY_SHOW_LOCK_SCREEN = "showLockScreen";
- public static final String KEY_USER_SELECTED = "userSelected";
-
- public OnLockScreenStatus() {
- super(FunctionID.ON_LOCK_SCREEN_STATUS.toString());
- }
- /**
- * <p>Get the current driver distraction status(i.e. whether driver distraction rules are in effect, or not)</p>
- * @return Boolean
- */
-
- public Boolean getDriverDistractionStatus() {
- return getBoolean(KEY_DRIVER_DISTRACTION);
- }
-
- public void setDriverDistractionStatus(Boolean driverDistractionStatus) {
- setParameters(KEY_DRIVER_DISTRACTION, driverDistractionStatus);
- }
- /**
- * <p>Get the {@linkplain LockScreenStatus} enumeration, indicating if the lockscreen should be required, optional or off </p>
- * @return {@linkplain LockScreenStatus}
- */
-
- public LockScreenStatus getShowLockScreen() {
- return (LockScreenStatus) getParameters(KEY_SHOW_LOCK_SCREEN);
- }
-
- public void setShowLockScreen(LockScreenStatus showLockScreen) {
- setParameters(KEY_SHOW_LOCK_SCREEN, showLockScreen);
- }
- /**
- * <p>Get user selection status for the application (has the app been selected via hmi or voice command)</p>
- * @return Boolean the current user selection status
- */
-
- public Boolean getUserSelected() {
- return getBoolean(KEY_USER_SELECTED);
- }
-
- public void setUserSelected(Boolean userSelected) {
- setParameters(KEY_USER_SELECTED, userSelected);
- }
- /**
- * <p>Get HMILevel in effect for the application</p>
- * @return {@linkplain HMILevel} the current HMI Level in effect for the application
- */
-
- public HMILevel getHMILevel() {
- return (HMILevel) getParameters(KEY_HMI_LEVEL);
- }
-
- public void setHMILevel(HMILevel setHMILevel) {
- setParameters(KEY_HMI_LEVEL, setHMILevel);
- }
-}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java
deleted file mode 100644
index 8ad750815..000000000
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSdlChoiceChosen.java
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package com.smartdevicelink.proxy.rpc;
-
-import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.proxy.RPCNotification;
-import com.smartdevicelink.proxy.rpc.enums.TriggerSource;
-
-import java.util.Hashtable;
-import java.util.List;
-
-@Deprecated
-public class OnSdlChoiceChosen extends RPCNotification {
- public static final String KEY_SDL_CHOICE = "sdlChoice";
- public static final String KEY_TRIGGER_SOURCE = "triggerSource";
-
- public class SdlSubMenu {
- private Integer _menuID = null;
- @SuppressWarnings("unused")
- private Integer _position = null;
- private String _menuName = null;
-
- // Constructor
- SdlSubMenu(Integer menuID, Integer position, String menuName) {
- _menuID = menuID;
- _position = position;
- _menuName = menuName;
- }
-
- // Restrict no-arg constructor
- @SuppressWarnings("unused")
- private SdlSubMenu() {}
-
- // Public Getters
- public Integer getMenuID() {
- return _menuID;
- }
-
- public String getMenuName() {
- return _menuName;
- }
-
- public String toString() {
- return _menuName;
- }
- }
-
- public class SdlCommand {
- private Integer _commandID = null;
- private SdlSubMenu _parentSubMenu = null;
- @SuppressWarnings("unused")
- private Integer _position = null;
- private String _menuName = null;
- private List<String> _vrCommands = null;
-
- // Constructor
- SdlCommand(Integer commandID, SdlSubMenu parentSubMenu, Integer position, String menuName, List<String> vrCommands) {
- _commandID = commandID;
- _parentSubMenu = parentSubMenu;
- _position = position;
- _menuName = menuName;
- _vrCommands = vrCommands;
- }
-
- // Restrict no-arg constructor
- @SuppressWarnings("unused")
- private SdlCommand() {}
-
- // Public Getters
- public Integer getCommandID() {
- return _commandID;
- }
-
- public SdlSubMenu getParentSubMenu() {
- return _parentSubMenu;
- }
-
- public String getMenuName() {
- return _menuName;
- }
-
- public List<String> getVrCommands() {
- return _vrCommands;
- }
-
- public String toString() {
- return _menuName;
- }
- }
-
- public class SdlChoice {
-
- private Choice _choice = null;
-
- // Constructor
- public SdlChoice(Choice choice) {
- _choice = choice;
- }
-
- public Choice getChoice() {
- return _choice;
- }
-
- public Integer getChoiceID() {
- return _choice.getChoiceID();
- }
-
- public String getMenuName() {
- return _choice.getMenuName();
- }
-
- public List<String> getVrCommands() {
- return _choice.getVrCommands();
- }
-
- public String toString() {
- return _choice.getMenuName();
- }
- }
-
- public class SdlChoiceSet {
- private Integer _choiceSetID = null;
- private List<SdlChoice> _choiceSet = null;
-
- // Constructor
- SdlChoiceSet(Integer choiceSetID, List<SdlChoice> choiceSet) {
- _choiceSetID = choiceSetID;
- _choiceSet = choiceSet;
- }
-
- public Integer getChoiceSetID() {
- return _choiceSetID;
- }
-
- public List<SdlChoice> getChoiceSet() {
- return _choiceSet;
- }
- }
-
-
-
-
- public OnSdlChoiceChosen() {
- super(FunctionID.ON_SDL_CHOICE_CHOSEN.toString());
- }
- public OnSdlChoiceChosen(Hashtable<String, Object> hash){
- super(hash);
- }
- public SdlChoice getSdlChoice() {
- return (SdlChoice) getParameters(KEY_SDL_CHOICE);
- }
- public void setSdlChoice(SdlChoice sdlChoice) {
- setParameters(KEY_SDL_CHOICE, sdlChoice);
- }
- public TriggerSource getTriggerSource() {
- return (TriggerSource) getObject(TriggerSource.class, KEY_TRIGGER_SOURCE);
- }
- public void setTriggerSource( TriggerSource triggerSource ) {
- setParameters(KEY_TRIGGER_SOURCE, triggerSource);
- }
-}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java
deleted file mode 100644
index 6c866e09a..000000000
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnStreamRPC.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package com.smartdevicelink.proxy.rpc;
-
-import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.proxy.RPCNotification;
-
-@Deprecated
-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) {
- setParameters(KEY_FILENAME, fileName);
- }
- public String getFileName() {
- return getString(KEY_FILENAME);
- }
-
- public void setBytesComplete(Long bytesComplete) {
- setParameters(KEY_BYTESCOMPLETE, bytesComplete);
- }
- public Long getBytesComplete() {
- return getLong(KEY_BYTESCOMPLETE);
- }
-
- public void setFileSize(Long fileSize) {
- setParameters(KEY_FILESIZE, fileSize);
- }
- public Long getFileSize() {
- return getLong(KEY_FILESIZE);
- }
-} \ No newline at end of file
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSubtleAlertPressed.java
index 3a39ac687..6715cd0c6 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/StreamRPCResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSubtleAlertPressed.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * Copyright (c) 2020 Livio, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -13,9 +13,9 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
+ * Neither the name of the Livio Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -32,34 +32,31 @@
package com.smartdevicelink.proxy.rpc;
import com.smartdevicelink.protocol.enums.FunctionID;
-import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.proxy.RPCNotification;
import java.util.Hashtable;
-@Deprecated
-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());
+/**
+ * Sent when the alert itself is touched (outside of a soft button). Touching (or otherwise
+ * selecting) the alert should open the app before sending this notification.
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+public class OnSubtleAlertPressed extends RPCNotification {
+
+ /**
+ * Constructs a new OnSubtleAlertPressed object
+ */
+ public OnSubtleAlertPressed() {
+ super(FunctionID.ON_SUBTLE_ALERT_PRESSED.toString());
}
- public StreamRPCResponse(Hashtable<String, Object> hash) {
+
+ /**
+ * Constructs a new OnSubtleAlertPressed object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public OnSubtleAlertPressed(Hashtable<String, Object> hash) {
super(hash);
}
-
- public void setFileName(String fileName) {
- setParameters(KEY_FILENAME, fileName);
- }
- public String getFileName() {
- return getString(KEY_FILENAME);
- }
-
- public void setFileSize(Long fileSize) {
- setParameters(KEY_FILESIZE, fileSize);
- }
- public Long getFileSize() {
- return getLong(KEY_FILESIZE);
- }
-
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
index 66f047384..5de6c922b 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnSystemRequest.java
@@ -206,9 +206,9 @@ public class OnSystemRequest extends RPCNotification {
String result = null;
try{
- result = httpJson.getString("body");
+ result = httpJson.getString(KEY_BODY);
}catch(JSONException e){
- DebugTool.logError(TAG, "\"body\" key doesn't exist in bulk data.");
+ DebugTool.logError(TAG, KEY_BODY + " key doesn't exist in bulk data.");
e.printStackTrace();
}
@@ -219,27 +219,17 @@ public class OnSystemRequest extends RPCNotification {
Headers result = null;
try{
- JSONObject httpHeadersJson = httpJson.getJSONObject("headers");
+ JSONObject httpHeadersJson = httpJson.getJSONObject(KEY_HEADERS);
Hashtable<String, Object> httpHeadersHash = JsonRPCMarshaller.deserializeJSONObject(httpHeadersJson);
result = new Headers(httpHeadersHash);
}catch(JSONException e){
- DebugTool.logError(TAG, "\"headers\" key doesn't exist in bulk data.");
+ DebugTool.logError(TAG, KEY_HEADERS + " key doesn't exist in bulk data.");
e.printStackTrace();
}
return result;
}
- @Deprecated
- public void setBinData(byte[] aptData) {
- setBulkData(aptData);
- }
-
- @Deprecated
- public byte[] getBinData() {
- return getBulkData();
- }
-
@Override
public void setBulkData(byte[] bulkData){
super.setBulkData(bulkData);
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateFile.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateFile.java
new file mode 100644
index 000000000..2f1c63cf8
--- /dev/null
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateFile.java
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2017 - 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.proxy.rpc;
+
+import androidx.annotation.NonNull;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+
+import java.util.Hashtable;
+
+/**
+ * This notification tells an app to upload and update a file with a given name.
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Required</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>fileName</td>
+ * <td>String</td>
+ * <td>File reference name.</td>
+ * <td>Y</td>
+ * <td></td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+public class OnUpdateFile extends RPCNotification {
+ public static final String KEY_FILE_NAME = "fileName";
+
+ /**
+ * Constructs a new OnUpdateFile object
+ */
+ public OnUpdateFile() {
+ super(FunctionID.ON_UPDATE_FILE.toString());
+ }
+
+ /**
+ * Constructs a new OnUpdateFile object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public OnUpdateFile(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a new OnUpdateFile object
+ *
+ * @param fileName File reference name.
+ */
+ public OnUpdateFile(@NonNull String fileName) {
+ this();
+ setFileName(fileName);
+ }
+
+ /**
+ * Sets the fileName.
+ *
+ * @param fileName File reference name.
+ */
+ public void setFileName(@NonNull String fileName) {
+ setParameters(KEY_FILE_NAME, fileName);
+ }
+
+ /**
+ * Gets the fileName.
+ *
+ * @return String File reference name.
+ */
+ public String getFileName() {
+ return getString(KEY_FILE_NAME);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateSubMenu.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateSubMenu.java
new file mode 100644
index 000000000..e6fb05829
--- /dev/null
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnUpdateSubMenu.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2017 - 2020, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.proxy.rpc;
+
+import androidx.annotation.NonNull;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCNotification;
+
+import java.util.Hashtable;
+
+/**
+ * This notification tells an app to update the AddSubMenu or its 'sub' AddCommand and
+ * AddSubMenus with the requested data
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Required</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>menuID</td>
+ * <td>Integer</td>
+ * <td>This menuID must match a menuID in the current menu structure</td>
+ * <td>Y</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>updateSubCells</td>
+ * <td>Boolean</td>
+ * <td>If not set, assume false. If true, the app should send AddCommands with parentIDs matchingthe menuID. These AddCommands will then be attached to the submenu and displayed if thesubmenu is selected.</td>
+ * <td>N</td>
+ * <td></td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+public class OnUpdateSubMenu extends RPCNotification {
+ public static final String KEY_MENU_ID = "menuID";
+ public static final String KEY_UPDATE_SUB_CELLS = "updateSubCells";
+
+ /**
+ * Constructs a new OnUpdateSubMenu object
+ */
+ public OnUpdateSubMenu() {
+ super(FunctionID.ON_UPDATE_SUB_MENU.toString());
+ }
+
+ /**
+ * Constructs a new OnUpdateSubMenu object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public OnUpdateSubMenu(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a new OnUpdateSubMenu object
+ *
+ * @param menuID This menuID must match a menuID in the current menu structure
+ */
+ public OnUpdateSubMenu(@NonNull Integer menuID) {
+ this();
+ setMenuID(menuID);
+ }
+
+ /**
+ * Sets the menuID.
+ *
+ * @param menuID This menuID must match a menuID in the current menu structure
+ */
+ public void setMenuID(@NonNull Integer menuID) {
+ setParameters(KEY_MENU_ID, menuID);
+ }
+
+ /**
+ * Gets the menuID.
+ *
+ * @return Integer This menuID must match a menuID in the current menu structure
+ */
+ public Integer getMenuID() {
+ return getInteger(KEY_MENU_ID);
+ }
+
+ /**
+ * Sets the updateSubCells.
+ *
+ * @param updateSubCells If not set, assume false. If true, the app should send AddCommands with parentIDs matching
+ * the menuID. These AddCommands will then be attached to the submenu and displayed if the
+ * submenu is selected.
+ */
+ public void setUpdateSubCells(Boolean updateSubCells) {
+ setParameters(KEY_UPDATE_SUB_CELLS, updateSubCells);
+ }
+
+ /**
+ * Gets the updateSubCells.
+ *
+ * @return Boolean If not set, assume false. If true, the app should send AddCommands with parentIDs matching
+ * the menuID. These AddCommands will then be attached to the submenu and displayed if the
+ * submenu is selected.
+ */
+ public Boolean getUpdateSubCells() {
+ return getBoolean(KEY_UPDATE_SUB_CELLS);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java
index e3ab2f2ff..74fcda171 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/OnVehicleData.java
@@ -131,14 +131,27 @@ import java.util.List;
* <td>Subscribable </td>
* <td>SmartDeviceLink 2.0</td>
* </tr>
- * <tr>
- * <td>prndl</td>
- * <td>PRNDL</td>
- * <td>Currently selected gear.</td>
- * <td>N</td>
- * <td>Subscribable </td>
- * <td>SmartDeviceLink 2.0</td>
- * </tr>
+ * <tr>
+ * <td>gearStatus</td>
+ * <td>GearStatus</td>
+ * <td>See GearStatus</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
+ * <tr>
+ * <td>gearStatus</td>
+ * <td>GearStatus</td>
+ * <td>See GearStatus</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>PRNDL</td>
+ * <td>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
* <tr>
* <td>tirePressure</td>
* <td>TireStatus</td>
@@ -340,6 +353,7 @@ public class OnVehicleData extends RPCNotification {
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
public static final String KEY_WINDOW_STATUS = "windowStatus";
+ public static final String KEY_GEAR_STATUS = "gearStatus";
public OnVehicleData() {
@@ -375,14 +389,6 @@ public class OnVehicleData extends RPCNotification {
Object object = getParameters(KEY_FUEL_LEVEL);
return SdlDataTypeConverter.objectToDouble(object);
}
- @Deprecated
- public void setFuelLevel_State(ComponentVolumeStatus fuelLevel_State) {
- setFuelLevelState(fuelLevel_State);
- }
- @Deprecated
- public ComponentVolumeStatus getFuelLevel_State() {
- return getFuelLevelState();
- }
public void setFuelLevelState(ComponentVolumeStatus fuelLevelState) {
setParameters(KEY_FUEL_LEVEL_STATE, fuelLevelState);
}
@@ -409,12 +415,34 @@ public class OnVehicleData extends RPCNotification {
public String getVin() {
return getString(KEY_VIN);
}
+
+ /**
+ * Sets the prndl.
+ *
+ * @param prndl See PRNDL. This parameter is deprecated since 7.0.0 and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public void setPrndl(PRNDL prndl) {
setParameters(KEY_PRNDL, prndl);
}
+
+ /**
+ * Gets the prndl.
+ *
+ * @return PRNDL See PRNDL. This parameter since 7.0.0 is deprecated and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public PRNDL getPrndl() {
return (PRNDL) getObject(PRNDL.class, KEY_PRNDL);
}
+
+ /**
+ * Sets the tirePressure.
+ *
+ * @param tirePressure See TireStatus
+ */
public void setTirePressure(TireStatus tirePressure) {
setParameters(KEY_TIRE_PRESSURE, tirePressure);
}
@@ -656,4 +684,23 @@ public class OnVehicleData extends RPCNotification {
public Boolean getHandsOffSteering() {
return getBoolean(KEY_HANDS_OFF_STEERING);
}
+ /**
+ * Sets the gearStatus.
+ *
+ * @param gearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setGearStatus(GearStatus gearStatus) {
+ setParameters(KEY_GEAR_STATUS, gearStatus);
+ }
+
+ /**
+ * Gets the gearStatus.
+ *
+ * @return GearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public GearStatus getGearStatus() {
+ return (GearStatus) getObject(GearStatus.class, KEY_GEAR_STATUS);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java
index 263ed65a1..2d01d9a47 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFile.java
@@ -36,8 +36,6 @@ import androidx.annotation.NonNull;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCRequest;
import com.smartdevicelink.proxy.rpc.enums.FileType;
-import com.smartdevicelink.proxy.rpc.listeners.OnPutFileUpdateListener;
-import com.smartdevicelink.proxy.rpc.listeners.OnRPCResponseListener;
import java.util.Hashtable;
import java.util.zip.CRC32;
@@ -390,19 +388,4 @@ public class PutFile extends RPCRequest {
}
return null;
}
-
- @Override
- public final void setOnRPCResponseListener(OnRPCResponseListener listener) {
- super.setOnRPCResponseListener(listener);
- }
-
- @Deprecated
- public void setOnPutFileUpdateListener(OnPutFileUpdateListener listener) {
- super.setOnRPCResponseListener(listener); //We can use the same method because it get stored as a parent class
- }
-
- @Deprecated
- public OnPutFileUpdateListener getOnPutFileUpdateListener() {
- return (OnPutFileUpdateListener)getOnRPCResponseListener();
- }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java
index f0c047325..e1bf71a43 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/PutFileResponse.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
@@ -68,22 +68,6 @@ public class PutFileResponse extends RPCResponse {
}
/**
- * @deprecated use {@link PutFileResponse#PutFileResponse(Boolean, Result)} <br>
- *
- * Constructs a new PutFileResponse object
- * @param success whether the request is successfully processed
- * @param resultCode whether the request is successfully processed
- * @param spaceAvailable the spaceAvailable on the head unit
- */
- @Deprecated
- public PutFileResponse(@NonNull Boolean success, @NonNull Result resultCode, @NonNull Integer spaceAvailable) {
- this();
- setSuccess(success);
- setResultCode(resultCode);
- setSpaceAvailable(spaceAvailable);
- }
-
- /**
* Constructs a new PutFileResponse object
* @param success whether the request is successfully processed
* @param resultCode whether the request is successfully processed
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java
index 862b13e4b..8ab552526 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlCapabilities.java
@@ -47,7 +47,7 @@ public class RadioControlCapabilities extends RPCStruct{
public static final String KEY_RADIO_FREQUENCY_AVAILABLE= "radioFrequencyAvailable";
public static final String KEY_HD_CHANNEL_AVAILABLE= "hdChannelAvailable";
public static final String KEY_RDS_DATA_AVAILABLE= "rdsDataAvailable";
- public static final String KEY_AVAILABLE_HDS_AVAILABLE= "availableHDsAvailable";
+ @Deprecated public static final String KEY_AVAILABLE_HDS_AVAILABLE= "availableHDsAvailable";
public static final String KEY_STATE_AVAILABLE= "stateAvailable";
public static final String KEY_SIGNAL_STRENGTH_AVAILABLE= "signalStrengthAvailable";
public static final String KEY_SIGNAL_CHANGE_THRESHOLD_AVAILABLE= "signalChangeThresholdAvailable";
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java
index 4de584a9f..86cd9c962 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/RadioControlData.java
@@ -47,7 +47,7 @@ public class RadioControlData extends RPCStruct{
public static final String KEY_FREQUENCY_FRACTION= "frequencyFraction";
public static final String KEY_BAND= "band";
public static final String KEY_RDS_DATA= "rdsData";
- public static final String KEY_AVAILABLE_HDS= "availableHDs";
+ @Deprecated public static final String KEY_AVAILABLE_HDS= "availableHDs";
public static final String KEY_HD_CHANNEL= "hdChannel";
public static final String KEY_SIGNAL_STRENGTH= "signalStrength";
public static final String KEY_SIGNAL_CHANGE_THRESHOLD= "signalChangeThreshold";
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
index a8fc1e105..449056871 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/RegisterAppInterfaceResponse.java
@@ -62,11 +62,11 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
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";
+ @Deprecated public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
+ @Deprecated 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";
+ @Deprecated public static final String KEY_SOFT_BUTTON_CAPABILITIES = "softButtonCapabilities";
+ @Deprecated 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
@@ -407,10 +407,7 @@ public class RegisterAppInterfaceResponse extends RPCResponse {
public void setPcmStreamingCapabilities(AudioPassThruCapabilities pcmStreamingCapabilities) {
setParameters(KEY_PCM_STREAM_CAPABILITIES, pcmStreamingCapabilities);
}
- @Deprecated
- public String getProxyVersionInfo() {
- return null;
- }
+
public void setSupportedDiagModes(List<Integer> supportedDiagModes) {
setParameters(KEY_SUPPORTED_DIAG_MODES, supportedDiagModes);
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java
index 522d68046..81390e64a 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SetInteriorVehicleDataResponse.java
@@ -63,21 +63,6 @@ public class SetInteriorVehicleDataResponse extends RPCResponse {
/**
* Constructs a new SetInteriorVehicleDataResponse object
- * @param moduleData
- * @param success whether the request is successfully processed
- * @param resultCode whether the request is successfully processed
- * @deprecated use {@link SetInteriorVehicleDataResponse#SetInteriorVehicleDataResponse(Result, Boolean)}
- */
- @Deprecated
- public SetInteriorVehicleDataResponse(@NonNull ModuleData moduleData, @NonNull Result resultCode, @NonNull Boolean success) {
- this();
- setModuleData(moduleData);
- setResultCode(resultCode);
- setSuccess(success);
- }
-
- /**
- * Constructs a new SetInteriorVehicleDataResponse object
* @param success whether the request is successfully processed
* @param resultCode whether the request is successfully processed
*/
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/Show.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/Show.java
index f3546dcc8..e663c9f2b 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/Show.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/Show.java
@@ -198,7 +198,7 @@ public class Show extends RPCRequest {
public static final String KEY_MAIN_FIELD_3 = "mainField3";
public static final String KEY_MAIN_FIELD_4 = "mainField4";
public static final String KEY_STATUS_BAR = "statusBar";
- public static final String KEY_MEDIA_CLOCK = "mediaClock";
+ @Deprecated public static final String KEY_MEDIA_CLOCK = "mediaClock";
public static final String KEY_ALIGNMENT = "alignment";
public static final String KEY_MEDIA_TRACK = "mediaTrack";
public static final String KEY_SECONDARY_GRAPHIC = "secondaryGraphic";
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
index 4bdefeba9..9b67c145f 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleData.java
@@ -113,14 +113,20 @@ import java.util.Hashtable;
* <td>Subscribable</td>
* <td>SmartDeviceLink 2.0 </td>
* </tr>
- * <tr>
- * <td>prndl</td>
- * <td>Boolean</td>
- * <td>Currently selected gear.</td>
- * <td>N</td>
- * <td>Subscribable</td>
- * <td>SmartDeviceLink 2.0 </td>
- * </tr>
+ * <tr>
+ * <td>gearStatus</td>
+ * <td>Boolean</td>
+ * <td>See GearStatus</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>Boolean</td>
+ * <td>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
* <tr>
* <td>tirePressure</td>
* <td>Boolean</td>
@@ -338,6 +344,7 @@ public class SubscribeVehicleData extends RPCRequest {
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
public static final String KEY_WINDOW_STATUS = "windowStatus";
+ public static final String KEY_GEAR_STATUS = "gearStatus";
/**
* Constructs a new SubscribeVehicleData object
@@ -440,29 +447,6 @@ public class SubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, subscribes fuelLevel_State data
- *
- * @param fuelLevel_State
- * a boolean value
- */
- @Deprecated
- public void setFuelLevel_State(Boolean fuelLevel_State) {
- setFuelLevelState(fuelLevel_State);
- }
-
- /**
- * Gets a boolean value. If true, means the fuelLevel_State data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the fuelLevel_State data
- * has been subscribed.
- */
- @Deprecated
- public Boolean getFuelLevel_State() {
- return getFuelLevelState();
- }
-
- /**
* Sets a boolean value. If true, subscribes fuelLevelState data
*
* @param fuelLevelState
@@ -525,23 +509,44 @@ public class SubscribeVehicleData extends RPCRequest {
return getBoolean(KEY_EXTERNAL_TEMPERATURE);
}
- /**
- * Sets a boolean value. If true, subscribes Currently selected gear data
- *
- * @param prndl
- * a boolean value
- */
+ /**
+ * Sets the gearStatus.
+ *
+ * @param gearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setGearStatus(Boolean gearStatus) {
+ setParameters(KEY_GEAR_STATUS, gearStatus);
+ }
+
+ /**
+ * Gets the gearStatus.
+ *
+ * @return Boolean See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public Boolean getGearStatus() {
+ return getBoolean(KEY_GEAR_STATUS);
+ }
+
+ /**
+ * Sets the prndl.
+ *
+ * @param prndl See PRNDL. This parameter is deprecated since 7.0.0 and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public void setPrndl(Boolean prndl) {
setParameters(KEY_PRNDL, prndl);
}
- /**
- * Gets a boolean value. If true, means the Currently selected gear data has been
- * subscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Currently selected gear data
- * has been subscribed.
- */
+ /**
+ * Gets the prndl.
+ *
+ * @return Boolean See PRNDL. This parameter is deprecated since 7.0.0 and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public Boolean getPrndl() {
return getBoolean(KEY_PRNDL);
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
index 5a0909cd3..cb869336a 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubscribeVehicleDataResponse.java
@@ -74,6 +74,7 @@ public class SubscribeVehicleDataResponse extends RPCResponse {
public static final String KEY_TURN_SIGNAL = "turnSignal";
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
+ public static final String KEY_GEAR_STATUS = "gearStatus";
public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
public static final String KEY_WINDOW_STATUS = "windowStatus";
@@ -166,22 +167,6 @@ public class SubscribeVehicleDataResponse extends RPCResponse {
}
/**
* Sets Fuel Level State
- * @param fuelLevel_State a VehicleDataResult related to FuelLevel State
- */
- @Deprecated
- public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
- setFuelLevel(fuelLevel_State);
- }
- /**
- * Gets Fuel Level State
- * @return a VehicleDataResult related to FuelLevel State
- */
- @Deprecated
- public VehicleDataResult getFuelLevel_State() {
- return getFuelLevelState();
- }
- /**
- * Sets Fuel Level State
* @param fuelLevelState a VehicleDataResult related to FuelLevel State
*/
public void setFuelLevelState(VehicleDataResult fuelLevelState) {
@@ -226,16 +211,22 @@ public class SubscribeVehicleDataResponse extends RPCResponse {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_EXTERNAL_TEMPERATURE);
}
/**
- * Gets currently selected gear data
- * @param prndl a VehicleDataResult related to the PRNDL status (automatic transmission gear)
+ * Sets the prndl.
+ *
+ * @param prndl See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
*/
+ @Deprecated
public void setPrndl(VehicleDataResult prndl) {
setParameters(KEY_PRNDL, prndl);
}
/**
- * Gets currently selected gear data
- * @return a VehicleDataResult related to the PRNDL status (automatic transmission gear)
+ * Gets the prndl.
+ *
+ * @return VehicleDataResult See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
*/
+ @Deprecated
@SuppressWarnings("unchecked")
public VehicleDataResult getPrndl() {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_PRNDL);
@@ -553,6 +544,26 @@ public class SubscribeVehicleDataResponse extends RPCResponse {
public VehicleDataResult getHandsOffSteering() {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_HANDS_OFF_STEERING);
}
+ /**
+ * Sets the gearStatus.
+ *
+ * @param gearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setGearStatus(VehicleDataResult gearStatus){
+ setParameters(KEY_GEAR_STATUS, gearStatus);
+ }
+
+ /**
+ * Gets the gearStatus.
+ *
+ * @return VehicleDataResult See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getGearStatus(){
+ return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_GEAR_STATUS);
+ }
/**
* Sets the windowStatus.
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlert.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlert.java
new file mode 100644
index 000000000..42752ff8d
--- /dev/null
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlert.java
@@ -0,0 +1,275 @@
+/*
+ * Copyright (c) 2020 Livio, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Livio Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.proxy.rpc;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCRequest;
+
+import java.util.Hashtable;
+import java.util.List;
+
+/**
+ * Shows an alert which typically consists of text-to-speech message and text on the display.
+ * At least either alertText1, alertText2 or ttsChunks need to be provided.
+ *
+ * <p><b>Parameter List</b></p>
+ *
+ * <table border="1" rules="all">
+ * <tr>
+ * <th>Param Name</th>
+ * <th>Type</th>
+ * <th>Description</th>
+ * <th>Required</th>
+ * <th>Notes</th>
+ * <th>Version Available</th>
+ * </tr>
+ * <tr>
+ * <td>alertText1</td>
+ * <td>String</td>
+ * <td>The first line of the alert text field</td>
+ * <td>N</td>
+ * <td>Max Value: 500</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>alertText2</td>
+ * <td>String</td>
+ * <td>The second line of the alert text field</td>
+ * <td>N</td>
+ * <td>Max Value: 500</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>alertIcon</td>
+ * <td>Image</td>
+ * <td>Image to be displayed for the corresponding alert. See Image. If omitted on supported displays, no (or the default if applicable) icon should be displayed.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>ttsChunks</td>
+ * <td>List<TTSChunk></td>
+ * <td>An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least oneitem.</td>
+ * <td>N</td>
+ * <td>Min Value: 1; Max Value: 100</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>duration</td>
+ * <td>Integer</td>
+ * <td>Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to5s.</td>
+ * <td>N</td>
+ * <td>Min Value: 3000; Max Value: 10000; Default Value: 5000</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>softButtons</td>
+ * <td>List<SoftButton></td>
+ * <td>App defined SoftButtons. If omitted on supported displays, the displayed alert shall nothave any SoftButtons.</td>
+ * <td>N</td>
+ * <td>Min Value: 0; Max Value: 2</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>cancelID</td>
+ * <td>Integer</td>
+ * <td>An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.</td>
+ * <td>N</td>
+ * <td></td>
+ * <td></td>
+ * </tr>
+ * </table>
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+public class SubtleAlert extends RPCRequest {
+ public static final String KEY_ALERT_TEXT_1 = "alertText1";
+ public static final String KEY_ALERT_TEXT_2 = "alertText2";
+ public static final String KEY_ALERT_ICON = "alertIcon";
+ public static final String KEY_TTS_CHUNKS = "ttsChunks";
+ public static final String KEY_DURATION = "duration";
+ public static final String KEY_SOFT_BUTTONS = "softButtons";
+ public static final String KEY_CANCEL_ID = "cancelID";
+
+ /**
+ * Constructs a new SubtleAlert object
+ */
+ public SubtleAlert() {
+ super(FunctionID.SUBTLE_ALERT.toString());
+ }
+
+ /**
+ * Constructs a new SubtleAlert object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public SubtleAlert(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Sets the alertText1.
+ *
+ * @param alertText1 The first line of the alert text field
+ */
+ public void setAlertText1(String alertText1) {
+ setParameters(KEY_ALERT_TEXT_1, alertText1);
+ }
+
+ /**
+ * Gets the alertText1.
+ *
+ * @return String The first line of the alert text field
+ */
+ public String getAlertText1() {
+ return getString(KEY_ALERT_TEXT_1);
+ }
+
+ /**
+ * Sets the alertText2.
+ *
+ * @param alertText2 The second line of the alert text field
+ */
+ public void setAlertText2(String alertText2) {
+ setParameters(KEY_ALERT_TEXT_2, alertText2);
+ }
+
+ /**
+ * Gets the alertText2.
+ *
+ * @return String The second line of the alert text field
+ */
+ public String getAlertText2() {
+ return getString(KEY_ALERT_TEXT_2);
+ }
+
+ /**
+ * Sets the alertIcon.
+ *
+ * @param alertIcon Image to be displayed for the corresponding alert. See Image. If omitted on supported
+ * displays, no (or the default if applicable) icon should be displayed.
+ */
+ public void setAlertIcon(Image alertIcon) {
+ setParameters(KEY_ALERT_ICON, alertIcon);
+ }
+
+ /**
+ * Gets the alertIcon.
+ *
+ * @return Image Image to be displayed for the corresponding alert. See Image. If omitted on supported
+ * displays, no (or the default if applicable) icon should be displayed.
+ */
+ public Image getAlertIcon() {
+ return (Image) getObject(Image.class, KEY_ALERT_ICON);
+ }
+
+ /**
+ * Sets the ttsChunks.
+ *
+ * @param ttsChunks An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one
+ * item.
+ */
+ public void setTtsChunks(List<TTSChunk> ttsChunks) {
+ setParameters(KEY_TTS_CHUNKS, ttsChunks);
+ }
+
+ /**
+ * Gets the ttsChunks.
+ *
+ * @return List<TTSChunk> An array of text chunks of type TTSChunk. See TTSChunk. The array must have at least one
+ * item.
+ */
+ @SuppressWarnings("unchecked")
+ public List<TTSChunk> getTtsChunks() {
+ return (List<TTSChunk>) getObject(TTSChunk.class, KEY_TTS_CHUNKS);
+ }
+
+ /**
+ * Sets the duration.
+ *
+ * @param duration Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to
+ * 5s.
+ */
+ public void setDuration(Integer duration) {
+ setParameters(KEY_DURATION, duration);
+ }
+
+ /**
+ * Gets the duration.
+ *
+ * @return Integer Timeout in milliseconds. Typical timeouts are 3-5 seconds. If omitted, timeout is set to
+ * 5s.
+ */
+ public Integer getDuration() {
+ return getInteger(KEY_DURATION);
+ }
+
+ /**
+ * Sets the softButtons.
+ *
+ * @param softButtons App defined SoftButtons. If omitted on supported displays, the displayed alert shall not
+ * have any SoftButtons.
+ */
+ public void setSoftButtons(List<SoftButton> softButtons) {
+ setParameters(KEY_SOFT_BUTTONS, softButtons);
+ }
+
+ /**
+ * Gets the softButtons.
+ *
+ * @return List<SoftButton> App defined SoftButtons. If omitted on supported displays, the displayed alert shall not
+ * have any SoftButtons.
+ */
+ @SuppressWarnings("unchecked")
+ public List<SoftButton> getSoftButtons() {
+ return (List<SoftButton>) getObject(SoftButton.class, KEY_SOFT_BUTTONS);
+ }
+
+ /**
+ * Sets the cancelID.
+ *
+ * @param cancelID An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+ */
+ public void setCancelID(Integer cancelID) {
+ setParameters(KEY_CANCEL_ID, cancelID);
+ }
+
+ /**
+ * Gets the cancelID.
+ *
+ * @return Integer An ID for this specific alert to allow cancellation through the `CancelInteraction` RPC.
+ */
+ public Integer getCancelID() {
+ return getInteger(KEY_CANCEL_ID);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlertResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlertResponse.java
new file mode 100644
index 000000000..a15dbe13b
--- /dev/null
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SubtleAlertResponse.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2020 Livio, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the Livio Inc. nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+package com.smartdevicelink.proxy.rpc;
+
+import androidx.annotation.NonNull;
+
+import com.smartdevicelink.protocol.enums.FunctionID;
+import com.smartdevicelink.proxy.RPCResponse;
+import com.smartdevicelink.proxy.rpc.enums.Result;
+
+import java.util.Hashtable;
+
+/**
+ * @since SmartDeviceLink 7.0.0
+ */
+public class SubtleAlertResponse extends RPCResponse {
+ public static final String KEY_TRY_AGAIN_TIME = "tryAgainTime";
+
+ /**
+ * Constructs a new SubtleAlertResponse object
+ */
+ public SubtleAlertResponse() {
+ super(FunctionID.SUBTLE_ALERT.toString());
+ }
+
+ /**
+ * Constructs a new SubtleAlertResponse object indicated by the Hashtable parameter
+ *
+ * @param hash The Hashtable to use
+ */
+ public SubtleAlertResponse(Hashtable<String, Object> hash) {
+ super(hash);
+ }
+
+ /**
+ * Constructs a new SubtleAlertResponse object
+ *
+ * @param success whether the request is successfully processed
+ * @param resultCode additional information about a response returning a failed outcome
+ */
+ public SubtleAlertResponse(@NonNull Boolean success, @NonNull Result resultCode) {
+ this();
+ setSuccess(success);
+ setResultCode(resultCode);
+ }
+
+ /**
+ * Sets the tryAgainTime.
+ *
+ * @param tryAgainTime Amount of time (in milliseconds) that an app must wait before resending an alert.
+ * If provided, another system event or overlay currently has a higher priority than this alert.
+ * An app must not send an alert without waiting at least the amount of time dictated.
+ */
+ public void setTryAgainTime(Integer tryAgainTime) {
+ setParameters(KEY_TRY_AGAIN_TIME, tryAgainTime);
+ }
+
+ /**
+ * Gets the tryAgainTime.
+ *
+ * @return Integer Amount of time (in milliseconds) that an app must wait before resending an alert.
+ * If provided, another system event or overlay currently has a higher priority than this alert.
+ * An app must not send an alert without waiting at least the amount of time dictated.
+ */
+ public Integer getTryAgainTime() {
+ return getInteger(KEY_TRY_AGAIN_TIME);
+ }
+}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
index 483602b0b..5a998a268 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
@@ -108,14 +108,20 @@ import java.util.Hashtable;
* <td>Subscribable</td>
* <td>SmartDeviceLink 2.0 </td>
* </tr>
- * <tr>
- * <td>prndl</td>
- * <td>Boolean</td>
- * <td>Currently selected gear.</td>
- * <td>N</td>
- * <td>Subscribable</td>
- * <td>SmartDeviceLink 2.0 </td>
- * </tr>
+ * <tr>
+ * <td>gearStatus</td>
+ * <td>Boolean</td>
+ * <td>See GearStatus</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
+ * <tr>
+ * <td>prndl</td>
+ * <td>Boolean</td>
+ * <td>See PRNDL. This parameter is deprecated and it is now covered in `gearStatus`</td>
+ * <td>N</td>
+ * <td>SmartDeviceLink 7.0.0</td>
+ * </tr>
* <tr>
* <td>tirePressure</td>
* <td>Boolean</td>
@@ -322,6 +328,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
public static final String KEY_ELECTRONIC_PARK_BRAKE_STATUS = "electronicParkBrakeStatus";
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
+ public static final String KEY_GEAR_STATUS = "gearStatus";
public static final String KEY_WINDOW_STATUS = "windowStatus";
/**
@@ -425,29 +432,6 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes from fuelLevel_State data
- *
- * @param fuelLevel_State
- * a boolean value
- */
- @Deprecated
- public void setFuelLevel_State(Boolean fuelLevel_State) {
- setFuelLevelState(fuelLevel_State);
- }
-
- /**
- * Gets a boolean value. If true, means the fuelLevel_State data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the fuelLevel_State data
- * has been unsubscribed.
- */
- @Deprecated
- public Boolean getFuelLevel_State() {
- return getFuelLevelState();
- }
-
- /**
* Sets a boolean value. If true, unsubscribes from fuelLevelState data
*
* @param fuelLevelState
@@ -510,23 +494,24 @@ public class UnsubscribeVehicleData extends RPCRequest {
return getBoolean(KEY_EXTERNAL_TEMPERATURE);
}
- /**
- * Sets a boolean value. If true, unsubscribes Currently selected gear data
- *
- * @param prndl
- * a boolean value
- */
+ /**
+ * Sets the prndl.
+ *
+ * @param prndl See PRNDL. This parameter since SmartDeviceLink 7.0.0 is deprecated and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public void setPrndl(Boolean prndl) {
- setParameters(KEY_PRNDL, prndl);
+ setParameters(KEY_PRNDL, prndl);
}
- /**
- * Gets a boolean value. If true, means the Currently selected gear data has been
- * unsubscribed.
- *
- * @return Boolean -a Boolean value. If true, means the Currently selected gear data
- * has been unsubscribed.
- */
+ /**
+ * Gets the prndl.
+ *
+ * @return Boolean See PRNDL. This parameter is deprecated since SmartDeviceLink 7.0.0 and it is now covered in `gearStatus`
+ * @deprecated in SmartDeviceLink 7.0.0
+ */
+ @Deprecated
public Boolean getPrndl() {
return getBoolean(KEY_PRNDL);
}
@@ -885,6 +870,26 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
+ * Sets the gearStatus.
+ *
+ * @param gearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setGearStatus(Boolean gearStatus) {
+ setParameters(KEY_GEAR_STATUS, gearStatus);
+ }
+
+ /**
+ * Gets the gearStatus.
+ *
+ * @return Boolean See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public Boolean getGearStatus() {
+ return getBoolean(KEY_GEAR_STATUS);
+ }
+
+ /**
* Sets the handsOffSteering.
*
* @param handsOffSteering To indicate whether driver hands are off the steering wheel
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
index c8e6d62d3..37b1f0c51 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleDataResponse.java
@@ -76,6 +76,7 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse {
public static final String KEY_CLOUD_APP_VEHICLE_ID = "cloudAppVehicleID";
public static final String KEY_HANDS_OFF_STEERING = "handsOffSteering";
public static final String KEY_WINDOW_STATUS = "windowStatus";
+ public static final String KEY_GEAR_STATUS = "gearStatus";
/**
* Constructs a new UnsubscribeVehicleDataResponse object
@@ -168,22 +169,6 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse {
}
/**
* Sets Fuel Level State
- * @param fuelLevel_State a VehicleDataResult related to FuelLevel State
- */
- @Deprecated
- public void setFuelLevel_State(VehicleDataResult fuelLevel_State) {
- setFuelLevel(fuelLevel_State);
- }
- /**
- * Gets Fuel Level State
- * @return a VehicleDataResult related to FuelLevel State
- */
- @Deprecated
- public VehicleDataResult getFuelLevel_State() {
- return getFuelLevelState();
- }
- /**
- * Sets Fuel Level State
* @param fuelLevelState a VehicleDataResult related to FuelLevel State
*/
public void setFuelLevelState(VehicleDataResult fuelLevelState) {
@@ -228,16 +213,22 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_EXTERNAL_TEMPERATURE);
}
/**
- * Gets currently selected gear data
- * @param prndl a VehicleDataResult related to the PRNDL status (automatic transmission gear)
+ * Sets the prndl.
+ *
+ * @param prndl See PRNDL.
+ * @deprecated in SmartDeviceLink 7.0.0
*/
+ @Deprecated
public void setPrndl(VehicleDataResult prndl) {
setParameters(KEY_PRNDL, prndl);
}
/**
- * Gets currently selected gear data
- * @return a VehicleDataResult related to the PRNDL status (automatic transmission gear)
+ * Gets the prndl.
+ *
+ * @return VehicleDataResult.
+ * @deprecated in SmartDeviceLink 7.0.0
*/
+ @Deprecated
@SuppressWarnings("unchecked")
public VehicleDataResult getPrndl() {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_PRNDL);
@@ -575,4 +566,25 @@ public class UnsubscribeVehicleDataResponse extends RPCResponse {
public VehicleDataResult getWindowStatus() {
return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_WINDOW_STATUS);
}
+
+ /**
+ * Sets the gearStatus.
+ *
+ * @param gearStatus See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setGearStatus(VehicleDataResult gearStatus){
+ setParameters(KEY_GEAR_STATUS, gearStatus);
+ }
+
+ /**
+ * Gets the gearStatus.
+ *
+ * @return VehicleDataResult See GearStatus
+ * @since SmartDeviceLink 7.0.0
+ */
+ @SuppressWarnings("unchecked")
+ public VehicleDataResult getGearStatus(){
+ return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_GEAR_STATUS);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/WindowCapability.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/WindowCapability.java
index 6974c82db..c93cb50ca 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/WindowCapability.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/WindowCapability.java
@@ -20,6 +20,7 @@ public class WindowCapability extends RPCStruct {
public static final String KEY_BUTTON_CAPABILITIES = "buttonCapabilities";
public static final String KEY_SOFT_BUTTON_CAPABILITIES = "softButtonCapabilities";
public static final String KEY_MENU_LAYOUTS_AVAILABLE = "menuLayoutsAvailable";
+ public static final String KEY_DYNAMIC_UPDATE_CAPABILITIES = "dynamicUpdateCapabilities";
public WindowCapability() {
}
@@ -205,4 +206,26 @@ public class WindowCapability extends RPCStruct {
public List<MenuLayout> getMenuLayoutsAvailable() {
return (List<MenuLayout>) getObject(MenuLayout.class, KEY_MENU_LAYOUTS_AVAILABLE);
}
+
+ /**
+ * Sets the dynamicUpdateCapabilities.
+ *
+ * @param dynamicUpdateCapabilities Contains the head unit's capabilities for dynamic updating features declaring if the
+ * module will send dynamic update RPCs.
+ * @since SmartDeviceLink 7.0.0
+ */
+ public void setDynamicUpdateCapabilities(DynamicUpdateCapabilities dynamicUpdateCapabilities) {
+ setValue(KEY_DYNAMIC_UPDATE_CAPABILITIES, dynamicUpdateCapabilities);
+ }
+
+ /**
+ * Gets the dynamicUpdateCapabilities.
+ *
+ * @return DynamicUpdateCapabilities Contains the head unit's capabilities for dynamic updating features declaring if the
+ * module will send dynamic update RPCs.
+ * @since SmartDeviceLink 7.0.0
+ */
+ public DynamicUpdateCapabilities getDynamicUpdateCapabilities() {
+ return (DynamicUpdateCapabilities) getObject(DynamicUpdateCapabilities.class, KEY_DYNAMIC_UPDATE_CAPABILITIES);
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
index 9c7aa2722..cb595fc9d 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/ImageFieldName.java
@@ -109,6 +109,18 @@ public enum ImageFieldName {
* @since SmartDeviceLink 6.0.0
*/
alertIcon,
+ /**
+ * The image of the subtle alert; applies to `SubtleAlert` `alertIcon`
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+ subtleAlertIcon,
+ /**
+ * The image field for AddSubMenu.menuIcon
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+ subMenuIcon
;
/**
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java
index a605ade87..d21c7b62c 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/PRNDL.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc.enums;
/**
@@ -48,6 +48,9 @@ public enum PRNDL {
* No gear
*/
NEUTRAL,
+ /**
+ * Regular Drive mode
+ */
DRIVE,
/**
* Drive Sport mode
@@ -83,6 +86,14 @@ public enum PRNDL {
SIXTH,
SEVENTH,
EIGHTH,
+ /**
+ * @since SmartDeviceLink 7.0.0
+ */
+ NINTH,
+ /**
+ * @since SmartDeviceLink 7.0.0
+ */
+ TENTH,
UNKNOWN,
FAULT;
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
index a8fe4bd38..cf33b73e0 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TextFieldName.java
@@ -186,6 +186,24 @@ public enum TextFieldName {
* @since SmartDeviceLink 6.0
*/
templateTitle,
+ /**
+ * The first line of the subtle alert text field; applies to `SubtleAlert` `alertText1`
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+ subtleAlertText1,
+ /**
+ * The second line of the subtle alert text field; applies to `SubtleAlert` `alertText2`
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+ subtleAlertText2,
+ /**
+ * A text field in the soft button of a subtle alert; applies to `SubtleAlert` `softButtons`
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+ subtleAlertSoftButtonText;
;
/**
* Convert String to TextFieldName
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlConnectionState.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TransmissionType.java
index d7c36b2c5..d7a2ff6fd 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/SdlConnectionState.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/TransmissionType.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * Copyright (c) 2017 - 2020, SmartDeviceLink Consortium, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -13,9 +13,9 @@
* disclaimer in the documentation and/or other materials provided with the
* distribution.
*
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
+ * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
@@ -31,8 +31,55 @@
*/
package com.smartdevicelink.proxy.rpc.enums;
-@Deprecated
-public enum SdlConnectionState {
- SDL_CONNECTED,
- SDL_DISCONNECTED;
+/**
+ * Type of transmission used in the vehicle.
+ *
+ * @since SmartDeviceLink 7.0.0
+ */
+public enum TransmissionType {
+ /**
+ * Manual transmission.
+ */
+ MANUAL,
+ /**
+ * Automatic transmission.
+ */
+ AUTOMATIC,
+ /**
+ * Semi automatic transmission.
+ */
+ SEMI_AUTOMATIC,
+ /**
+ * Dual clutch transmission.
+ */
+ DUAL_CLUTCH,
+ /**
+ * Continuously variable transmission(CVT).
+ */
+ CONTINUOUSLY_VARIABLE,
+ /**
+ * Infinitely variable transmission.
+ */
+ INFINITELY_VARIABLE,
+ /**
+ * Electric variable transmission.
+ */
+ ELECTRIC_VARIABLE,
+ /**
+ * Direct drive between engine and wheels.
+ */
+ DIRECT_DRIVE;
+
+ /**
+ * Convert String to TransmissionType
+ * @param value String
+ * @return TransmissionType
+ */
+ public static TransmissionType valueForString(String value) {
+ try {
+ return valueOf(value);
+ } catch (Exception e) {
+ return null;
+ }
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
index 07d1ace8d..7682e16f8 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VehicleDataType.java
@@ -175,7 +175,11 @@ public enum VehicleDataType {
/**
* @since SmartDeviceLink 7.0.0
*/
- VEHICLEDATA_WINDOWSTATUS;
+ VEHICLEDATA_WINDOWSTATUS,
+ /**
+ * @since SmartDeviceLink 7.0.0
+ */
+ VEHICLEDATA_GEARSTATUS;
/**
* Convert String to VehicleDataType
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java
index 69fc0c8de..13d4add28 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/enums/VrCapabilities.java
@@ -1,34 +1,34 @@
-/*
- * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
+/*
+ * Copyright (c) 2017 - 2019, SmartDeviceLink Consortium, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ *
+ * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following
+ * disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * Neither the name of the SmartDeviceLink Consortium, Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
package com.smartdevicelink.proxy.rpc.enums;
/**
@@ -36,15 +36,6 @@ package com.smartdevicelink.proxy.rpc.enums;
*
*/
public enum VrCapabilities {
- /**
- * The SDL platform is capable of recognizing spoken text in the current
- * language.
- *
- * @since SmartDeviceLink 1.0
- */
- @Deprecated
- Text,
-
/**
* The SDL platform is capable of recognizing spoken text in the current
* language.
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnMultipleRequestListener.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnMultipleRequestListener.java
index 462a73283..9e63827fa 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnMultipleRequestListener.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnMultipleRequestListener.java
@@ -32,7 +32,6 @@
package com.smartdevicelink.proxy.rpc.listeners;
import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.rpc.enums.Result;
import java.util.Vector;
@@ -43,7 +42,6 @@ public abstract class OnMultipleRequestListener extends OnRPCResponseListener {
final Vector<Integer> correlationIds;
OnRPCResponseListener rpcResponseListener;
- private static String TAG = "OnMultipleRequestListener";
public OnMultipleRequestListener(){
setListenerType(UPDATE_LISTENER_TYPE_MULTIPLE_REQUESTS);
@@ -53,17 +51,6 @@ public abstract class OnMultipleRequestListener extends OnRPCResponseListener {
@Override
public void onResponse(int correlationId, RPCResponse response) {
OnMultipleRequestListener.this.onResponse(correlationId, response);
- update(correlationId);
- }
-
- @Override
- public void onError(int correlationId, Result resultCode, String info) {
- super.onError(correlationId, resultCode, info);
- OnMultipleRequestListener.this.onError(correlationId, resultCode, info);
- update(correlationId);
- }
-
- private synchronized void update(int correlationId){
correlationIds.remove(Integer.valueOf(correlationId));
onUpdate(correlationIds.size());
if(correlationIds.size() == 0){
@@ -82,7 +69,6 @@ public abstract class OnMultipleRequestListener extends OnRPCResponseListener {
*/
public abstract void onUpdate(int remainingRequests);
public abstract void onFinished();
- public abstract void onError(int correlationId, Result resultCode, String info);
public OnRPCResponseListener getSingleRpcResponseListener(){
return rpcResponseListener;
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java
deleted file mode 100644
index cac4ec523..000000000
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnPutFileUpdateListener.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2019, Livio, Inc.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this
- * list of conditions and the following disclaimer.
- *
- * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided with the
- * distribution.
- *
- * Neither the name of the Livio Inc. nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- */
-package com.smartdevicelink.proxy.rpc.listeners;
-
-import com.smartdevicelink.proxy.RPCResponse;
-
-@Deprecated
-public abstract class OnPutFileUpdateListener extends OnRPCResponseListener{
-
- long totalSize = 0;
-
- public OnPutFileUpdateListener(){
- setListenerType(UPDATE_LISTENER_TYPE_PUT_FILE);
- }
-
- @Override
- public final void onStart(int correlationId) {
- super.onStart(correlationId);
- onStart(correlationId, totalSize); //We do this so we can send back the total size
- }
-
- public void onStart(int correlationId, long totalSize){
-
- }
-
- @Override
- public final void onResponse(int correlationId, RPCResponse response) {
- onResponse(correlationId, response, totalSize); //Calling our special abstract method
- }
- /**
- * Called when the putfile request is responded to.
- * @param correlationId correlation ID tied to the original response
- * @param response the PutFile response RPC
- * @param totalSize total size of the file sent
- */
- public abstract void onResponse(int correlationId, RPCResponse response, long totalSize);
-
- /**
- * onUpdate is called during a putfile stream request
- * @param correlationId of the original request
- * @param bytesWritten the amount of bytes that have been written so far
- * @param totalSize total size of the file that is being sent
- */
- public void onUpdate(int correlationId, long bytesWritten, long totalSize){
-
- };
-
- public final void setTotalSize(long totalSize){
- this.totalSize = totalSize;
- }
-}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCListener.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCListener.java
index 85a32c02e..87f3968eb 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCListener.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCListener.java
@@ -44,10 +44,7 @@ public abstract class OnRPCListener {
* Generic listener type that will work for most RPCs
*/
public final static int UPDATE_LISTENER_TYPE_BASE_RPC = 0;
- /**
- * Listener type specific to putfile
- */
- public final static int UPDATE_LISTENER_TYPE_PUT_FILE = 1;
+
/**
* Listener type specific to sendRequests and sendSequentialRequests
*/
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java
index 89b082326..e664b05e8 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/listeners/OnRPCResponseListener.java
@@ -33,7 +33,6 @@ package com.smartdevicelink.proxy.rpc.listeners;
import com.smartdevicelink.proxy.RPCMessage;
import com.smartdevicelink.proxy.RPCResponse;
-import com.smartdevicelink.proxy.rpc.enums.Result;
public abstract class OnRPCResponseListener extends OnRPCListener {
@@ -68,22 +67,4 @@ public abstract class OnRPCResponseListener extends OnRPCListener {
* for a PutFile request, the message parameter should be cast to a PutFileResponse class.
*/
public abstract void onResponse(int correlationId, final RPCResponse response);
-
- /**
- * @deprecated This method has been deprecated in favor of just using the onResponse callback. In the next
- * version this method will be removed and all responses successful or not will be returned
- * through the onResponse method callback.
- *
- * Called when there was some sort of error during the original request.
- * @param correlationId
- * @param resultCode
- * @param info
- */
- @Deprecated
- public void onError(int correlationId, Result resultCode, String info){
-
- };
-
-
-
}
diff --git a/generator/README.md b/generator/README.md
index ae3934d18..d87ec0a17 100644
--- a/generator/README.md
+++ b/generator/README.md
@@ -430,7 +430,7 @@ Where `[name]` is the value from the `"name"` attribute of `<struct>`.
### Constructor with all required parameters, based on `"mandatory"` attribute of the `<param>`
This constructor requires the import of `NonNull` annotation
```java
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
```
The constructor should include all set of `<param>` with the `"mandatory"` attribute is "true". JavaDoc should include all constructor parameters and the constructor should call all corresponding setters inside itself.
@@ -590,7 +590,7 @@ Output (javadoc comments skipped):
```java
package com.smartdevicelink.proxy.rpc;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.TemperatureUnit;
@@ -768,7 +768,7 @@ Where `[name]` is the value from the `"name"` attribute of `<function>`.
### Constructor with all required parameters, based on `"mandatory"` attribute of the `<param>`
This constructor requires the import of `NonNull` annotation
```java
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
```
The constructor should include all set of `<param>` with the `"mandatory"` attribute is "true". JavaDoc should include all constructor parameters and the constructor should call all corresponding setters inside itself.
@@ -997,7 +997,7 @@ Output (javadoc comments skipped):
```java
package com.smartdevicelink.proxy.rpc;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCResponse;
@@ -1039,7 +1039,7 @@ Output (javadoc comments skipped):
```java
package com.smartdevicelink.proxy.rpc;
-import android.support.annotation.NonNull;
+import androidx.annotation.NonNull;
import com.smartdevicelink.protocol.enums.FunctionID;
import com.smartdevicelink.proxy.RPCNotification;
diff --git a/generator/templates/base_template.java b/generator/templates/base_template.java
index 0f1d58c95..2cd4f450d 100644
--- a/generator/templates/base_template.java
+++ b/generator/templates/base_template.java
@@ -53,6 +53,7 @@ import {{i}};{{ '\n' if loop.last }}
* <th>Type</th>
* <th>Description</th>
* <th>Required</th>
+ * <th>Notes</th>
* <th>Version Available</th>
* </tr>
{%- for param in params %}
@@ -61,6 +62,7 @@ import {{i}};{{ '\n' if loop.last }}
* <td>{{param.return_type}}</td>
* <td>{%- for d in param.description %}{{d}}{%- endfor %}</td>
* <td>{%- if param.mandatory is eq true %}Y{%- else %}N{%- endif %}</td>
+ * <td>{%- for k in param.values %}{{ '{' if loop.first}}"{{k}}": {{param.values[k]}}{{ ', ' if not loop.last else '}'}}{%- endfor %}</td>
* <td>{%- if param.since is defined %}SmartDeviceLink {{param.since}}{%- endif %}</td>
* </tr>
{%- endfor %}
diff --git a/generator/templates/javadoc_return.java b/generator/templates/javadoc_return.java
index d2f4a3c54..e37a69b87 100644
--- a/generator/templates/javadoc_return.java
+++ b/generator/templates/javadoc_return.java
@@ -8,6 +8,9 @@
{%- else %}
* @return {{p.return_type}}
{%- endif %}
+ {%- if p.values is defined and p.values %}
+ * {%- for k in p.values %}{{ ' {' if loop.first}}"{{k}}": {{p.values[k]}}{{ ', ' if not loop.last else '}'}}{%- endfor %}
+ {%- endif %}
{%- if p.since is defined %}
* @since SmartDeviceLink {{p.since}}
{%- endif %} \ No newline at end of file
diff --git a/generator/templates/javadoc_template.java b/generator/templates/javadoc_template.java
index 5b5d3bc0c..93d4e7740 100644
--- a/generator/templates/javadoc_template.java
+++ b/generator/templates/javadoc_template.java
@@ -8,6 +8,9 @@
{%- else %}
* @param {{p.last}}
{%- endif %}
+ {%- if p.values is defined and p.values %}
+ * {%- for k in p.values %}{{ ' {' if loop.first}}"{{k}}": {{p.values[k]}}{{ ', ' if not loop.last else '}'}}{%- endfor %}
+ {%- endif %}
{%- if p.since is defined %}
* @since SmartDeviceLink {{p.since}}
{%- endif %} \ No newline at end of file
diff --git a/generator/transformers/common_producer.py b/generator/transformers/common_producer.py
index ceb4b3cec..ba8daf18e 100644
--- a/generator/transformers/common_producer.py
+++ b/generator/transformers/common_producer.py
@@ -5,7 +5,7 @@ Common transformation
import logging
import re
from abc import ABC
-from collections import namedtuple
+from collections import namedtuple, OrderedDict
from model.array import Array
from model.enum import Enum
@@ -79,6 +79,44 @@ class InterfaceProducerCommon(ABC):
return re.sub(r'(\s{2,}|\n|\[@TODO.+)', ' ', ''.join(d)).strip() if d else ''
@staticmethod
+ def extract_values(param):
+ p = OrderedDict()
+ if hasattr(param.param_type, 'min_size'):
+ p['array_min_size'] = param.param_type.min_size
+ if hasattr(param.param_type, 'max_size'):
+ p['array_max_size'] = param.param_type.max_size
+ if hasattr(param, 'default_value'):
+ if hasattr(param.default_value, 'name'):
+ p['default_value'] = param.default_value.name
+ else:
+ p['default_value'] = param.default_value
+ elif hasattr(param.param_type, 'default_value'):
+ if hasattr(param.param_type.default_value, 'name'):
+ p['default_value'] = param.param_type.default_value.name
+ else:
+ p['default_value'] = param.param_type.default_value
+ if hasattr(param.param_type, 'min_value'):
+ p['num_min_value'] = param.param_type.min_value
+ elif hasattr(param.param_type, 'element_type') and hasattr(param.param_type.element_type, 'min_value'):
+ p['num_min_value'] = param.param_type.element_type.min_value
+ if hasattr(param.param_type, 'max_value'):
+ p['num_max_value'] = param.param_type.max_value
+ elif hasattr(param.param_type, 'element_type') and hasattr(param.param_type.element_type, 'max_value'):
+ p['num_max_value'] = param.param_type.element_type.max_value
+ if hasattr(param.param_type, 'min_length'):
+ p['string_min_length'] = param.param_type.min_length
+ elif hasattr(param.param_type, 'element_type') and hasattr(param.param_type.element_type, 'min_length'):
+ p['string_min_length'] = param.param_type.element_type.min_length
+ if hasattr(param.param_type, 'max_length'):
+ p['string_max_length'] = param.param_type.max_length
+ elif hasattr(param.param_type, 'element_type') and hasattr(param.param_type.element_type, 'max_length'):
+ p['string_max_length'] = param.param_type.element_type.max_length
+
+ # Filter None values
+ filtered_values = {k: v for k, v in p.items() if v is not None}
+ return filtered_values
+
+ @staticmethod
def replace_sync(name):
"""
:param name: string with item name
diff --git a/generator/transformers/functions_producer.py b/generator/transformers/functions_producer.py
index df8ab2936..c121de557 100644
--- a/generator/transformers/functions_producer.py
+++ b/generator/transformers/functions_producer.py
@@ -46,7 +46,7 @@ class FunctionsProducer(InterfaceProducerCommon):
if not class_name.endswith("Response"):
class_name += 'Response'
imports.add('com.smartdevicelink.proxy.rpc.enums.Result')
- imports.add('android.support.annotation.NonNull')
+ imports.add('androidx.annotation.NonNull')
elif item.message_type.name == 'request':
extends_class = self.request_class
elif item.message_type.name == 'notification':
@@ -87,9 +87,9 @@ class FunctionsProducer(InterfaceProducerCommon):
def sort_imports(self, imports: set):
sorted_imports = []
- if 'android.support.annotation.NonNull' in imports:
- sorted_imports.append('android.support.annotation.NonNull')
- imports.remove('android.support.annotation.NonNull')
+ if 'androidx.annotation.NonNull' in imports:
+ sorted_imports.append('androidx.annotation.NonNull')
+ imports.remove('androidx.annotation.NonNull')
sorted_imports.append('')
sorted_imports.append('com.smartdevicelink.protocol.enums.FunctionID')
imports.remove('com.smartdevicelink.protocol.enums.FunctionID')
@@ -119,6 +119,7 @@ class FunctionsProducer(InterfaceProducerCommon):
p['since'] = param.since
p['deprecated'] = param.deprecated
p['origin'] = param.origin
+ p['values'] = self.extract_values(param)
d = self.extract_description(param.description)
if param.name == 'success':
d = 'whether the request is successfully processed'
@@ -143,7 +144,7 @@ class FunctionsProducer(InterfaceProducerCommon):
if tr in self.struct_names:
imports.add('{}.{}'.format(self.structs_package, tr))
if param.is_mandatory:
- imports.add('android.support.annotation.NonNull')
+ imports.add('androidx.annotation.NonNull')
Params = namedtuple('Params', sorted(p))
return imports, Params(**p)
diff --git a/generator/transformers/structs_producer.py b/generator/transformers/structs_producer.py
index a1af54fe8..400e36800 100644
--- a/generator/transformers/structs_producer.py
+++ b/generator/transformers/structs_producer.py
@@ -76,9 +76,9 @@ class StructsProducer(InterfaceProducerCommon):
def sort_imports(self, imports: set):
sorted_imports = []
- if 'android.support.annotation.NonNull' in imports:
- sorted_imports.append('android.support.annotation.NonNull')
- imports.remove('android.support.annotation.NonNull')
+ if 'androidx.annotation.NonNull' in imports:
+ sorted_imports.append('androidx.annotation.NonNull')
+ imports.remove('androidx.annotation.NonNull')
sorted_imports.append('')
tmp = []
for i in imports:
@@ -105,7 +105,7 @@ class StructsProducer(InterfaceProducerCommon):
p['since'] = param.since
p['deprecated'] = param.deprecated
p['origin'] = param.origin
-
+ p['values'] = self.extract_values(param)
d = self.extract_description(param.description)
if d:
p['description'] = textwrap.wrap(d, 90)
@@ -124,7 +124,7 @@ class StructsProducer(InterfaceProducerCommon):
if tr in self.struct_names:
imports.add('{}.{}'.format(self.structs_package, tr))
if param.is_mandatory:
- imports.add('android.support.annotation.NonNull')
+ imports.add('androidx.annotation.NonNull')
Params = namedtuple('Params', sorted(p))
return imports, Params(**p)
diff --git a/hello_sdl_java/build.gradle b/hello_sdl_java/build.gradle
index b4f834b43..ce0689640 100644
--- a/hello_sdl_java/build.gradle
+++ b/hello_sdl_java/build.gradle
@@ -19,10 +19,8 @@ configurations {
}
dependencies {
extraLibs fileTree(dir: 'libs', include: ['*.jar'])
- //testCompile group: 'junit', name: 'junit', version: '4.12'
extraLibs project(path: ':sdl_java_se')
configurations.implementation.extendsFrom(configurations.extraLibs)
-
}
jar {
from {
diff --git a/javaEE/build.gradle b/javaEE/build.gradle
index a07678dd5..c65af1324 100644
--- a/javaEE/build.gradle
+++ b/javaEE/build.gradle
@@ -27,8 +27,8 @@ configurations {
dependencies {
extraLibs fileTree(dir: 'libs', include: ['*.jar'])
- extraLibs 'org.mongodb:bson:3.10.1'
- extraLibs 'androidx.annotation:annotation:1.0.0'
+ extraLibs 'org.mongodb:bson:4.0.5'
+ extraLibs 'androidx.annotation:annotation:1.1.0'
extraLibs 'org.java-websocket:Java-WebSocket:1.3.9'
extraLibs 'com.livio.taskmaster:taskmaster:0.3.0'
configurations.api.extendsFrom(configurations.extraLibs)
diff --git a/javaSE/build.gradle b/javaSE/build.gradle
index 9e9b5596a..b056fe7a0 100644
--- a/javaSE/build.gradle
+++ b/javaSE/build.gradle
@@ -28,8 +28,8 @@ configurations {
dependencies {
extraLibs fileTree(dir: 'libs', include: ['*.jar'])
- extraLibs 'org.mongodb:bson:3.10.1'
- extraLibs 'androidx.annotation:annotation:1.0.0'
+ extraLibs 'org.mongodb:bson:4.0.5'
+ extraLibs 'androidx.annotation:annotation:1.1.0'
extraLibs 'org.java-websocket:Java-WebSocket:1.3.9'
extraLibs 'com.livio.taskmaster:taskmaster:0.3.0'
configurations.api.extendsFrom(configurations.extraLibs)