summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnil Dahiya <anil_dahiya@infosys.com>2018-08-13 19:28:50 +0530
committerMarkos Rapitis <mrapitis@ford.com>2018-08-13 10:43:26 -0400
commit567a8a64dce4e41b995d57c0273023ff279e261b (patch)
treed968646469d216fbfd0b8d0029cc577a82a3f3f9
parent7fc8ccf6958761b6aabfdf4322a6bd9b9b5fded8 (diff)
downloadsdl_android-567a8a64dce4e41b995d57c0273023ff279e261b.tar.gz
Removing the files for GPSLocation / SRGBColor as their usage is replaced with GPSData / RGBColor.
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java1
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java2
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GPSLocationTests.java74
-rw-r--r--sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SRGBColorTests.java78
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSLocation.java68
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SRGBColor.java97
6 files changed, 0 insertions, 320 deletions
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java
index 35cff9b29..71ab19c9e 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Test.java
@@ -46,7 +46,6 @@ import com.smartdevicelink.proxy.rpc.RadioControlData;
import com.smartdevicelink.proxy.rpc.RdsData;
import com.smartdevicelink.proxy.rpc.Rectangle;
import com.smartdevicelink.proxy.rpc.RemoteControlCapabilities;
-import com.smartdevicelink.proxy.rpc.SRGBColor;
import com.smartdevicelink.proxy.rpc.ScreenParams;
import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
import com.smartdevicelink.proxy.rpc.SeatControlCapabilities;
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
index b504e8d92..7c9c665ca 100644
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
+++ b/sdl_android/src/androidTest/java/com/smartdevicelink/test/Validator.java
@@ -25,7 +25,6 @@ import com.smartdevicelink.proxy.rpc.EmergencyEvent;
import com.smartdevicelink.proxy.rpc.EqualizerSettings;
import com.smartdevicelink.proxy.rpc.FuelRange;
import com.smartdevicelink.proxy.rpc.GPSData;
-import com.smartdevicelink.proxy.rpc.GPSLocation;
import com.smartdevicelink.proxy.rpc.HMICapabilities;
import com.smartdevicelink.proxy.rpc.HMIPermissions;
import com.smartdevicelink.proxy.rpc.HMISettingsControlCapabilities;
@@ -57,7 +56,6 @@ import com.smartdevicelink.proxy.rpc.RadioControlData;
import com.smartdevicelink.proxy.rpc.RdsData;
import com.smartdevicelink.proxy.rpc.Rectangle;
import com.smartdevicelink.proxy.rpc.RemoteControlCapabilities;
-import com.smartdevicelink.proxy.rpc.SRGBColor;
import com.smartdevicelink.proxy.rpc.ScreenParams;
import com.smartdevicelink.proxy.rpc.SdlMsgVersion;
import com.smartdevicelink.proxy.rpc.SeatControlCapabilities;
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GPSLocationTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GPSLocationTests.java
deleted file mode 100644
index 4bc7287ed..000000000
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/GPSLocationTests.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.smartdevicelink.test.rpc.datatypes;
-
-import com.smartdevicelink.proxy.rpc.GPSLocation;
-import com.smartdevicelink.test.JsonUtils;
-import com.smartdevicelink.test.Test;
-
-import junit.framework.TestCase;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.Iterator;
-
-public class GPSLocationTests extends TestCase {
-
- private GPSLocation msg;
-
- @Override
- public void setUp() {
- msg = new GPSLocation();
-
- msg.setLatitudeDegrees(Test.GENERAL_FLOAT);
- msg.setLongitudeDegrees(Test.GENERAL_FLOAT);
- msg.setAltitudeMeters(Test.GENERAL_FLOAT);
- }
-
- /**
- * Tests the expected values of the RPC message.
- */
- public void testRpcValues() {
- // Test Values
- float floatLat = msg.getLatitudeDegrees();
- float floatLong = msg.getLongitudeDegrees();
- float altitudeMeters = msg.getAltitudeMeters();
-
- // Valid Tests
- assertEquals(Test.MATCH, Test.GENERAL_FLOAT, floatLat);
- assertEquals(Test.MATCH, Test.GENERAL_FLOAT, floatLong);
- assertEquals(Test.MATCH, Test.GENERAL_FLOAT, altitudeMeters);
- // Invalid/Null Tests
- GPSLocation msg = new GPSLocation();
- assertNotNull(Test.NOT_NULL, msg);
-
- assertNull(Test.NULL, msg.getLatitudeDegrees());
- assertNull(Test.NULL, msg.getLongitudeDegrees());
- assertNull(Test.NULL, msg.getAltitudeMeters());
- }
-
- public void testJson() {
- JSONObject reference = new JSONObject();
-
- try {
- reference.put(GPSLocation.KEY_LATITUDE_DEGREES, (Float) Test.GENERAL_FLOAT);
- reference.put(GPSLocation.KEY_LONGITUDE_DEGREES, (Float) Test.GENERAL_FLOAT);
- reference.put(GPSLocation.KEY_ALTITUDE_METERS, (Float) Test.GENERAL_FLOAT);
-
- JSONObject underTest = msg.serializeJSON();
-
- assertEquals(Test.MATCH, reference.length(), underTest.length());
-
- Iterator<?> iterator = reference.keys();
- while (iterator.hasNext()) {
- String key = (String) iterator.next();
-
- Object a = JsonUtils.readObjectFromJsonObject(reference, key);
- Object b = JsonUtils.readObjectFromJsonObject(underTest, key);
-
- assertEquals(Test.MATCH, a, b);
- }
- } catch (JSONException e) {
- fail(Test.JSON_FAIL);
- }
- }
-} \ No newline at end of file
diff --git a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SRGBColorTests.java b/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SRGBColorTests.java
deleted file mode 100644
index 5d5c2988e..000000000
--- a/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/SRGBColorTests.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.smartdevicelink.test.rpc.datatypes;
-
-import com.smartdevicelink.proxy.rpc.SRGBColor;
-import com.smartdevicelink.test.JsonUtils;
-import com.smartdevicelink.test.Test;
-
-import junit.framework.TestCase;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import java.util.Iterator;
-
-/**
- * This is a unit test class for the SmartDeviceLink library project class :
- * {@link com.smartdevicelink.rpc.SRGBColor}
- */
-public class SRGBColorTests extends TestCase {
-
- private SRGBColor msg;
-
- @Override
- public void setUp() {
- msg = new SRGBColor();
-
- msg.setRed(Test.GENERAL_INT);
- msg.setGreen(Test.GENERAL_INT);
- msg.setBlue(Test.GENERAL_INT);
- }
-
- /**
- * Tests the expected values of the RPC message.
- */
- public void testRpcValues() {
- // Test Values
-
- int red = msg.getRed();
- int green = msg.getGreen();
- int blue = msg.getBlue();
-
- // Valid Tests
- assertEquals(Test.MATCH, Test.GENERAL_INT, red);
- assertEquals(Test.MATCH, Test.GENERAL_INT, green);
- assertEquals(Test.MATCH, Test.GENERAL_INT, blue);
-
- // Invalid/Null Tests
- SRGBColor msg = new SRGBColor();
- assertNotNull(Test.NOT_NULL, msg);
-
- assertNull(Test.NULL, msg.getRed());
- assertNull(Test.NULL, msg.getGreen());
- assertNull(Test.NULL, msg.getBlue());
- }
-
- public void testJson() {
- JSONObject reference = new JSONObject();
-
- try {
-
- reference.put(SRGBColor.KEY_RED, Test.GENERAL_INT);
- reference.put(SRGBColor.KEY_GREEN, Test.GENERAL_INT);
- reference.put(SRGBColor.KEY_BLUE, Test.GENERAL_INT);
-
- JSONObject underTest = msg.serializeJSON();
- assertEquals(Test.MATCH, reference.length(), underTest.length());
-
- Iterator<?> iterator = reference.keys();
- while (iterator.hasNext()) {
- String key = (String) iterator.next();
-
- assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
-
- }
- } catch (JSONException e) {
- fail(Test.JSON_FAIL);
- }
- }
-} \ No newline at end of file
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSLocation.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSLocation.java
deleted file mode 100644
index 7b7c5bccf..000000000
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/GPSLocation.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import android.support.annotation.NonNull;
-
-import com.smartdevicelink.proxy.RPCStruct;
-import com.smartdevicelink.util.SdlDataTypeConverter;
-
-import java.util.Hashtable;
-
-public class GPSLocation extends RPCStruct {
- public static final String KEY_LATITUDE_DEGREES = "latitudeDegrees";
- public static final String KEY_LONGITUDE_DEGREES = "longitudeDegrees";
- public static final String KEY_ALTITUDE_METERS = "altitudeMeters";
-
- /**
- * Constructs a newly allocated GPSLocation object
- */
- public GPSLocation() {
- }
-
- /**
- * Constructs a newly allocated GPSLocation object indicated by the Hashtable parameter
- *
- * @param hash The Hashtable to use
- */
- public GPSLocation(Hashtable<String, Object> hash) {
- super(hash);
- }
-
- /**
- * Constructs a newly allocated GPSLocation object
- *
- * @param latitudeDegrees
- * @param longitudeDegrees
- */
- public GPSLocation(@NonNull Float latitudeDegrees, @NonNull Float longitudeDegrees) {
- this();
- setLatitudeDegrees(latitudeDegrees);
- setLongitudeDegrees(longitudeDegrees);
- }
-
- public Float getLatitudeDegrees() {
- Object value = getValue(KEY_LATITUDE_DEGREES);
- return SdlDataTypeConverter.objectToFloat(value);
- }
-
- public void setLatitudeDegrees(@NonNull Float latitudeDegrees) {
- setValue(KEY_LATITUDE_DEGREES, latitudeDegrees);
- }
-
- public Float getLongitudeDegrees() {
- Object value = getValue(KEY_LONGITUDE_DEGREES);
- return SdlDataTypeConverter.objectToFloat(value);
- }
-
- public void setLongitudeDegrees(@NonNull Float longitudeDegrees) {
- setValue(KEY_LONGITUDE_DEGREES, longitudeDegrees);
- }
-
- public Float getAltitudeMeters() {
- Object value = getValue(KEY_ALTITUDE_METERS);
- return SdlDataTypeConverter.objectToFloat(value);
- }
-
- public void setAltitudeMeters(Float altitudeMeters) {
- setValue(KEY_ALTITUDE_METERS, altitudeMeters);
- }
-}
diff --git a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SRGBColor.java b/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SRGBColor.java
deleted file mode 100644
index c2a45fac4..000000000
--- a/sdl_android/src/main/java/com/smartdevicelink/proxy/rpc/SRGBColor.java
+++ /dev/null
@@ -1,97 +0,0 @@
-package com.smartdevicelink.proxy.rpc;
-
-import android.support.annotation.NonNull;
-
-import com.smartdevicelink.proxy.RPCStruct;
-
-import java.util.Hashtable;
-
-public class SRGBColor extends RPCStruct {
- public static final String KEY_RED = "red";
- public static final String KEY_GREEN = "green";
- public static final String KEY_BLUE = "blue";
-
- /**
- * Constructs a newly allocated SRGBColor object
- */
- public SRGBColor() {
- }
-
- /**
- * Constructs a newly allocated SRGBColor object indicated by the Hashtable parameter
- *
- * @param hash The Hashtable to use
- */
- public SRGBColor(Hashtable<String, Object> hash) {
- super(hash);
- }
-
- /**
- * Constructs a newly allocated SRGBColor object
- *
- * @param red Min: 0 Max: 255
- * @param green Min: 0 Max: 255
- * @param blue Min: 0 Max: 255
- */
- public SRGBColor(@NonNull Integer red, @NonNull Integer green, @NonNull Integer blue) {
- this();
- setRed(red);
- setGreen(green);
- setBlue(blue);
- }
-
- /**
- * Sets the red portion of the SRGBColor class
- *
- * @param red
- */
- public void setRed(@NonNull Integer red) {
- setValue(KEY_RED, red);
- }
-
- /**
- * Gets the red portion of the SRGBColor class
- *
- * @return Integer
- */
- public Integer getRed() {
- return getInteger(KEY_RED);
- }
-
- /**
- * Sets the green portion of the SRGBColor class
- *
- * @param green
- */
- public void setGreen(@NonNull Integer green) {
- setValue(KEY_GREEN, green);
- }
-
- /**
- * Gets the green portion of the SRGBColor class
- *
- * @return Integer
- */
- public Integer getGreen() {
- return getInteger(KEY_GREEN);
- }
-
- /**
- * Sets the blue portion of the SRGBColor class
- *
- * @param blue
- */
- public void setBlue(@NonNull Integer blue) {
- setValue(KEY_BLUE, blue);
- }
-
- /**
- * Gets the blue portion of the SRGBColor class
- *
- * @return Integer
- */
- public Integer getBlue() {
- return getInteger(KEY_BLUE);
- }
-
-}