Commit graph

513 commits

Author SHA1 Message Date
Hao Chen
0885f9b10a Set Timestamp By the Server when the client called 'set'
Test: Build; unit tests `atest packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java`

Bug: b/141493212

Change-Id: I6686a15d6e9fa483d9b361acfe88001b7497b937
2019-12-20 10:48:45 -08:00
Hao Chen
de6835be3e Simplify Connector class APIs and hierachy
Test: Build; unit tests `atest
 packages/services/Car/tests/vehiclehal_test/src/com/android/car/vehiclehal/test/CarPropertyTest.java`

Bug: b/141493212

Change-Id: I6c561d517646760dfff63cb6c6b50c3c5994098a
2019-12-20 10:48:15 -08:00
Hao Chen
5f82b989bb Merge changes from topic "proto_package_name"
* changes:
  A more generalized package name for VHal proto IDLs
  Protobuf message converter should be a public utility library
2019-12-19 21:30:40 +00:00
Chris Weir
d65c829d30 Merge "Add support for error, RTR, and EFF frames" 2019-12-13 22:47:56 +00:00
chrisweir
bee3d2c3c9 Add support for error, RTR, and EFF frames
Error frames, remote transmission request, and extended format frames
require some changes to the way that we set up our sockets.

Bug: 142655821
Bug: 144774939
Test: manual
Change-Id: I06212cb852d480c1c7093e8c509ca8aa9f85f81f
2019-12-12 14:21:38 -08:00
Zhaoming Yin
497cc64544 Add fuzzer for FormatConvert
Bug: 146086281
Test: Follow go/android-fuzzing to build and test

Change-Id: Id94c57ba1b327cd4af2ae72fb0259953fa941d45
2019-12-12 13:09:57 -08:00
Hao Chen
5deac06ad9 A more generalized package name for VHal proto IDLs
Test: build; test (and submit) with ag/9868729

Change-Id: Iacdf518d8c90485430a009e341dd1fd705b7ee83
2019-12-06 16:01:28 -08:00
Hao Chen
1c1fdca026 Protobuf message converter should be a public utility library
Test: Built, and flashed to Osprey (go/enable-google-vhal-on-osprey)

```
# 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 android.hardware.automotive.vehicle@2.0-default-impl-unit-tests
```

Change-Id: I3841870614f316f2f0e2f54283674223a0b036f4
2019-12-06 15:58:20 -08:00
TreeHugger Robot
46966c824f Merge "Fix sp<> crash on stack-allocated service object." 2019-12-06 17:55:16 +00:00
Kathan Shukla
d37e5c122a Add VTS tests for Occupant Awareness HIDL.
Test: VTS tests

Change-Id: Ib278986334439d181348800c01332606f9d36a89
2019-12-05 18:31:03 -08:00
Tomasz Wasilczyk
201734e551 Fix sp<> crash on stack-allocated service object.
Bug: 145609858
Test: build, boot
Change-Id: Ia705750c77ee8ba950d19eae9bbd208b0dac2310
2019-12-05 13:54:50 -08:00
Kathan Shukla
56c98e4cf1 Mock hal for Occupant Awareness interface.
Mock hal has limited capability - driver and front passenger presence
detection and driver monitoring detection.

Bug: 142383127
Test: VTS tests
Change-Id: I72e4b443a0d8063288e14333bd9ebbb1f2c19720
2019-12-05 11:19:47 -08:00
Kathan Shukla
88d63ccbd7 Fix spelling of presence in Occupant Awareness.
Test: Build test
Change-Id: I1961c54cafd343acd75fac04535e952000dbdb99
2019-12-04 15:55:15 -08:00
Kathan Shukla
b6261cb2ae Default hal for Occupant Awareness.
Bug: 142383127
Test: Verified that the system starts the default hal automatically.
Change-Id: I851f85bc283165891943b82c6c07f3273847b032
2019-11-26 14:54:35 -08:00
Kathan Shukla
382ed1d65d Occupant Awareness HAL definitions.
Occupant awareness default HAL and VTS tests will be added as part of a
separate commit / CL.

