Commit graph

678 commits

Author SHA1 Message Date
Yu Shan
4f45ed5f75 Merge "Revert^2 "Add PER_DISPLAY_MAX_BRIGHTNESS VHAL property."" into main 2024-06-11 23:52:21 +00:00
Yu Shan
14404f2444 Revert^2 "Add PER_DISPLAY_MAX_BRIGHTNESS VHAL property."
This reverts commit 439e897d10.

Reason for revert: Seahawk now uses v3 lib, which should not be affected

Change-Id: Ia04c9a2c28829778c4d9d24b4a1138b615ac9377
2024-06-11 00:11:22 +00:00
Treehugger Robot
99e0190a79 Merge "Allow using property name in debug command." into main 2024-05-28 22:04:41 +00:00
Treehugger Robot
3a117fe692 Merge "Improve FakeVehicleHardware dump." into main 2024-05-28 20:54:44 +00:00
Treehugger Robot
71fa5c0d03 Merge "Patched <1 resolution bug in reference VHAL" into main 2024-05-28 19:43:08 +00:00
Treehugger Robot
54ef29249f Merge "Added documentation for code explainability in SubscriptionManager VHAL" into main 2024-05-28 19:33:00 +00:00
shrikar
a498939170 Patched <1 resolution bug in reference VHAL
Bug: 341142440
Test: atest DefaultVehicleHalTest
Change-Id: Iced15350a53580a726df5eca87de9409b155c0ca
2024-05-28 18:47:38 +00:00
Pechetty Sravani
d5cf62ae99 Merge "Revert "Add PER_DISPLAY_MAX_BRIGHTNESS VHAL property."" into main 2024-05-27 03:30:41 +00:00
Pechetty Sravani
439e897d10 Revert "Add PER_DISPLAY_MAX_BRIGHTNESS VHAL property."
This reverts commit 57e19cdcd8.

Reason for revert: Droidmonitor triggered revert due to build breakage in b/342708614. Will be verifying through ABTD before submission.

Change-Id: I289ed2a3158e81b7b1da86df939d59970f65b0a5
2024-05-27 01:57:14 +00:00
Treehugger Robot
8258ec1758 Merge "Add PER_DISPLAY_MAX_BRIGHTNESS VHAL property." into main 2024-05-25 02:27:11 +00:00
Yu Shan
77f21c8016 Allow using property name in debug command.
Add stringToPropertyId to VehicleUtils and use that in
FakeVehicleHardware to support commands like "--set PERF_VEHICLE_SPEED".

Test: atest VehicleUtilsTest FakeVehicleHardwareTest
Bug: 342260344
Change-Id: If317929376eb18bb0c28f87c4d7a3321c58d72b1
2024-05-24 17:03:18 -07:00
Yu Shan
a97e8abba7 Improve FakeVehicleHardware dump.
Add supported area IDs to "--list" dump.

Test: dumpsys android.hardware.automotive.vehicle.IVehicle/default
--list
Bug: 342260344

Change-Id: I889fa0a5b8a97d36a3b8ddf1620160e7d4d3e308
2024-05-24 17:03:17 -07:00
Yu Shan
b0a66d9747 Lazy init property configs.
This is the first step towards supporting delayed property config
discovery. Right now this does not bring too much benefit since
essential system service such as carwatchdog is still querying
property conifg early in the boot process. In the future once
we separate essential properties with non-essential properties,
we can improve more.

Test: atest DefaultVehicleHalTest
Bug: 342470570
Change-Id: Ie85aa163fa9128aa061dd5b3221954c7acac050c
2024-05-23 15:44:22 -07:00
Yu Shan
cb00b1f816 Implement Unsubscribe in vhal proxy.
Implement the unsubscribe function in IVehicleHardware. This will
stop the server from generating property update events for the
specified [propId, areaId].

