Some of the code in VHAL client implementation contains Android-specific
code, and some of the server operations only works in the native case.
So we split them up so that the AGL VHAL server can selectivly pick the
parts it needs.
It won't change the logic of native VHAL.
Bug: 148877226
Bug: 150791171
Test: Build
Change-Id: Ie142b19a5c435a0b4252ffd297504bde69eb44b0
(cherry picked from commit 7e9e37fa0a)
Merged-In: Ie142b19a5c435a0b4252ffd297504bde69eb44b0
Since vehicle client may contains some Android-specific types/headers
that may not exist on AGL, we split the header into "client" and "server".
It won't change the logic of Android codes.
Bug: 148877226
Bug: 150791171
Test: build
Change-Id: I550034b071ca6a7ca322fb26b61d76ed4a7307ee
(cherry picked from commit 8dfac92fee)
Merged-In: I550034b071ca6a7ca322fb26b61d76ed4a7307ee
Adds a new property for rotary knobs that can spin indefinitely.
Test: Changed Hawk VHAL to use new property for volume
Change-Id: I74eb664e243b5796f7bccb2debd9c440bf430f7d
Clarify the descriptions of VehicleApPowerStateReq and
VehicleApPowerStateReport.
Fixes: 128841180
Test: None. Documentation only.
Change-Id: Icbe86e2e6a761e37adf2689596eb81bb68295fa7
It was not validating the input before storing the response form lshal, which
would crash it later.
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896583 a 2
Bug: 146207078
Change-Id: I49a38041e2881224c61e3c645db7c9103d024040
AAOS virtualization work is happening under the trout tree, and
we should be building reference HAL implementations for the
virtualized deployment under that tree
Bug: 148816426
Test: build
Change-Id: I90fd2bc4191f8076475e034c7feb07b2664e63c8
This (optional) function allows the HAL implementation customize lshal debug;
for example, it could:
- augment dump() by dumping its own state
- disable dump()
- dump specific state based on arguments
- run custom commands based on arguments
This CL also implements this method in the emulated vehicle HAL, where it adds
options to dump the user-related state.
Bug: 146207078
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal
Test: atest android.hardware.automotive.vehicle@2.0-manager-unit-tests \
android.hardware.automotive.vehicle@2.0-default-impl-unit-tests
Change-Id: If04e8222a31448f170ab2b54552051196b6ab958
This property is called by Android when it starts, and it's expecting a
property change indicating what the initial user should be.
During normal circumstances, the emulator will reply right away, passing a
response if InitialUserInfoResponseAction::DEFAULT (so Android could use its
own logic to decide which user to boot).
But during development / testing, the behavior can be changed using lshal dump,
so the following scenarios can be tested:
- property timeout
- HAL response using a different request id
- user switch
- user creation
Bug: 146207078
Test: manual tests with lshal and a modified CarServiceHelper
Test: atest android.hardware.automotive.vehicle@2.0-manager-unit-tests \
android.hardware.automotive.vehicle@2.0-default-impl-unit-tests
Change-Id: Ia5be62c8b19a168c0c6da5307169fc14bf3069c9
- CREATE_USER: called after an Android user is created.
- REMOVE_USER: called after an Android user is removed.
- USER_IDENTIFICATION_ASSOCIATION: associates an Android user with
vehicle artifacts like a key FOB.
This CL only defines the new types, they're not implemented or used yet.
Test: m -j android.hardware.automotive.vehicle@2.0-service
Bug: 146207078
Change-Id: Idb399df55567402edb1b954b1c4b25f69e810a81
Provide helper functions that create VsockServerInfo objects
from either the command line or the property storage, and
have them return optional instead of relying on default values.
Also, avoid atoi() since it has the potential for undefined behavior.
Test: build
Change-Id: I0aab6b7d84e5084580e25217ac5ba4f5a1db6e2a
These initial properties are:
- INITIAL_USER_INFO: gets information about the initial user, it will
replace the android.car.systemuser.bootuseroverrideid system property
approach.
- SWITCH_USER_REQUEST: used to communicate a user switch request from
Android to HAL, or vice versa.
This CL only defines the new types, they're not implemented or used yet.
Test: m -j android.hardware.automotive.vehicle@2.0-service
Bug: 146207078
Change-Id: I25055f8adc90aaebaf3a3faa9a9b73c284440624
Test: tested on Cuttlefish VM
- Use virtualization HAL implementation, device/google/cuttlefish/shared/auto/device.mk, PRODUCT_PACKAGES:
remove android.hardware.automotive.vehicle@2.0-service
add:
android.hardware.automotive.vehicle@2.0-virtualization-service
android.hardware.automotive.vehicle@2.0-virtualization-grpc-server
- configure the server CID and port, add the following device/google/cuttlefish/shared/config/init.vendor.rc:
setprop ro.vendor.vehiclehal.server.cid 3
setprop ro.vendor.vehiclehal.server.port 9210
- Build and Launch cuttlefish VM
m && acloud create --boot-timeout 3600 -vv --local-instance --local-image
- VHAL should work as normal, see tests in ag/9693857
Bug: b/141493212
Change-Id: I97df02dd26b89f60d3d87b2c32c4f4f8919b1294
Make VHAL to use the connector/server interfaces instead of talking to
the (faked) vehicle directly. Use passthrough connector for now since we
have not moved to the virtualized scenario yet (but soon :)
Bug: b/141493212
Test: On both Osprey and Hawk. Build and flash the image. If on Osprey, see
go/enable-google-vhal-on-osprey; if on hawk, `aae app vhal apply google`
to enable Google VHAL
```
# no VHAL crash
$ adb logcat
$ vts-tradefed
> run vts-hal-auto -m VtsHalAutomotiveVehicleV2_0Host
# 30 passed, 2 failed, the same as the result before this patch
# See value changed in Vehicle HAL tab, KitchenSink app:
$ python packages/services/Car/tools/emulator/prop_event_simulator.py --property
VEHICLEPROPERTY_HVAC_AC_ON --area 0 --value 1
# unit tests
$ atest packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java
```
Change-Id: Iab77a0ae32db2c55b4c65aa8f3e4f73ec9ef2644
Some functions are copyed from the original VHAL implementation. The
ones left in the old implementation will be removed after enabling the
Vehicle Connector. Keeping them right now because otherwise it will
break the build.
Bug: b/141493212
Test: since nothing changed in the "active" code, just compiled by `mm`
Change-Id: Ibf525ffe056d6a4c789a7a407eb0b54f61858041
- This allows disabling specific optional features in car service from
vehicle hal layer.
Bug: 144504820
Test: run with car service
Change-Id: I419ad86b75151aba129730bdc75c9bc1e47333cf
These methods are needed in the HAL client to parse sequence number and
associated layers when the availablity of the VMS layers change.
HAL client relies on these messages by either explicitly requesting the
availability or through availability change message sent by the Car
service.
Bug: 144434783
Fixes: 144434783
Test: Added new tests for the new methods. Ran the tests on Hawk.
Change-Id: I09497640367a894e1dfb6143ac3bbdb63d64b53e
Add property SUPPORT_CUSTOMIZE_VENDOR_PERMISSION.
Add enum VehicleVendorPermission.
The configArray of new property indicate vendor property Id and
the permission selected by vendor.
Update google VHAL as an example how to use it.
Bug: 109950289
Test: build and flash with google HAL
check permission via property test in KitchenSink
Change-Id: Ic8dcb661ce69bfb82ebc00781426dfbb98fb393d