Commit graph

464 commits

Author SHA1 Message Date
Huihong Luo
5d463fdaaa Don't send brightness to car service inside Emulator
This fixes this cts test: android.cts.statsd.atom.UidAtomTests#testScreenBrightness

Bug: 139959479
Test: atest android.cts.statsd.atom.UidAtomTests#testScreenBrightness
Change-Id: I66f858ce7686a90cd395f4e646133e8ea4604be4
(cherry picked from commit 1322465c48d0c3dfa5953573b80a89460b8e7e95)
2020-03-10 12:00:56 -07:00
Hao Chen
25cf3b5b9c Bugfix: add "override" explicitly to make the compiler happy
Test: build

Bug: 148877226
Change-Id: I90806ee2c2302ce9cc5dc8f82754aa807c2ec7ef
2020-03-09 12:53:23 -07:00
Hao Chen
f724a227b0 Merge nested namesapces
fix the nits in ag/10318156

Bug: 150791171

Test: build
Change-Id: I44609f8c7cbeffcb02cb9f2e2f56f3a829de17f6
Merged-In: I44609f8c7cbeffcb02cb9f2e2f56f3a829de17f6
2020-03-04 22:20:03 +00:00
Hao Chen
a6d6fa3d9d Split client and server impl
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
2020-03-04 22:19:56 +00:00
Hao Chen
2f2b3bbef6 Split vehicle client and server interface header
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
2020-03-04 22:19:48 +00:00
Hao Chen
d599096596 Add headers and macros for building VHAL server for AGL
It won't change the logic of Android codes.

Bug: 148877226
Bug: 150791171

Test: Android build won't break

Change-Id: I07006a4a3e20900a2fa90b84167d114f9ac45cfe
(cherry picked from commit 080963546a)
Merged-In: I07006a4a3e20900a2fa90b84167d114f9ac45cfe
2020-03-04 22:18:03 +00:00
Felipe Leme
1507f74397 Shuffled some TODOs around...
Bug: 146207078
Bug: 150409377
Bug: 150413515

Test: not really

Exempt-From-Owner-Approval: only changed bug numbers on TODO omments

Change-Id: If71f62ed0ca5e2a088e4663cacdf8c9504c5df5d
2020-03-03 06:14:33 +00:00
Hao Chen
5d093857d2 Merge changes from topic "agl_build"
* changes:
  Merge nested namesapces
  Split client and server impl
  Split vehicle client and server interface header
  Add headers and macros for building VHAL server for AGL
2020-02-26 01:54:40 +00:00
Hao Chen
5f7c1aae49 Merge nested namesapces
fix the nits in ag/10318156

Test: build
Change-Id: I44609f8c7cbeffcb02cb9f2e2f56f3a829de17f6
2020-02-25 13:20:41 -08:00
Hao Chen
7e9e37fa0a Split client and server impl
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

Test: Build

Change-Id: Ie142b19a5c435a0b4252ffd297504bde69eb44b0
2020-02-24 15:17:12 -08:00
Hao Chen
8dfac92fee Split vehicle client and server interface header
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

Test: build

Change-Id: I550034b071ca6a7ca322fb26b61d76ed4a7307ee
2020-02-24 15:11:17 -08:00
Hao Chen
080963546a Add headers and macros for building VHAL server for AGL
It won't change the logic of Android codes.

Bug: 148877226

Test: Android build won't break

Change-Id: I07006a4a3e20900a2fa90b84167d114f9ac45cfe
2020-02-21 14:38:05 -08:00
Kai Wang
653916fb29 Merge "Add property for multiple ev port locations" 2020-02-21 20:52:03 +00:00
Kai
d0bc0bc57b Add property for multiple ev port locations
Some cars have multiple ev ports.

Bug: 117599455
Test: google VHAL and kitchenSink app
Change-Id: I630b60f773867d1e3a85786403ee28852d497f7e
2020-02-20 10:31:30 -08:00
Danny Epstein
71e543a61f Add rotary interface to VHAL.
Adds a new property for rotary knobs that can spin indefinitely.

