Commit graph

396 commits

Author SHA1 Message Date
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
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
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