summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Grover <joeygrover@gmail.com>2019-04-02 16:05:40 -0400
committerJoey Grover <joeygrover@gmail.com>2019-04-02 16:05:40 -0400
commite7fc7e9384d54225e3a3bb63bdf76eefa1f2520c (patch)
tree719fd714cf5e9e0e22f4a17116d13f34892717ab
parent7be3102e40b280b7cce886e6d2d09ff11dc07375 (diff)
parent531f49012a15f314ed16f1bd83269298e2c79f88 (diff)
downloadsdl_android-feature/update_java_doc_warnings.tar.gz
Merge branch 'release/4.8.0-rc1' of https://github.com/smartdevicelink/sdl_android into feature/update_java_doc_warningsfeature/update_java_doc_warnings
# Conflicts: # base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
-rw-r--r--.travis.yml2
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java10
-rw-r--r--base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java118
3 files changed, 69 insertions, 61 deletions
diff --git a/.travis.yml b/.travis.yml
index f467de76a..6c25dd665 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -46,7 +46,9 @@ before_script:
script:
- android list target
- ./android/gradlew -p ./android :sdl_android:connectedCheck
+ - ./android/gradlew -p ./android :hello_sdl_android:test
- ./javaSE/gradlew -p ./javaSE test
+ - ./hello_sdl_java/gradlew -p ./hello_sdl_java test
- ./javaEE/gradlew -p ./javaEE test
before_install:
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 b8b2bb848..975a452db 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
@@ -53,6 +53,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
msg.setFuelRange(Test.GENERAL_BOOLEAN);
msg.setTurnSignal(Test.GENERAL_BOOLEAN);
msg.setElectronicParkBrakeStatus(Test.GENERAL_BOOLEAN);
+ msg.setCloudAppVehicleID(Test.GENERAL_BOOLEAN);
return msg;
}
@@ -99,7 +100,8 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
result.put(UnsubscribeVehicleData.KEY_MY_KEY, Test.GENERAL_BOOLEAN);
result.put(UnsubscribeVehicleData.KEY_FUEL_RANGE, Test.GENERAL_BOOLEAN);
result.put(UnsubscribeVehicleData.KEY_TURN_SIGNAL, Test.GENERAL_BOOLEAN);
- result.put(UnsubscribeVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS, Test.GENERAL_BOOLEAN);
+ result.put(UnsubscribeVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS, Test.GENERAL_BOOLEAN);
+ result.put(UnsubscribeVehicleData.KEY_CLOUD_APP_VEHICLE_ID, Test.GENERAL_BOOLEAN);
} catch (JSONException e) {
fail(Test.JSON_FAIL);
}
@@ -140,6 +142,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
assertTrue(Test.TRUE,( (UnsubscribeVehicleData) msg ).getFuelRange());
assertTrue(Test.TRUE,( (UnsubscribeVehicleData) msg ).getTurnSignal());
assertTrue(Test.TRUE,( (UnsubscribeVehicleData) msg ).getElectronicParkBrakeStatus());
+ assertTrue(Test.TRUE,( (UnsubscribeVehicleData) msg ).getCloudAppVehicleID());
// Invalid/Null Tests
UnsubscribeVehicleData msg = new UnsubscribeVehicleData();
@@ -173,7 +176,8 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
assertNull(Test.NULL, msg.getMyKey());
assertNull(Test.NULL, msg.getFuelRange());
assertNull(Test.NULL, msg.getTurnSignal());
- assertNull(Test.NULL, msg.getElectronicParkBrakeStatus());
+ assertNull(Test.NULL, msg.getElectronicParkBrakeStatus());
+ assertNull(Test.NULL, msg.getCloudAppVehicleID());
}
/**
@@ -223,6 +227,8 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests {
assertEquals(Test.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_FUEL_RANGE), cmd.getFuelRange());
assertEquals(Test.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_TURN_SIGNAL), cmd.getTurnSignal());
assertEquals(Test.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_ELECTRONIC_PARK_BRAKE_STATUS), cmd.getElectronicParkBrakeStatus());
+ assertEquals(Test.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, UnsubscribeVehicleData.KEY_CLOUD_APP_VEHICLE_ID), cmd.getCloudAppVehicleID());
+
}
catch (JSONException e) {
fail(Test.JSON_FAIL);
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 11b6ed2b9..134ab5976 100644
--- a/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.java
+++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/UnsubscribeVehicleData.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.protocol.enums.FunctionID;
@@ -328,7 +328,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes Gps data
+ * Sets a boolean value. If true, unsubscribes from Gps data
*
* @param gps
* a boolean value
@@ -348,7 +348,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes speed data
+ * Sets a boolean value. If true, unsubscribes from speed data
*
* @param speed
* a boolean value
@@ -388,7 +388,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes FuelLevel data
+ * Sets a boolean value. If true, unsubscribes from FuelLevel data
*
* @param fuelLevel
* a boolean value
@@ -409,7 +409,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes fuelLevel_State data
+ * Sets a boolean value. If true, unsubscribes from fuelLevel_State data
*
* @param fuelLevel_State
* a boolean value
@@ -432,7 +432,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes fuelLevelState data
+ * Sets a boolean value. If true, unsubscribes from fuelLevelState data
*
* @param fuelLevelState
* a boolean value
@@ -453,7 +453,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes instantFuelConsumption data
+ * Sets a boolean value. If true, unsubscribes from instantFuelConsumption data
*
* @param instantFuelConsumption
* a boolean value
@@ -474,7 +474,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes externalTemperature data
+ * Sets a boolean value. If true, unsubscribes from externalTemperature data
*
* @param externalTemperature
* a boolean value
@@ -516,7 +516,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes tire pressure status data
+ * Sets a boolean value. If true, unsubscribes from tire pressure status data
*
* @param tirePressure
* a boolean value
@@ -537,7 +537,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes odometer data
+ * Sets a boolean value. If true, unsubscribes from odometer data
*
* @param odometer
* a boolean value
@@ -558,7 +558,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes belt Status data
+ * Sets a boolean value. If true, unsubscribes from belt Status data
*
* @param beltStatus
* a boolean value
@@ -579,7 +579,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes body Information data
+ * Sets a boolean value. If true, unsubscribes from body Information data
*
* @param bodyInformation
* a boolean value
@@ -600,7 +600,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes device Status data
+ * Sets a boolean value. If true, unsubscribes from device Status data
*
* @param deviceStatus
* a boolean value
@@ -621,7 +621,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes driver Braking data
+ * Sets a boolean value. If true, unsubscribes from driver Braking data
*
* @param driverBraking
* a boolean value
@@ -642,7 +642,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes wiper Status data
+ * Sets a boolean value. If true, unsubscribes from wiper Status data
*
* @param wiperStatus
* a boolean value
@@ -663,7 +663,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes Head Lamp Status data
+ * Sets a boolean value. If true, unsubscribes from Head Lamp Status data
*
* @param headLampStatus
* a boolean value
@@ -684,7 +684,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes Engine Torque data
+ * Sets a boolean value. If true, unsubscribes from Engine Torque data
*
* @param engineTorque
* a boolean value
@@ -705,7 +705,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes Engine Oil Life data
+ * Sets a boolean value. If true, unsubscribes from Engine Oil Life data
*
* @param engineOilLife
* a boolean value
@@ -727,7 +727,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
/**
- * Sets a boolean value. If true, unsubscribes accPedalPosition data
+ * Sets a boolean value. If true, unsubscribes from accPedalPosition data
*
* @param accPedalPosition
* a boolean value
@@ -787,7 +787,7 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, unsubscribes fuelRange data
+ * Sets a boolean value. If true, unsubscribes from fuelRange data
*
* @param fuelRange
* a boolean value
@@ -808,19 +808,19 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets a boolean value. If true, subscribes turnSignal data
+ * Sets a boolean value. If true, unsubscribes from turnSignal data
* @param turnSignal a boolean value
*/
public void setTurnSignal(Boolean turnSignal) { setParameters(KEY_TURN_SIGNAL, turnSignal); }
/**
- * Gets a boolean value. If true, means the turnSignal data has been subscribed.
+ * Gets a boolean value. If true, means the turnSignal data has been unsubscribed.
* @return a Boolean value.
*/
public Boolean getTurnSignal() { return getBoolean(KEY_TURN_SIGNAL); }
/**
- * Sets a boolean value. If true, subscribes electronicParkBrakeStatus data
+ * Sets a boolean value. If true, unsubscribes from electronicParkBrakeStatus data
* @param electronicParkBrakeStatus a boolean value
*/
public void setElectronicParkBrakeStatus(Boolean electronicParkBrakeStatus) {
@@ -836,18 +836,18 @@ public class UnsubscribeVehicleData extends RPCRequest {
}
/**
- * Sets cloudAppVehicleID
- * @param cloudAppVehicleID a boolean value
+ * Sets a boolean value. If true, unsubscribes from cloudAppVehicleID data
+ * @param cloudAppVehicleID a boolean value.
*/
- public void setCloudAppVehicleID(VehicleDataResult cloudAppVehicleID){
+ public void setCloudAppVehicleID(boolean cloudAppVehicleID){
setParameters(KEY_CLOUD_APP_VEHICLE_ID, cloudAppVehicleID);
}
/**
- * Gets a boolean value. If true, means the cloudAppVehicleDataID data should be unsubscribed.
+ * Gets a boolean value. If true, means the cloudAppVehicleID data has been unsubscribed.
* @return a Boolean value.
*/
- public VehicleDataResult getCloudAppVehicleID(){
- return (VehicleDataResult) getObject(VehicleDataResult.class, KEY_CLOUD_APP_VEHICLE_ID);
+ public Boolean getCloudAppVehicleID(){
+ return getBoolean( KEY_CLOUD_APP_VEHICLE_ID);
}
}