Test: atest GRPCVehicleHardwareUnitTest GRPCVehicleProxyServerUnitTest
Flag: EXEMPT hal change
Bug: 328316981
Change-Id: I35f4860eead0c8ec9b192657fe51cc0ff4319383
2024-05-20 17:28:54 -07:00
Yu Shan
1c670114fd Add host prebuilt for fake VHAL config.
Test: Local build
Bug: 328316981
Flag: EXEMPT build rule
Change-Id: I965e704e29e62cd05540f46ef37d0bfa2a5568db
2024-05-20 16:48:19 -07:00
Yu Shan
f01c7aec0d Add require_root to FakeVehicleHardwareTest.
According to b/329690075, vendor tests need root to use vendor
lib, otherwise atest will cause link error.

Test: atest FakeVehicleHardwareTest on cf_auto
Flag: EXEMPT bug
Bug: 341762230
Change-Id: I6bab19b20e6fe91dbdb2a6526172a5dd1d092ff5
2024-05-20 16:48:19 -07:00
Yu Shan
5ddb4185f2 Merge "Add subscribe to VHAL proto." into main 2024-05-20 22:13:24 +00:00
Yu Shan
57e19cdcd8 Add PER_DISPLAY_MAX_BRIGHTNESS VHAL property.
Test: m -j android.hardware.automotive.vehicle.property-update-api
Bug: 336831738
Change-Id: I16b874a0bad9ab446c4e000b1c3680363548849a
2024-05-20 14:49:30 -07:00
Yu Shan
8a844ae840 Merge "Add host_supported to VHAL libs." into main 2024-05-20 20:33:29 +00:00
Treehugger Robot
8385c2a980 Merge "Update documentation for display brightness." into main 2024-05-20 19:28:29 +00:00
Yu Shan
f1a869055f Add subscribe to VHAL proto.
The latest IVehicleHardware adds Subscribe/Unsubscribe function
to replace the existing updateSampleRate. This CL adds the
Subscribe function to protobuf definition and implements it.

Test: atest GRPCVehicleHardwareUnitTest GRPCVehicleProxyServerUnitTest
Flag: EXEMPT hal change
Bug: 328316981
Change-Id: I4f02885b77f21a215a8b282be583f76118e400ba
2024-05-20 12:16:17 -07:00
Yu Shan
9d3513882a Add host_supported to VHAL libs.
We need to build a FakeVehicleHardware impl on host, thus we need
to add the host_supported option.

Test: Local build on host.
Bug: 328316981
Change-Id: Ia21d26640c465846423cab1a0ff8a283c798b92a
2024-05-20 12:14:44 -07:00
Yu Shan
2c83e2a799 Initialize mAddExtraTestVendorConfigs to false.
If we do not init, the initial value is undefined.

Test: Local run
Bug: 340947823
Flag: EXEMPT bugfix
Change-Id: I18a3688a446dd969545e1fc2cb5f63210c3c02cd
2024-05-15 23:49:48 +00:00
shrikar
2af21312b1 Added documentation for code explainability in SubscriptionManager VHAL
Bug: 326314500
Test: presubmit
Change-Id: If23c308ac8c3b50a4ec7b686b0cc860b29d8e8bb
2024-05-13 06:45:37 +00:00
Yu Shan
9cb6bcfa65 Update documentation for display brightness.
PowerHalService relies on VHAL to use property change event to
communicate the display brightness. This CL updates the doc
to be explicit about this requirement.

Furthermore, getting PER_DISPLAY_BRIGHTNESS without specifying
which port to get is confusing, so this CL also updates the doc.

Test: None, no code change
Bug: 336831738
Change-Id: Id4d0e7ff5fc065a53a38e831810470469563c3e6
2024-05-01 17:12:04 -07:00
Yu Shan
c746fc87bd Create V4 generated_lib.
Currently this is the same as v3.

Test: Presubmit
Bug: 337328290
Change-Id: Ic3aa820d71e6082642639a5cc6aeb0065817c382
2024-04-26 15:47:26 -07:00
Yu Shan
72594ce8fa Create version specific dir for generated libs.
Need to create version specific directory so that a client/VHAL
implementation can link against a previously released property
interface.