Bug: 142383127
Test: Verified that system starts default hal.
Change-Id: I24e1c52c9873fc4e0fc09db24d0def9a04175120
2019-11-26 14:54:32 -08:00
Keun-young Park
f3b8f482be Merge "Add DISABLED_OPTIONAL_FEATURES property" 2019-11-25 17:58:41 +00:00
Hao Chen
ad1222486d Merge "Add GRPC Server as a Library to VHal Build File" 2019-11-22 22:37:18 +00:00
Hao Chen
744fe1a75b Merge changes Iab77a0ae,Ibf525ffe
* changes:
  Applying the vehicle connector to the VHAL
  Implement the connector for emulated vehicles
2019-11-22 19:03:40 +00:00
Hao Chen
fba3ac86cc Applying the vehicle connector to the VHAL
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
2019-11-21 16:57:31 -08:00
Hao Chen
3ebbb8273f Add GRPC Server as a Library to VHal Build File
Bug: b/141493212

Test: Tested with ag/9775633, successfully compiled, also tested with ag/9775563

Change-Id: Icf046aafe3d5794a8b79183baa370bdbbcdb796a
2019-11-21 14:51:04 -08:00
Hao Chen
cda8e6e03a Implement the connector for emulated vehicles
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
2019-11-21 13:21:49 -08:00
Keun young Park
697cb33c45 Add DISABLED_OPTIONAL_FEATURES property
- This allows disabling specific optional features in car service from
  vehicle hal layer.

Bug: 144504820
Test: run with car service

Change-Id: I419ad86b75151aba129730bdc75c9bc1e47333cf
2019-11-20 18:29:35 -08:00
Prachi Hande
8068753e78 Merge "VmsUtils: Add new methods to parse availability state messages" into qt-qpr1-dev am: 0d1d5a0697
am: 6533853937

Change-Id: I1380935021936bb530ddeeaad3b76e00664d0a1f
2019-11-19 13:07:56 -08:00
Prachi Hande
6533853937 Merge "VmsUtils: Add new methods to parse availability state messages" into qt-qpr1-dev
am: 0d1d5a0697

Change-Id: Id96237e0638dad9fa3d6edcba768c8a5606e5ee4
2019-11-19 13:04:33 -08:00
Zhaoming Yin
5bfecf49a7 Make HAL default service run on crosshatch_car (VINTF registration)
Bug: 144734708
Test: manually, once compiled and flashed, the service will be in the
      VINTF service list.

Change-Id: I92d05557ddc7c95f697d2f5a88ab8f481c4d0e5b
2019-11-19 19:35:40 +00:00
Kai Wang
683ad9fa44 Merge "Support chose permissions for vendor property" 2019-11-19 19:02:47 +00:00
Prachi Hande
dbce8697bd VmsUtils: Add new methods to parse availability state messages
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
2019-11-19 10:40:20 -08:00
TreeHugger Robot
2098b9e370 Merge "Interface Definition of Vehicle HAL Connector/Vehicle Server Pair" 2019-11-15 19:46:35 +00:00
Hao Chen
b9fb7e58fc Interface Definition of Vehicle HAL Connector/Vehicle Server Pair
Test: compiled by `mm`

Change-Id: I0616e9abfca28656242a82e6ca6addad9b9b812c
2019-11-14 18:03:00 -08:00
Kai
7ba4cf867c Support chose permissions for vendor property
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
2019-11-13 17:59:58 -08:00
TreeHugger Robot
234d8f806c Merge "Log and return error if failed to listen to a socket" 2019-11-13 21:39:05 +00:00
chrisweir
cf36cea092 Add support for SLCAN
* Adding support for SLCAN type interfaces
* Made some of the formatting more consistent

Bug: 142656299
Test: Manually with canhalctrl, canhaldump, and canhalsend
Change-Id: Ifa4c234beb75f8a0ea93bfd75555c5ed8d68dca4
2019-11-13 09:42:27 -08:00
Hao Chen
86e5880d82 Log and return error if failed to listen to a socket
Test: build by `mm`

Change-Id: I5cf38c4011274ff70a02ac7472a10670b779aa85
2019-11-11 22:51:03 -08:00
Inseob Kim
d86992f29a Merge "Remove static vndk dep from vendor modules" am: 437baabfde am: 5d5fee2ef2
am: 936efb8177

Change-Id: Ifb7b89378fd22a8c8cf8a89b41845339c3e0c60f
2019-11-10 22:37:37 -08:00
Inseob Kim
936efb8177 Merge "Remove static vndk dep from vendor modules" am: 437baabfde
am: 5d5fee2ef2

