diff options
author | Keun-young Park <keunyoung@google.com> | 2017-08-25 11:51:15 -0700 |
---|---|---|
committer | Keun-young Park <keunyoung@google.com> | 2017-08-25 12:17:09 -0700 |
commit | 00e2dc8198c8d45e71a9da1027a60123bedc0579 (patch) | |
tree | d189319e213f6593db7f2bcb1c0e847658eae738 /tests/vehiclehal_test | |
parent | 19ca13264ca757d3494c58357d5e49fe11bf9a2d (diff) | |
download | Car-00e2dc8198c8d45e71a9da1027a60123bedc0579.tar.gz |
throw exception when vhal test cannot connect to hal
bug: 64303350
Test: build
Change-Id: Icc1b47a6a6695bc95e651938e1368630f258f07a
Diffstat (limited to 'tests/vehiclehal_test')
-rw-r--r-- | tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Utils.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Utils.java b/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Utils.java index 0a54853fdf..fb97e73c7f 100644 --- a/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Utils.java +++ b/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/Utils.java @@ -81,13 +81,12 @@ final class Utils { return readVhalProperty(vehicle, request, f); } - @Nullable static IVehicle getVehicle() throws RemoteException { IVehicle service; try { service = IVehicle.getService(); } catch (NoSuchElementException ex) { - Log.d(TAG, "Couldn't connect to vehicle@2.0"); + throw new RuntimeException("Couldn't connect to vehicle@2.0", ex); } Log.d(TAG, "Connected to IVehicle service: " + service); return service; |