Otherwise we force all the current clients/servers that use the
generated libs to use the latest property interface library.

Test: Presubmit
Bug: 337328290
Change-Id: I07ee8d0c2c6fa5c1c21f93a54d8b7455a2fad6d7
2024-04-26 15:45:17 -07:00
Ronish Kalia
7dbbfcd17a Merge "Migrate Test Targets to New Android Ownership Model" into main am: 98ef872235 am: 8d119d3d0c
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2946535

Change-Id: I1349263068518c882bb0944c9bf7709534819033
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-22 15:41:18 +00:00
Treehugger Robot
cf8f5a5c6e Merge "Add examples to area access documentation" into main 2024-04-22 15:26:50 +00:00
Ronish Kalia
98ef872235 Merge "Migrate Test Targets to New Android Ownership Model" into main 2024-04-22 15:01:56 +00:00
shrikar
cce1a0ae74 Add examples to area access documentation
Also add VTS checks to ensure WRITE_ONLY configs don't exist along with
READ_ONLY and READ_WRITE configs

Bug: 332598311
Test: atest VtsHalAutomotiveVehicle_TargetTest
Change-Id: Ie3d38fc2fd582d8949736739e83d277d75d69e62
2024-04-22 14:07:40 +00:00
shrikar
af790073c7 Updated _LOCK properties HAL docs with explanation of property values
Excluding MIRROR_LOCK, will address in later CL

Bug: 316945499
Bug: 316945779
Test: presubmit
Change-Id: I973553144956a6b5225562418912e1116ce2359c
2024-04-09 19:21:48 +00:00
Treehugger Robot
ad94b75391 Merge "Update behavior of EV_PORT_LOCATION properties HAL docs in multiport EVs" into main 2024-04-08 19:19:41 +00:00
shrikar
aff4c5569a Update behavior of EV_PORT_LOCATION properties HAL docs in multiport EVs
Bug: 316941251
Test: presubmit
Change-Id: I64f0e965a459c8f8ad0b3b23c635fbc38c600840
2024-04-02 00:13:52 +00:00
Shrikar Amirisetty
d067f9e59a Merge "Add relationship between EV_BRAKE_REGENERATION_LEVEL and _STATE in HAL" into main 2024-04-01 23:23:39 +00:00
shrikar
7a621b0215 Add relationship between EV_BRAKE_REGENERATION_LEVEL and _STATE in HAL
Bug: 316958353
Test: presubmit
Change-Id: I16d5b1c0b54d7fcef419446f88d0c186b61ae8dd
2024-03-28 21:21:31 +00:00
Shrikar Amirisetty
4d463fee2c Merge "Updated relevant EV_prop HAL docs with expected behavior in multiport EV" into main 2024-03-27 22:51:52 +00:00
Shrikar Amirisetty
844a04c078 Merge "Updated EV_CHARGE_STATE HAL docs with behavior on reaching user target" into main 2024-03-26 00:27:47 +00:00
shrikar
69bc05cd89 Updated relevant EV_prop HAL docs with expected behavior in multiport EV
Bug: 316927574
Test: presubmit
Change-Id: I5bbb4d5bd11c2b858852125c50a289f21c12bd23
2024-03-26 00:26:12 +00:00
shrikar
2f2f97ccb1 Updated EV_CHARGE_STATE HAL docs with behavior on reaching user target
Bug: 324447986
Test: presubmit
Change-Id: I33250f4a78a048a90f3f06ed66553e83200dd87b
2024-03-21 18:23:52 +00:00
shrikar
9b8607e503 Specified in INFO_MAKE and INFO_MODEL HAL docs to use public names
Bug: 316921360
Bug: 316922545
Test: presubmit
Change-Id: I3f3956ba59381ce4580d92814cfcb096ebd35c17
2024-03-21 17:40:33 +00:00
Yu Shan
a81a13a50d Add description field to meta.json file.
This allows emulator to show the detailed desription for each
VHAL property by hovering on the property name.

