Commit graph

402 commits

Author SHA1 Message Date
Lakshman Annadorai
8eb03223e9 Update EmulatedUserHal to use UserHalHelper native library.
Bug: 150409377
Fixes: 167588307
Test: Tested using lshal commands in go/user-hal-emulation.

Change-Id: I79486a715c92111d3d6f5c011b7e1cd8c5501c25
Merged-In: I4ba2202e28ef9260b38ebbf21083d55d7aa07fc9
(cherry picked from commit 92ad8215e7)
2020-09-15 02:54:35 +00:00
felipeal
5d40b783d1 Fixed EmulatedUserHal so it supports SwitchUserMessageType::VEHICLE_REQUEST
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896584 a 1 i -42 i 4 i 11
Fixes: 161574356
Bug: 167588307

Change-Id: Iaf5d8e35f556c72350cdb9b6665adb31fca26871
Merged-In: Iaf5d8e35f556c72350cdb9b6665adb31fca26871
(cherry picked from commit 3e9d442fa1)
2020-09-11 17:43:34 +00:00
Lakshman Annadorai
3568c5c3b7 Add a native UserHalHelper library.
This library contains helper functions to convert the User HAL reponse
structs to VehiclePropValues and request VehiclePropValues to HAL
structs.

Test: atest android.hardware.automotive.vehicle@2.0-utils-unit-tests
Bug: 150409377
Bug: 167588307

Change-Id: I978b39e2f3ee58eb3b154f507c714ca1ba2d1e3b
Merged-In: I978b39e2f3ee58eb3b154f507c714ca1ba2d1e3b
(cherry picked from commit b33e2abbfe)
2020-09-11 16:06:42 +00:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.

Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
TreeHugger Robot
f04be179a7 Merge "Yet more minor fixes on User HAL:" into rvc-dev 2020-06-30 01:09:22 +00:00
felipeal
bc366009a6 Yet more minor fixes on User HAL:
- Minor fixes on docs.
- Switched order of String fields on InitialUserInfoResponse to be consistent
  with doc.

Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py  -l android.hardware.automotive.vehicle@2.0
Bug: 159856152

Change-Id: I7b05a64fcea7512101436df7c93a3204274a4d6b
2020-06-25 18:47:42 -07:00
felipeal
1972df27b9 Fixed EmulatedUserHal::get(USER_IDENTIFICATION_ASSOCIATION).
It must set the requestId in the response.

Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896587 a 1 i 666 i 1 i 1 i 2 && \
      adb shell cmd car_service get-user-auth-association --hal-only KEY_FOB
Fixes: 159497444
Bug: 159498909

Change-Id: Ib3f87b45714883c3e5b72464813df24ec4124dbb
2020-06-22 16:06:19 -07:00
TreeHugger Robot
110f2bef7f Merge "Added DISABLED flag to users flag for HAL" into rvc-dev 2020-06-19 01:42:15 +00:00
Hao Chen
c324db992e Add server library build rules for both host and target
Bug: 157603385
Test: build and create Acloud local instance
Change-Id: I80951eb4192360c62a5f72902d20e2dee84d97ad
2020-06-17 14:14:12 -07:00
Mayank Garg
ffb1ffdd0e Added DISABLED flag to users flag for HAL
Bug: 158681378
Test: m (successful build)
Change-Id: I46af767c2cb4716bfbe45f51f59f9c670d6c0a0b
2020-06-16 12:07:24 -07:00
TreeHugger Robot
d5a237964f Merge "Fixed EmulatedUserHal so it doesn't reply to a LEGECY_ANDROID_LEGACY request." into rvc-dev 2020-06-10 20:35:19 +00:00
felipeal
04b84ed8b2 Clarified that USER_IDENTIFICATION_ASSOCIATION is optional.
Test: none
Bug: 157938045

Change-Id: Ie010a0452ce545457ff06223ebfe24cf6522f04a
2020-06-08 12:11:41 -07:00
felipeal
7a3d7c96fc Fixed EmulatedUserHal so it doesn't reply to a LEGECY_ANDROID_LEGACY request.
Bug: 158336360
Test: m -j android.hardware.automotive.vehicle@2.0-service && adb push $OUT/vendor/bin/hw/android.hardware.automotive.vehicle@2.0-service /vendor/bin/hw/ && adb shell kill `pid android.hardware.automotive.vehicle`

Change-Id: I0b506ba5a4b53ada94bc4afc081d3e4222f5e92d
2020-06-08 12:06:16 -07:00
felipeal
d1803412f6 Implemented CREATE_USER and REMOVE_USER on VHAL reference implementation.
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896585 a 1 i 666 i 1 && \
      adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal

Bug: 150408921
Bug: 150409600

Change-Id: If971c262ecaba604f55582b3ef0a850410d82ff9
2020-05-28 14:47:02 -07:00
felipeal
26d9314911 Added userLocales to InitialUserInfoResponse.
Test: $ANDROID_BUILD_TOP/development/vndk/tools/header-checker/utils/create_reference_dumps.py  -l android.hardware.automotive.vehicle@2.0
Bug: 156611139