Test: Changed Hawk VHAL to use new property for volume
Change-Id: I74eb664e243b5796f7bccb2debd9c440bf430f7d
2020-02-20 10:15:59 -08:00
Jim Kaye
afb6d8fdf4 Clean up descriptions of power states
Clarify the descriptions of VehicleApPowerStateReq and
VehicleApPowerStateReport.

Fixes: 128841180
Test: None. Documentation only.
Change-Id: Icbe86e2e6a761e37adf2689596eb81bb68295fa7
2020-02-14 13:24:35 -08:00
Felipe Leme
f2d4327c83 Merge "Changed value of "no user id" to -10000 (same as UserHandle.USER_NULL)." 2020-02-13 04:17:33 +00:00
Felipe Leme
7778389b1a Fixed User HAL dump.
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
2020-02-12 12:04:10 -08:00
Felipe Leme
31a6216561 Changed value of "no user id" to -10000 (same as UserHandle.USER_NULL).
Test: no, thanks
Bug: 146207078

Change-Id: I8bdab48caa8cff98ac8795e6aa20a2b295363fda
2020-02-12 11:29:39 -08:00
Enrico Granata
52d6e032af Move the virtualized vehicle hal code into the trout tree
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
2020-02-10 17:42:53 -08:00
Felipe Leme
2acb9a7e0d Added VehicleHal.dump()
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
2020-02-07 16:03:09 -08:00
Felipe Leme
003fe685c2 Implemented INITIAL_USER_INFO.
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
2020-02-07 09:35:14 -08:00
TreeHugger Robot
a01dc25fc1 Merge "Implemented IVehicle::debug() on default Vehicle HAL implementation." 2020-02-06 02:44:10 +00:00
Felipe Leme
6542f01ef2 Fixed typo (vehcile -> vehicle).
Test: rgrep -i vehcile . || echo NOT_FOUND
Bug: 146207078

Change-Id: I3ab9ffe25b6bf58a4ff18a70e94bf910b5302e72
2020-02-05 15:58:31 -08:00
Felipe Leme
75a27f8b37 Implemented IVehicle::debug() on default Vehicle HAL implementation.
This function allows developer to drive (no pun intend) the VHAL behaviour
using lshal, which is useful when implementing new CarService functionalities
that depend on VHAL properties.

Examples:

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --help
Usage:

[no args]: dumps (id and value) all supported properties
--help: shows this help
--list: lists the ids of all supported properties
--get <PROP1> [PROP2] [PROPN]: dumps the value of specific properties
--set <PROP> <i|s> <VALUE>: sets the value of property PROP, using an arbitrary number
  of key/value parameters (i for int32, s for string)

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default | head -2
dumping 87 properties
1: {.timestamp = 0, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [3]{42, 1, 10}, .floatValues = [0]{}, .int64Values = [0]{},
.bytes = [0]{}, .stringValue = ""}}

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default \
  --set 299896583 s Numbers i 4 i 8 i 15 i 16 i 23 i 42
Set property {.timestamp = 0, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [6]{4, 8, 15, 16, 23, 42}, .floatValues = [0]{},
.int64Values = [0]{}, .bytes = [0]{}, .stringValue = "Numbers"}}

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default \
  --get 299896583

{.timestamp = 102372810363603, .areaId = 0, .prop = 299896583, .status = AVAILABLE,
.value = {.int32Values = [6]{4, 8, 15, 16, 23, 42}, .floatValues = [0]{},
.int64Values = [0]{}, .bytes = [0]{}, .stringValue = "Numbers"}}

Bug: 146207078
Test: see examples above
Test: atest android.hardware.automotive.vehicle@2.0-manager-unit-tests \
      android.hardware.automotive.vehicle@2.0-default-impl-unit-tests

Change-Id: I2a9bd6f39f2938653a404cab43bdae9e45476529
2020-02-05 15:22:50 -08:00
TreeHugger Robot
b1674a0147 Merge "Added more properties associated with user management:" 2020-02-05 05:56:39 +00:00
Felipe Leme
8edc5b8326 Added more properties associated with user management:
- 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
2020-02-04 19:01:40 -08:00
Enrico Granata
c44909ded8 Centralize creation and error handling for VsockServerInfo
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
2020-02-03 14:01:37 -08:00
felipeal
c5afe480bd Added new properties on Vehicle HAL to support user management.
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
2020-01-31 09:24:15 -08:00
Hao Chen
5a97c389e9 Apply Grpc Client to current VHal Implementation
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
2020-01-23 13:34:34 -08:00
Hao Chen
46df8f5909 Grpc Vehicle Connectors
Test: Build; test with ag/9869095

