Commit graph

506 commits

Author SHA1 Message Date
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
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
Changyeon Jo
63cddfc13f Explictly cast size_t into a long data type
This change explictly casts size_t type variables to long data type in
ALOG*, to avoid any build error due to inconsistent size_t type
declarations between different build targets.

Bug: 142545867

Change-Id: I587c7006a6ab69970b3a507a6160b3decd4bfd5a
Signed-off-by: Changyeon Jo <changyeon@google.com>
2019-10-12 05:27:34 -07:00
Changyeon Jo
c6fa0abf51 Revert "Revert "Revert "Revert "Extend EVS interfaces and data types""""
This reverts commit 468cc1d476.

Change-Id: If7e80111213ba02bf2c49f17f9880cd9cd14429e
2019-10-12 05:25:49 -07:00
Changyeon Jo
468cc1d476 Revert "Revert "Revert "Extend EVS interfaces and data types"""
This reverts commit 47b45af32c.
2019-10-12 05:18:16 -07:00
Changyeon Jo
47b45af32c Revert "Revert "Extend EVS interfaces and data types""
This reverts commit 1b73d28c04.
2019-10-11 14:00:36 -07:00
Changyeon Jo
1b73d28c04 Revert "Extend EVS interfaces and data types"
This reverts commit e6976fce80.
2019-10-11 10:13:38 -07:00
Changyeon Jo
e6976fce80 Extend EVS interfaces and data types
This change extends the definition of CameraDesc with the additional
camera metadata field that various camera module informaiton will be
stored.

IEvsEnumerator is extended with three new methods:
    - getCameraList_1_1() returns a list of new camera descriptors
    - openCamera_1_1() tries to open a camera device with a given
      stream configuration.

IEvsCameraStream has below changes:
    - deliverFrame_1_1() method is added to handle a frame in new
      BufferDesc.
    - Rename notifyEvent() as notify().

IEvsCamera also has below new methods:
    - getCameraInfo_1_1() returns a new camera descriptor.
    - getParameterList() returns a list of camera control parameters
      supported by the camera device.
    - getIntParameterRange() returns a valid range of parameter values.
    - Parameter setter and getter methods are renamed.

VTS test cases are updated to use new methods and below test cases are
added to validate their behaviors:
    - CameraUseStreamConfigToDisplay verifies end-to-end video stream
      with a stream configuration it finds from CameraDesc's metadata.
    - MultiCameraStreamUseConfig verifies two clients can start and
      stop video streams on the same underlying camera with same stream
      configuration.

Bug: 128851019
Test: VtsHalEvsV1_1Target
Change-Id: Ia6b0b94aff869129cb400d0a4c4df91e72682784
Signed-off-by: Changyeon Jo <changyeon@google.com>
2019-10-11 04:41:25 -07:00
Enrico Granata
a0cbe5804e Edit a comment to reflect an actual enum type name
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
2019-10-04 11:14:50 -07:00