Test: Manually inspect the JSON file.
Bug: 324486041
Change-Id: Ie07dc055d30ae9b84641f952401871348141b398
2024-03-19 14:09:22 -07:00
Yu Shan
38bc1add03 Sort the enum types alphabetically.
Sort them so that they are in a stable order.

Test: Presubmit
Bug: 329269744
Change-Id: Ic541713024442ccfb88088f9bd829e71b20ef832
2024-03-18 18:20:15 -07:00
Treehugger Robot
2478977135 Merge "Specify FUEL_* properties don't apply to electric vehicles in HAL docs" into main 2024-03-14 19:31:54 +00:00
Felix Obenhuber
38f12da7b8 automotive aidl: Add required @RustDerive annotations
Derive vehicle hal parcelables from the Clone trait where applicable. This is is
supportive for implementing a vehicle hal service in Rust because caching e.g
VehiclePropValue or VehiclePropConfig instances allow less verbose code and
increase performance. Cloning a VehiclePropConfig instead of constructing each
time needed is less verbose. Property configs are normally not updated at
runtime.

This is not an API change, so in order to avoid having to bump the AIDL
API version for this HAL we used the hash_gen.sh script as below:

$ m android.hardware.automotive.vehicle-update-api
$ m android.hardware.automotive.vehicle-freeze-api

$ vim vehicle/aidl/Android.bp # removed frozen_api argument and the newly
created version 3 block

$ cp -r aidl_api/android.hardware.automotive.vehicle/3/* aidl_api/android.hardware.automotive.vehicle/2/
$ rm -rf aidl_api/android.hardware.automotive.vehicle/3/

./system/tools/aidl/build/hash_gen.sh \
    hardware/interfaces/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/2 \
    1 \
    hardware/interfaces/automotive/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle/2/.hash

Test: manual - used new derives in custom implementation
Change-Id: I586b89b160eb7a01ce24fad211b9e909175cdd3c
Merged-In: I889c0d51f2c2633908231dd39c9ea5259de36667
2024-03-14 01:29:28 +00:00
shrikar
02beb9b9c1 Specify FUEL_* properties don't apply to electric vehicles in HAL docs
Bug: 316924644
Bug: 316926630
Bug: 316941652
Test: presubmit
Change-Id: Ic838e3e480d71dcab720bab2d1de493e8b7a205a
2024-03-13 22:28:49 +00:00
Felix Obenhuber
dcfc3db66b Add RustDerive to VHAL parcelables.
This is not considered an interface change so we update V2 and V3
version as well so that AOSP partners may use it.

I manually generate the hash code for V2 and V3 interface using:
system/tools/aidl/build/hash_gen.sh hardware/interfaces/automotive\
/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle 2 \
/tmp/hash.2
and
system/tools/aidl/build/hash_gen.sh hardware/interfaces/automotive\
/vehicle/aidl/aidl_api/android.hardware.automotive.vehicle 2 1 \
/tmp/hash.3
and append the hash to thehash file under V2 and V3 interface.

Test: Presubmit
Bug: 329283602
Change-Id: I889c0d51f2c2633908231dd39c9ea5259de36667
2024-03-13 14:45:03 -07:00
Aaqib Ismail
4fe46286e5 Merge "Update HVAC_TEMPERATURE_SET/HVAC_TEMPERATURE_VALUE_SUGGESTION HAL docs" into main 2024-03-13 18:06:14 +00:00
Treehugger Robot
9c38c56187 Merge "Fixed defined versions for new Android V vehicle properties" into main 2024-03-12 06:49:02 +00:00
Aaqib Ismail
2f9f0b32e8 Update HVAC_TEMPERATURE_SET/HVAC_TEMPERATURE_VALUE_SUGGESTION HAL docs
Explain how to define the configArray and how to map fahrenheit values
to celsius values. Mention standardizing the values suggested and the
values defined by the configArray table.

Bug: 313720524
Test: m
Change-Id: I1ebd8223804a939968dfad1d8cb5a4de2d214946
2024-03-11 15:05:43 -07:00