Bug: b/141493212

Change-Id: Ia4c0b0b5b358b1c67aae43d8c64f781b83725329
2020-01-23 13:14:29 -08:00
Tyler Trephan
8081fb6eba Merge "Updated PERF_STEERING_ANGLE to support rear steering." 2020-01-18 00:17:06 +00:00
Tyler Trephan
e57c109d3e Adding INFO_EXTERIOR_DIMENSIONS car property.
Fix: 146020990
Test: Tested on device.
Change-Id: I003cbb05de0a91efb8e393860fc64ba508515b26
2020-01-17 11:31:09 -08:00
Tyler Trephan
cb8d72c707 Updated PERF_STEERING_ANGLE to support rear steering.
Change-Id: I2d8d8eff076ab2b76476a8b4edc18d213df71d45
Fix: 146022250
Test: Tested on device.
2020-01-14 16:12:55 -08:00
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
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
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
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
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
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
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
Jim Kaye
2b1e5cb620 Merge "Change AP_POWER_STATE_REPORT's access property." am: 86331df20a am: a53b19fb08
am: 7a473c66f7

Change-Id: I48dad550404620168c74cc2b3ef2f321020ee014
2019-10-02 16:10:43 -07:00
Min Yun
1a87dbca80 Change AP_POWER_STATE_REPORT's access property.
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
2019-09-27 21:28:34 +00:00
Jim Kaye
44d525b68b Change AP_POWER_STATE_REPORT's access property.
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
2019-09-27 12:21:36 -07:00
Kai Wang
f51e066cdc Merge "Add three vendor properties for e2e test" 2019-09-24 16:28:20 +00:00
Inseob Kim
31ab19f78b Remove static vndk dep from vendor modules
Instead, vendor modules should link against shared vndk.

Bug: 137178339
Test: mma
Change-Id: Idfce608a3d62de7c4c0e6b02b7cbd80de0a5207f
2019-09-10 14:56:19 +09:00
Kai
14fe1d9028 Add three vendor properties for e2e test
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
2019-09-09 11:11:08 -07:00
Steven Moreland
38c46d0b98 Merge "Remove libhwbinder/libhidltransport deps" am: 6b62c58a9a am: 8c22c3862f am: 6684ee8c36
am: 9a5ffa3196

Change-Id: I3a80895d10767fe68e90a907312a83ded976cbcc
2019-09-06 16:06:13 -07:00
Steven Moreland
9a5ffa3196 Merge "Remove libhwbinder/libhidltransport deps" am: 6b62c58a9a am: 8c22c3862f
am: 6684ee8c36

Change-Id: I3cde9aa7e62793459bdced930ff4b72face8493a
2019-09-06 15:19:41 -07:00
Steven Moreland
b3a4d3832e Remove libhwbinder/libhidltransport deps
Since these were combined into libhidlbase.

Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
2019-09-06 01:07:02 +00:00
Kai
244e794ffe Check timestamp before updating the value
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
2019-08-20 13:10:02 -07:00
Grace Cheng
d78560fdfa Merge "Lacking TURN_SIGNAL_STATE implementation causes emulator GUI broken." 2019-08-16 22:21:52 +00:00
Kai Wang
b503724072 Merge "Add MIXED type property in google HAL" 2019-08-14 18:10:19 +00:00
Grace Cheng
b183194f78 Lacking TURN_SIGNAL_STATE implementation causes emulator GUI broken.
Bug: b/136215520

Test: Runs emulator GUI.

Change-Id: Id23407e1e80a4a87b933d4d4f74c74d1489c7b6e
2019-08-09 17:34:35 -07:00
Prachi Hande
656089c2ce VmsUtils: Update existing methods to parse subscriptions response messages. am: 4066574002
am: 007e8a139e