Change-Id: I0e296dc49f25087714e4dc1d6d4e302c63bedbc8
2020-05-19 17:06:40 -07:00
TreeHugger Robot
e4e9daae6b Merge "Implemented USER_IDENTIFICATION_ASSOCIATION on EmulatedUserHal." into rvc-dev 2020-05-13 19:29:47 +00:00
TreeHugger Robot
501169a9fb Merge "Minor clarificaton on USER_IDENTIFICATION_ASSOCIATION doc." into rvc-dev 2020-05-12 17:05:45 +00:00
felipeal
5a944183d6 Implemented USER_IDENTIFICATION_ASSOCIATION on EmulatedUserHal.
Bug: 150409351

Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896587  a 1 i 666 i 1 i 101 i 2
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --get 299896587

Change-Id: I4890ae5c0cea22bf024b1d7429449390237ab244
2020-05-08 19:04:40 -07:00
TreeHugger Robot
9a3f5f02e9 Merge "Register VHAL to car watchdog" into rvc-dev 2020-05-08 17:58:15 +00:00
felipeal
00134a22c2 Minor clarificaton on USER_IDENTIFICATION_ASSOCIATION doc.
Test: none
Bug: 150409351
Change-Id: I4c8e11c118a503998736acb37259eb6aaea1c542
2020-05-08 09:48:29 -07:00
Eric Jeong
908101a9d9 Register VHAL to car watchdog
- For health checking, the car watchdog client attemps to get
PERF_VEHICLE_SPEED.
- If successful, it regards VHAL is healhty and responds to the car
watchdog daemon. Otherwise, VHAL will be killed by the daemon.

Bug: 154367059
Bug: 154262220
Test: dumpsys android.automotive.watchdog.ICarWatchdog/default and check
if vehicle hal is registered as a client

Change-Id: I2eb466550c56f25ba550ebbd35dc8fde9681ea59
2020-05-07 15:10:43 -07:00
felipeal
4dda37e0d0 Fixed USER_IDENTIFICATION_ASSOCIATION structs and documentation.
Bug: 150409351
Test: m
Test: atest UserHalServiceTest UserHalHelperTest

Change-Id: I121b47f1cc0889259210de96007c3c0f82985e8c
2020-05-06 12:34:47 -07:00
Kai Wang
89fe540104 Merge "Duplicate setting when generate fake data" into rvc-dev 2020-05-01 22:25:37 +00:00
Kai
bb780f4875 Revise documentation for tire pressure and max_defrost
Use the max/min in areaConfig to indicate the recommended tire
pressure.
Explain areaId for HVAC_MAX_DEFROST

Bug: 153906683
Test: make and flash
Change-Id: Ie71279dba4e87efdec75934dcac1c86e22fffaa3
2020-04-30 18:56:27 +00:00
TreeHugger Robot
d2115c9876 Merge "Moved emulated User HAL capabilities into a library." into rvc-dev 2020-04-27 19:23:12 +00:00
felipeal
9c998c0720 Moved emulated User HAL capabilities into a library.
So it can be used by other Vehicle HAL implementations.

Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --help
Test: m -j android.hardware.automotive.vehicle@2.0-emulated-user-hal-lib

Bug: 150167241
Bug: 150409377

Merged-In: I2d0c5039c3b994dfe10d3b411f6d502bebe7cca0
Change-Id: I2d0c5039c3b994dfe10d3b411f6d502bebe7cca0
2020-04-24 16:11:19 -07:00
TreeHugger Robot
a772a420b0 Merge "Add support to USER_IDENTIFICATION_ASSOCIATION_PROPERTY." into rvc-dev 2020-04-24 00:23:34 +00:00
TreeHugger Robot
bb0349f722 Merge "Minor corrections on USER_SWITCH documentation." into rvc-dev 2020-04-23 23:26:20 +00:00
Felipe Leme
0fd963cad8 Minor corrections on USER_SWITCH documentation.
Also removed the hash check on Vehicle HAL files, as they're still being
worked on.

Test: m
Bug: 15249991

Change-Id: I214ebc9b5bbd71e5db1a1332296ceb4e426c50cf
2020-04-23 14:28:30 -07:00
Calvin Huang
96ea2ce5e7 Merge "Add manifest to vintf fragments" into rvc-dev 2020-04-23 20:24:30 +00:00
felipeal
67664dfacc Add support to USER_IDENTIFICATION_ASSOCIATION_PROPERTY.
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896587 i 1 i 1 i 2
Test: adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --get 299896587

Bug: 150409351

