vehicle hal update
- add zones to subscribe to allow selected subscription for
zoned properties
- extend config to uint32[4] to allow passing more informaiton
from configs
- change audio volume to be per context, not physical stream.
This maps better to android side's logical streams.
- renamed APP_CONTEXT to AUDIO_CONTEXT: It is useful only for
audio.
- add more audio contexts: safety alert, CD, aux audio
bug: 25183740, 26233321
Change-Id: I29de7b6c9d9a770cf87e7f50991c875d7ce9fdbe
diff --git a/tests/vehicle/vehicle-hal-tool.c b/tests/vehicle/vehicle-hal-tool.c
index 78fd714..d10a7b9 100755
--- a/tests/vehicle/vehicle-hal-tool.c
+++ b/tests/vehicle/vehicle-hal-tool.c
@@ -292,7 +292,7 @@
uint32_t wait_in_seconds) {
// Init the device with a callback.
device->init(device, vehicle_event_callback, vehicle_error_callback);
- int ret_code = device->subscribe(device, prop, 0);
+ int ret_code = device->subscribe(device, prop, 0, 0);
if (ret_code != 0) {
printf("Could not subscribe: %d\n", ret_code);
exit(1);
@@ -355,6 +355,7 @@
char int_array_string[1000]; int_array_string[0] = '\0';
int opt;
+ //TODO allow passing zone
while ((opt = getopt(argc, argv, "lm:p:t:v:w:s:")) != -1) {
switch (opt) {
case 'l':
diff --git a/tests/vehicle/vehicle_tests.cpp b/tests/vehicle/vehicle_tests.cpp
index 5862972..4c15570 100644
--- a/tests/vehicle/vehicle_tests.cpp
+++ b/tests/vehicle/vehicle_tests.cpp
@@ -99,7 +99,7 @@
TEST_F(VehicleDevice, subscribeTest) {
// If the device is not init subscribe should fail off the bat.
int ret_code = vehicle_device()->subscribe(vehicle_device(), VEHICLE_PROPERTY_DRIVING_STATUS,
- 0);
+ 0, 0);
ASSERT_EQ(ret_code, -EINVAL) << "Return code is: " << ret_code;
// Let's init the device.
@@ -107,7 +107,7 @@
ASSERT_EQ(ret_code, 0) << "Return code is: " << ret_code;
// Subscribe should now go through.
- ret_code = vehicle_device()->subscribe(vehicle_device(), VEHICLE_PROPERTY_DRIVING_STATUS, 0);
+ ret_code = vehicle_device()->subscribe(vehicle_device(), VEHICLE_PROPERTY_DRIVING_STATUS, 0, 0);
ASSERT_EQ(ret_code, 0) << "Return code is: " << ret_code;
// We should start getting some messages thrown from the callback. Let's