aboutsummaryrefslogtreecommitdiff
path: root/tests/vehiclehal_test
diff options
context:
space:
mode:
authorEnrico Granata <egranata@google.com>2017-03-09 12:40:44 -0800
committerEnrico Granata <egranata@google.com>2017-03-09 17:43:56 -0800
commitc36fd7f0259b48830faf6384bb6052dbbaf42646 (patch)
tree0d9a48f6797b951627be5a9f4422100e9c52163b /tests/vehiclehal_test
parent8b1d4ed9d5c8b835ca46622fcd9be17549abfd14 (diff)
downloadCar-c36fd7f0259b48830faf6384bb6052dbbaf42646.tar.gz
The service name for Vehicle HAL 2.1 is now "default", not "Vehicle". Fix so that these test cases will run again
Test: TARGET_USES_CAR_FUTURE_FEATURES=true runtest -x <filename>.java Bug: 36097304 Change-Id: If5f0362084531880d6bd2e02a61fe579a383b147
Diffstat (limited to 'tests/vehiclehal_test')
-rw-r--r--tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2FreezeFrameTest.java11
-rw-r--r--tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2LiveFrameTest.java7
2 files changed, 6 insertions, 12 deletions
diff --git a/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2FreezeFrameTest.java b/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2FreezeFrameTest.java
index 63f00a80b4..19047f2e67 100644
--- a/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2FreezeFrameTest.java
+++ b/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2FreezeFrameTest.java
@@ -37,7 +37,6 @@ import org.junit.Test;
/** Test retrieving the OBD2_FREEZE_FRAME property from VHAL */
public class Obd2FreezeFrameTest {
private static final String TAG = Obd2FreezeFrameTest.class.getSimpleName();
- private static final String VEHICLE_SERVICE_NAME = "Vehicle";
private static final long WAIT_FOR_VEHICLE_HAL_TIMEOUT_MS = 10_000;
private IVehicle mVehicle = null;
@@ -53,14 +52,10 @@ public class Obd2FreezeFrameTest {
waitMilliseconds,
() -> {
try {
- return IVehicle.getService(VEHICLE_SERVICE_NAME);
+ return IVehicle.getService();
} catch (RemoteException e) {
- Log.w(
- TAG,
- "attempt to get IVehicle service "
- + VEHICLE_SERVICE_NAME
- + " caused RemoteException: ",
- e);
+ Log.w(TAG, "attempt to get IVehicle service " +
+ " caused RemoteException: ", e);
return null;
}
});
diff --git a/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2LiveFrameTest.java b/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2LiveFrameTest.java
index c304fa54ba..1f17358610 100644
--- a/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2LiveFrameTest.java
+++ b/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Obd2LiveFrameTest.java
@@ -36,7 +36,6 @@ import org.junit.Test;
/** Test retrieving the OBD2_LIVE_FRAME property from VHAL */
public class Obd2LiveFrameTest {
private static final String TAG = Obd2LiveFrameTest.class.getSimpleName();
- private static final String VEHICLE_SERVICE_NAME = "Vehicle";
private static final long WAIT_FOR_VEHICLE_HAL_TIMEOUT_MS = 10_000;
private IVehicle mVehicle = null;
@@ -52,10 +51,10 @@ public class Obd2LiveFrameTest {
waitMilliseconds,
() -> {
try {
- return IVehicle.getService(VEHICLE_SERVICE_NAME);
+ return IVehicle.getService();
} catch (RemoteException e) {
- Log.w(TAG, "attempt to get IVehicle service " + VEHICLE_SERVICE_NAME
- + " caused RemoteException: ", e);
+ Log.w(TAG, "attempt to get IVehicle service " +
+ " caused RemoteException: ", e);
return null;
}
});