Change-Id: I61717d084e1e0aae6c18bd7e08743884ec7c5ccc
2019-08-08 17:21:37 -07:00
Prachi Hande
007e8a139e VmsUtils: Update existing methods to parse subscriptions response messages.
am: 4066574002

Change-Id: I2708ebc93f485eff8c98016b489261834203c86e
2019-08-08 17:10:30 -07:00
TreeHugger Robot
6eb5b7007b Merge "Fixes typo." 2019-08-08 23:34:50 +00:00
Grace Cheng
b355bf38e6 Fixes typo.
Test: python vhal_const_generate.py

Change-Id: I9b38313424a0e486698001a72a5c58162adfa35e
2019-08-08 12:50:54 -07:00
Prachi Hande
4066574002 VmsUtils: Update existing methods to parse subscriptions response messages.
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
2019-08-07 22:54:26 +00:00
TreeHugger Robot
90e8bee41e Merge "Add DISTANCE_DISPLAY_UNIT to google VHAL" 2019-08-06 23:43:23 +00:00
Jordan Jozwiak
2619443e0a Add DISTANCE_DISPLAY_UNIT to google VHAL
Bug: 138816759
Test: aae app vhal apply google & dump properties
Change-Id: I6a4d571975d5fe7ba6419cd4c37b734f21162f41
2019-08-01 18:48:03 -07:00
Kai
cd995a8c18 Add MIXED type property in google HAL
Add kMixedTypePropertyForTest for E2E test

Bug: 133334962
Test: change VHAL to google HAL and run vehiclehal_test
Change-Id: Ib9a9708830c4357f9cfc3de6e29d951072e2d2aa
2019-07-30 16:22:10 -07:00
Kai
c62d9b1101 Add electric defrosters and unknown in FanDiretion
Add a new property stands for electric defrosters.
Add a enum unknown in VehicleHvacFanDirection.
Add the new property into Google VHAL config file.

Bug: 126756367
Bug: 132187457
Test: build and flash
Change-Id: I853666ebbb0f5286ce59faeb02f0f37259a88c54
2019-07-30 14:55:33 -07:00
Grace Cheng
7dc09889ba Fixes vts failure. Formats code.
Root cause: Default (without specification in implementation) minimum sample rate is 0.0f. VTS tests minimum sample rate should be larger than 0.0f.

Adds minimum and maximum sample rate for continuous property.


Bug: 136215520, 138316549

Test: vts-tradefed run vts-hal-auto -m VtsHalAutomotiveVehicleV2_0Host

Change-Id: I324c3e05f4d8c6100d370031d0072e8231a43267
2019-07-25 20:06:30 +00:00
Kai
0ce19b8fd9 Update properties' config
Update defaultConfig according to types.hal

Bug: 136215520
Test: 1. replace vhal to default vhal
      2. run unit tests under vehicleHal_test

Change-Id: Id0b58bc9e2cc18d68ea44387ce7634f053e51e1c
2019-07-11 22:16:19 +00:00
Prachi Hande
9eb89bab29 Merge "Updated START_SESSION message interpretation" into qt-dev
am: c6d2640d29

Change-Id: I759e1af718c498d284d9fe9571e10487c2bc78da
2019-06-25 12:06:49 -07:00
Prachi Hande
c6d2640d29 Merge "Updated START_SESSION message interpretation" into qt-dev 2019-06-25 18:23:53 +00:00
Prachi Hande
af6af767e7 Updated START_SESSION message interpretation
Removed the dependency on the fact that the core's new ID is always >= existing ID.
New ID and the old ID may not have any such relation.

Bug: 135475397
Fixes: 135475397
Test: Updated unit tests in VmsUtilsTest. Ran the tests on Hawk.

Change-Id: I5a7e72f36a84f5bf2d3c7bf1ccb89d27c5c0da97
2019-06-24 17:47:56 -07:00
Kai Wang
4acdd6621d Merge "Add Speed_Display_Units property in DefaultHal" into qt-dev
am: 130fad824b

Change-Id: I70a2eeb5effd71b3d17b83ea15fd1f36388468bf
2019-06-21 23:10:37 -07:00
Kai Wang
130fad824b Merge "Add Speed_Display_Units property in DefaultHal" into qt-dev 2019-06-22 05:57:33 +00:00