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
C++20 will require members in a designated initializer to be in order
unlike C99.
Bug: 139945549
Test: mm
Merged-In: I17d1d262d71eefa0aa5b89da7acc659bc2f97bbd
Change-Id: I4e18c0f68606c3e8d965aab194f2a5fd5000c59a
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
C++20 will require members in a designated initializer to be in order
unlike C99.
Bug: 139945549
Test: mm
Change-Id: I17d1d262d71eefa0aa5b89da7acc659bc2f97bbd
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
The Vehicle HAL can tell us to shut down immediately, but it cannot
tell us to suspend immediately. Add that capability.
This capability will be needed when the VHAL initiates a Silent
Boot and then asks for suspension. In this case, we do not want
to postpone the suspension by entering Garage Mode.
Bug: 134521909
Test: Added CarPowerManagementTest.testSleepImmediateEntry()
Test: Added CarPowerManagementServiceTest.testSleepImmediately()
Change-Id: I8190d16cb6faa15672ec3d61f126f6d283d1189e
Chaining the method calls in such a way otherwise returns a dangling
pointer to a temporary object.
Bug: 139945549
Test: mm
Change-Id: I0783fccbb6f11e7e37bd059445265227359649cf
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
There is nothing named enum_vehicle_ap_power_state_shutdown_param_type
in the Vehicle HAL source tree. The right greppable type name is
VehicleApPowerStateShutdownParam.
Test: git diff
Change-Id: Ib6c8be491df9aa6cb3143b28a12b70bd4b8c29cc
Change AP_POWER_STATE_REPORT's access property from WRITE to READ_WRITE.
In Vehicle environment some hals communicate with external ecu,
so they must know the boot reason.
(Not only on, but DEEP_SLEEPY_EXIT, ON, CANCELD)
To handle this, AOSP provide CarPowerManager, but it use AIDL.
But, in treble, vendor process must communicate with system process via hidl.
So, vendor processes(almost hal), can't use CarPowerManager.
(Beside, CarPowerManager use /dev/binder but vendor process use /dev/vndbinder).
If hals subscribe AP_POWER_STATE_REPORT via vehicle hal,
they can handle the power state.
bug: 140370318
Merged-In: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Change-Id: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Change AP_POWER_STATE_REPORT's access property from WRITE to READ_WRITE.
In Vehicle environment some hals communicate with external ecu,
so they must know the boot reason.
(Not only on, but DEEP_SLEEP_EXIT, ON, CANCELED)
To handle this, AOSP provide CarPowerManager, but it use AIDL.
But, in treble, vendor process must communicate with system process via hidl.
So, vendor processes(almost hal), can't use CarPowerManager.
(Beside, CarPowerManager use /dev/binder but vendor process use /dev/vndbinder).
If hals subscribe AP_POWER_STATE_REPORT via vehicle hal,
they can handle the power state.
Bug: 140370318
Test: Verified on Hawk
Change-Id: Ic4c7f1d66a4fdee1cfb8b9da42cf76bc7aed5948
Add three vendor properties for e2e test. By using those
properties, it will mock the behavior of car's ECU.
Bug: 140581574
Test: run test in VehcileHAL_test
Change-Id: Ibf80419fb56532878fa8e6d4b4b105bcc6c41045
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
Check timestamp before updating property value.
Use timestamp in generating fake property event.
Bug: 134963097
Test: end to end test in VehcileHal_test
Change-Id: I60f8c0eb3a19db2c165469bb45b3b80b39388b37
Currently, we do not have a way to parse subscriptions response
messages. But we have parsing methods for SUBSCRIPTIONS_CHANGE type of
messages. These messages have the exact same payload as SUBSCRIPTIONS_RESPONSE
messages. So all we need to do is allow existing methods to parse
SUBSCRIPTIONS_RESPONSE messages along with SUBSCRIPTIONS_CHANGE
messages.
Bug: 138664881
Fixes: 138664881, 137955333
Test: Added more tests for the new message type. Ran tests on Hawk.
Change-Id: I53432e2215e03bb94fd36b7d62f42fe0be1994cf