Add script to generate vehicle properties metadata file
for use with emulator's vehicle tab.
Metadata includes:
- names of the properties,
- names for the data enum values
- change and access modes
Change-Id: Ica1df3466b7965916d11adc513f6472d439e1119
Set ENABLE_HIBERNATION_FLAG to a correct value.
Flag is used as a bitmask, and should set single bit.
Bug: 233373476
Change-Id: Ia60cdb3c9c344b3606ea07ed411ed6325a71c396
Test: atest CarServiceUnitTest
Fix a bug where mThread is initialized before mRequests, causing
the new thread to access uninitialized mRequests.
Test: None. This is a race condition depending on when the thread is
started and hard to reproduce.
Bug: 231647009
Change-Id: I68037125bf4d14846585bd3a038844e4a7ced377
(cherry picked from commit 5e26ad3bf7)
Support dump fake user hal command in FakeVehicleHardware.
Test: atest FakeVehicleHardwareTest
Bug: 228218366
Change-Id: I9884a1a216d07da6ccb58af1fa869266c959f80c
Use a handler thread to handle all the get/set value requests in
FakeVehicleHardware to make it async. Vendor implementation should
use similar logic to make their VHAL async.
Test: atest FakeVehicleHardwareTest
Bug: 226001897
Change-Id: Iba95125e63566c27597b9d11bff131c229846d49
The expected behavior for timestamp was not clearly defined in HIDL.
In AIDL, we add clearer definition based on the existing HIDL ref
impl's behavior. This CL add VTS test to enforce these behavior for
AIDL backend.
Test: atest VtsHalAutomotiveVehicle_TargetTest
Bug: 225191802
Change-Id: Ic208d6ac20cb7b820249c9b545c7b3a83528a1dd
Update the implementation for subscription logic. Add clearer
documentation for sampleRate and timestamp behavior. The sampleRate
specified in subscribeOptions is just a guidance to tell VHAL what
the polling rate could be. For timestamp, the timestamp returned
for each property must be the timestamp when that property is
updated, not when the property is retrieved.
Test: atest FakeVehicleHardwareTest
Bug: 225191802, 226000926
Change-Id: I1e886133258236eedfa7fcffe5c4fb49aead4f6f
This is a test property to test LargeParcelable end to end. It would
echo byte values back in reversed order.
Test: atest AndroidCarApiTest:android.car.apitest.VehicleHalLargeParcelableTest
Bug: 224595312
Change-Id: Ib07c7f602613919aef452ac8796a93988a1a9d65
Added SPDX-license-identifier-Apache-2.0 to:
automotive/vehicle/vts/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Change-Id: Ic7216f0da29aabfad2ce3614e5f9ee40055aa609
This CL changes the behavior when sample rate is out of bound
for VHAL. Sample rate would be fitted to the range if out-of-bound.
Also added some comments to clearly document this behavior.
Test: atest DefaultVehicleHalTest
atest CtsCarTestCases
Bug: 225025926
Change-Id: Id853070cb0dc823855a68f86a01de2ff2a011577
Define a VhalResult alias to represent Result that contains a VHAL
StatusCode as error type. This alias helps client to easier migrate
from android::base::Result to VhalResult.
Test: Presubmit
Bug: 219612366
Change-Id: I17f15044ee962c7148b0adc3925e0b0a9dfab2a8
Migrate VHAL VTS to be compatible with both HIDL and AIDL VHAL. The
test cases remains the same.
Test: atest VtsHalAutomotiveVehicle_TargetTest
Bug: 216736141
Change-Id: I5010b9c205656187e890b91dadc69e97ddc96862
Add proper lock to make sure that all resources would be cleaned
up for a client if the client died. Also add check and not to
allocate resources for an already dead client.
Test: atest DefaultVehicleHalTest.
Run manually and do not see 'failed to call callback' messages.
Bug: 221500501
Change-Id: I1c799a6234017b976e7776537ab91526e785b9b4
Define a wrapper class for StatusCode to be used as E in
Result<T, E>. By default E is errorno as defined in linux and does
not print out the correct error message.
Migrate existing Result usage in VHAL to Result<T, VhalError>.
Test: atest VehicleUtilsTest
Bug: 219612366
Change-Id: Ic5369b6035bc46afc4c61da26c4b50f7fa9969d8
Fix a flaky test which might be caused by when the lock is waked
up, we might have more events than what we want. Furthermore, we
have to clear existing events after unregistering event generator.
Test: atest FakeVehicleHalValueGeneratorTest 10 times on cf_auto
Bug: 221084327
Change-Id: I65e87fa62b8538164fcdd60a9df871a9817f4f8e
Merged-In: I65e87fa62b8538164fcdd60a9df871a9817f4f8e
(cherry picked from commit 6ae468c1e3)
This CL improves getPropConfigs to return INVALID_ARG when one of
the prop ID is not found according to the AIDL interface definition.
This CL also improves logging to print out exception code.
This CL also updates service manifest to be consistent with
https://source.android.com/devices/architecture/aidl/aidl-hals
Test: atest DefaultVehicleHalTest
Bug: 219782023, 219612366
Change-Id: I96b091c5cf6641ab7d1df5c644bde7491cbaa5e7
CarService always expect VHAL to generate a property change event
when sending WAIT_FOR_VHAL even though there is not actual power
state change in VHAL.
VHAL power state might already be ON when receive WAIT_FOR_VHAL if
CarService client crashes and restarts. In this case, CarService
still expects an event to be generated.
VehiclePropStore would only generate event when there is an actual
property value change, so we must erase the value before setting
the value to ensure a change event.
Test: atest FakeVehicleHardwareTest
Bug: 219861737
Change-Id: I185b07e188f0b581253b5ab29faf859247ed9d38
Add list of tests to auto-presubmit for HAL changes. CarServiceTest
and CarServiceUnitTest theoratically should not interact with real
HAL, but add them as well just in case they are affected.
Test: Presubmit
Bug: 219843089
Change-Id: I47350d1d0683fd4fa505e289540fd5ce9034ebb9
* Timed out runs do not show any warning messages.
* These test files cannot finish clang-tidy runs with
the following settings:
TIDY_TIMEOUT=90
WITH_TIDY=1
CLANG_ANALYZER_CHECKS=1
* When TIDY_TIMEOUT is set, in Android continuous builds,
tidy_timeout_srcs files will not be compiled by clang-tidy.
When developers build locally without TIDY_TIMEOUT,
tidy_timeout_srcs files will be compiled.
* Some of these test modules may be split into smaller ones,
or disable some time consuming checks, and then
enable clang-tidy to run within limited time.
Bug: 201099167
Test: make droid tidy-hardware-interfaces_subset
Change-Id: I1de28f1572fff368f67eab512fffec9f2e5c2a9b
OEMs are now free to pick any input code to represent their custom input
event.
Bug: 217288618
Test: atest CarServiceUnitTest
Change-Id: I48c967f0b2692bedef32cfae5435c8d4624e353f
Remove the default value for AP_POWER_STATE_REQ because initially the
device should be in an OFF state, but there is no such
AP_POWER_STATE_REQ. If we set the default value to ON, then when
VHAL set the value to ON, it would cause no value update event to
inform CarService.
Test: atest FakeVehicleHardwareTest.
Manually run audio test on cf target.
Bug: 218924258
Change-Id: I3552a38bf2433015767c2254e42871cee5c9e716
Rename the existing vendor version VehicleHalUtils to
VehicleHalUtils vendor and then create a non-vendor version of
VehicleHalUtils.
Test: Presubmit
Bug: 214635003
Change-Id: I7717d2e9527b9dd8592bbdff152aab4ef1b80a10