Change-Id: I5f05c1689abdeeffd1abcd0e85fd01b584501a2e
2020-04-23 12:54:09 -07:00
Jordan Jozwiak
93f22c85c7 Merge "Add config for tire pressure display units" into rvc-dev 2020-04-23 19:19:54 +00:00
Jordan Jozwiak
7faa170ff1 Add config for tire pressure display units
Bug: 154751939
Test: aae app vhal apply google
// verify property included in dump
adb -s c3139966 shell dumpsys activity service com.android.car get-carpropertyconfig | grep TIRE_PRESSURE_DISPLAY_UNITS -A5

Change-Id: Id7a3ad7351db5a4f03ab3a29fa06e9c82321a44e
2020-04-22 14:38:52 -07:00
Calvin Huang
a653616f18 Add manifest to vintf fragments
Bug: 153734354
Test: Manual
Change-Id: I5f29cdacced0bdc0bf5a74f92ecda916f10bea06
2020-04-21 14:44:10 -07:00
Calvin Huang
a7f44eb83c Add manifest for IVehicle
Bug: 153734354
Test: Manual
Change-Id: I7e6a65e3fb49bb04108d0fd243df0b7447a93b1e
2020-04-16 16:02:17 -07:00
Kai
56e5567aaa Duplicate setting when generate fake data
If the statusCode is Ok, we generate the fake data twice which will
break the test.

Bug: 143234180
Test: atest VehicleHALTest
Change-Id: I7754649fb4202239f9eca63a12bc8dd5f2a3d916
2020-04-13 18:11:14 -07:00
Hayden Gomes
6eaedbae7c Merge "Adding android_filesystem_config.h import" into rvc-dev 2020-04-10 16:19:37 +00:00
Hayden Gomes
8261cac9e8 Adding android_filesystem_config.h import
Addressing outstanding todo in VehicleHalManager

Bug: 148098383
Test: m vts and atest android.hardware.automotive.vehicle@2.0-manager-unit-tests
Change-Id: I9a222077d0de91f8c7353c80d8a1aeff53cffa61
2020-04-09 17:17:31 -07:00
Hao Chen
37cd4646ac Move virtualization-specific proto definition to /device/google/trout
Test: build
Bug: 148816426
Change-Id: I5ea4a078d2733d0b5fc370211389ebc0488898ef
2020-04-09 18:20:15 +00:00
TreeHugger Robot
03a34b7964 Merge "Add filegroup for trout project to use VehicleHalProto definition" into rvc-dev 2020-04-07 20:05:47 +00:00
Calvin Huang
d5608a2d5a Override VHAL property init value with json
Bug: 150978133
Test: Manual
Change-Id: Iaa45adad3712ca3cc325d52433048b3208109402
2020-04-06 22:07:02 -07:00
Hao Chen
efc31de2b6 Add filegroup for trout project to use VehicleHalProto definition
Other virtualization specific definitions and build rules will be moved
to /device/google/trout in the following patches. Keep them for now so
that we will not break the build.

Test: build
Bug: 148816426
Change-Id: I8a579346b55aa812db3dd30a34050c9515f7a68d
2020-04-06 16:27:15 -07:00
felipeal
eb5c657bc7 Implemented SWITCH_USER in the emulated User HAL.
Examples:

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal
No InitialUserInfo response
No SwitchUser response

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --set 299896584 a 1 i 666 i 3 i 1 s "D\\'OH!"
Set property {.timestamp = 63698971001637, .areaId = 1, .prop = 299896584, .status = AVAILABLE, .value = {.int32Values = [3]{666, 3, 1}, .floatValues = [0]{}, .int64Values = [0]{}, .bytes = [0]{}, .stringValue = "D'OH!"}}

$ adb shell lshal debug android.hardware.automotive.vehicle@2.0::IVehicle/default --user-hal
No InitialUserInfo response
SwitchUser response: {.timestamp = 63698971001637, .areaId = 1, .prop = 299896584, .status = AVAILABLE, .value = {.int32Values = [3]{666, 3, 1}, .floatValues = [0]{}, .int64Values = [0]{}, .bytes = [0]{}, .stringValue = "D'OH!"}}

Test: see commands above
Bug: 150409110

Change-Id: Id5b92774fccebbc39ed8d3f553df3f5aa30fc656
2020-03-23 09:43:34 -07:00
Kai Wang
e5a22f2fa1 Merge "Add timestamp for continuously property." into rvc-dev 2020-03-18 17:47:04 +00:00
Kai
47a9378d4d Add timestamp for continuously property.
Bug: 148960132
Test: 1. apply google vhal to device
      2. atest CtsCarTestCases:CarPropertyManagerTest

Change-Id: Ib6690b5e242287958017c87632f56a546d418674
2020-03-17 22:46:06 +00:00
Huihong Luo
034c9bc96e 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
Merged-In: I66f858ce7686a90cd395f4e646133e8ea4604be4
(cherry picked from commit 1322465c48d0c3dfa5953573b80a89460b8e7e95)
(cherry picked from commit 5d463fdaaa)
2020-03-11 19:34:00 -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