Change-Id: I42aac9039542e01e230aef0d306ea30ae0221fc5
2019-11-10 22:33:03 -08:00
Inseob Kim
5d5fee2ef2 Merge "Remove static vndk dep from vendor modules"
am: 437baabfde

Change-Id: I75a47428508efbaa060d9c72a51b3e5f47472ec5
2019-11-10 22:29:38 -08:00
Treehugger Robot
437baabfde Merge "Remove static vndk dep from vendor modules" 2019-11-11 06:15:14 +00:00
Tomasz Wasilczyk
4255862bb0 Merge "Improve error handling with separate ICanErrorListener" 2019-11-07 15:22:52 +00:00
Tomasz Wasilczyk
a90619662b Improve error handling with separate ICanErrorListener
Error handling highlights:
- moved onError from ICanMessageListener to ICanErrorListener
- added isFatal callback argument to request client disconnect
- don't down interface that's already down

Also:
- don't crash if it's not possible to unregister ICanBus
- don't crash while trying to down interface that failed
- make hidl-utils available to vendor libraries

Bug: 143779011
Test: implemented a VHAL service prototype that communicates with this HAL
Change-Id: I98d054da9da0ead5ef952aebc086e052ac996212
2019-11-06 14:52:07 -08:00
Jordan Jozwiak
88213e3193 DO NOT MERGE Add DISTANCE_DISPLAY_UNIT to google VHAL
Bug: 138816759
Test: aae app vhal apply google & dump properties
Change-Id: I6a4d571975d5fe7ba6419cd4c37b734f21162f41
(cherry picked from commit 2619443e0a)
2019-10-31 23:28:19 -07:00
Xin Li
ab68d3750b DO NOT MERGE - qt-qpr1-dev-plus-aosp-without-vendor@5915889 into stage-aosp-master
Bug: 142003500
Change-Id: I8933ff57906fffacf1d48d606451533ec5b79fa2
2019-10-30 11:49:26 -07:00
Jordan Jozwiak
09638bb7c8 DO NOT MERGE Add DISTANCE_DISPLAY_UNIT to google VHAL
Bug: 138816759
Test: aae app vhal apply google & dump properties
Change-Id: I6a4d571975d5fe7ba6419cd4c37b734f21162f41
(cherry picked from commit 2619443e0a)

Merged-In: I6a4d571975d5fe7ba6419cd4c37b734f21162f41
2019-10-29 00:58:29 +00:00
Nick Desaulniers
f195875512 Merge "[hardware][interfaces][automotive] fix -Wreorder-init-list" am: 0d5782e99e am: 62a2c3a00e
am: b1402d78ed

Change-Id: Ica43b1fb52ef8286f49c5344eb48b1ee0d5dc95f
2019-10-21 11:44:39 -07:00
Jim Kaye
fed537e6ef Merge "[AAE Power Mgt] Allow Suspend to RAM without triggering Garage Mode" 2019-10-21 18:25:03 +00:00
Nick Desaulniers
9ba020bb9b [hardware][interfaces][automotive] fix -Wreorder-init-list
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>
2019-10-18 09:56:57 -07:00
Nick Desaulniers
38b2989461 [hardware][interfaces][automotive] fix -Wreorder-init-list
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>
2019-10-17 12:35:13 -07:00
Jim Kaye
f210a8ca97 [AAE Power Mgt] Allow Suspend to RAM without triggering Garage Mode
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
2019-10-16 21:48:46 +00:00
Nick Desaulniers
7ebce07976 Merge "[hardware][interfaces][vehicle] fix -Wdangling-gsl in test" am: 880ee3950a am: e126b55e4c am: d80d1d4fcb
am: 3bdf845739

Change-Id: I64c6b866aba67f03711923efbaf52cb9b23cdc57
2019-10-15 22:12:08 -07:00
Nick Desaulniers
3bdf845739 Merge "[hardware][interfaces][vehicle] fix -Wdangling-gsl in test" am: 880ee3950a am: e126b55e4c
am: d80d1d4fcb

Change-Id: I55e923c863608c795db1ac357548fe194b9fd582
2019-10-15 22:00:21 -07:00
Nick Desaulniers
dc82c1573a [hardware][interfaces][vehicle] fix -Wdangling-gsl in test
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>
2019-10-14 11:05:18 -07:00