Commit graph

687 commits

Author SHA1 Message Date
TreeHugger Robot
fb76f51c2e Merge "Register VHAL to car watchdog" into rvc-dev am: 9a3f5f02e9
Change-Id: I08d1ae906391ae2807236c7c466c05fed5e695ad
2020-05-08 18:17:17 +00: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
TreeHugger Robot
3b4ad91b1d Merge "Fixed USER_IDENTIFICATION_ASSOCIATION structs and documentation." into rvc-dev am: 30c37f1eb7 am: 88b6b55195 am: 2c4e2dd877 am: 067cf852ed
Change-Id: I289cd1177dd24c7904b82401d2542557604cffc2
2020-05-07 19:01:25 +00:00
TreeHugger Robot
2c4e2dd877 Merge "Fixed USER_IDENTIFICATION_ASSOCIATION structs and documentation." into rvc-dev am: 30c37f1eb7 am: 88b6b55195
Change-Id: Ia2a2857d54c5c3696f7bd63dd276e5898bc8764d
2020-05-07 18:32:36 +00:00
TreeHugger Robot
88b6b55195 Merge "Fixed USER_IDENTIFICATION_ASSOCIATION structs and documentation." into rvc-dev am: 30c37f1eb7
Change-Id: Ib9308e5fa26bb377ee0cf75baa4ffbab44a8ec51
2020-05-07 18:07:17 +00:00
Felipe Leme
cec924166a Fixed cast.
Test: echo 'in TH we trust'
Bug: 150409351

Change-Id: Id7392551bcb08f3679c58fb4accc15088de0f05a
2020-05-06 21:32:05 -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
56ca0ee530 Merge "Duplicate setting when generate fake data" into rvc-dev am: 89fe540104 am: 737c377861 am: fef560ebc0 am: d0d789de48
Change-Id: Ie48a70f0728af694d7ada65a2c66971ba56a7a97
2020-05-01 23:50:20 +00:00
Kai Wang
fef560ebc0 Merge "Duplicate setting when generate fake data" into rvc-dev am: 89fe540104 am: 737c377861
Change-Id: I49de617f0a177a36d404ca85e46ea7d98f288341
2020-05-01 23:17:00 +00:00
Kai Wang
737c377861 Merge "Duplicate setting when generate fake data" into rvc-dev am: 89fe540104
Change-Id: I1c2d4386571e8650ebe5e4894cf7b25cf860fa77
2020-05-01 22:59:27 +00:00
Kai Wang
89fe540104 Merge "Duplicate setting when generate fake data" into rvc-dev 2020-05-01 22:25:37 +00:00
Kai Wang
92de0a4478 Merge "Revise documentation for tire pressure and max_defrost" into rvc-dev am: a5b75ddfb2 am: 535997b9fa am: 644b52e932 am: 4c488e9205
Change-Id: I21f268de7c9b803c571921d9484b155c2e14986f
2020-05-01 01:38:58 +00:00
Kai Wang
644b52e932 Merge "Revise documentation for tire pressure and max_defrost" into rvc-dev am: a5b75ddfb2 am: 535997b9fa
Change-Id: Ib31106cd4b64d02bca631c937babfeb26946cc7d
2020-05-01 01:09:09 +00:00
Kai Wang
535997b9fa Merge "Revise documentation for tire pressure and max_defrost" into rvc-dev am: a5b75ddfb2
Change-Id: Idcdf45085710af833b83b43b70da8d3f715259b8
2020-05-01 00:58:29 +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
e10be3b4b8 Merge "Moved emulated User HAL capabilities into a library." into rvc-dev am: d2115c9876 am: 7de2ac3171
Change-Id: Id9f4740f81a573ab658f89626078e4f66892b70e
2020-04-27 19:56:09 +00:00
TreeHugger Robot
7de2ac3171 Merge "Moved emulated User HAL capabilities into a library." into rvc-dev am: d2115c9876
Change-Id: I2ea8162bba5ff9eaa5e7de85801107d3e1d3f9eb
2020-04-27 19:40:50 +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
felipeal
836842221a 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

Exempt-From-Owner-Approval: already approved on rvc-dev, need to submit here due to merge conflict

Change-Id: I2d0c5039c3b994dfe10d3b411f6d502bebe7cca0
(cherry picked from commit 1847a9b25e191c8258522f30b6d4223458feebd1)
2020-04-24 23:09:37 +00:00
TreeHugger Robot
104c92216a Merge "Add support to USER_IDENTIFICATION_ASSOCIATION_PROPERTY." into rvc-dev am: a772a420b0 am: e7997bd1ff am: cca31440ef am: a187ed332d
Change-Id: I772d7458d472d0c716a734f3ee4cdc7295010e68
2020-04-24 01:13:45 +00:00
TreeHugger Robot
cca31440ef Merge "Add support to USER_IDENTIFICATION_ASSOCIATION_PROPERTY." into rvc-dev am: a772a420b0 am: e7997bd1ff
Change-Id: I41b8e7b6283e74f982549a5fcb486cf3bd1f97e3
2020-04-24 00:57:26 +00:00
TreeHugger Robot
1b3d00a560 Merge "Minor corrections on USER_SWITCH documentation." into rvc-dev am: bb0349f722 am: 4ee3d99007 am: cffea8bcc7 am: 377eee141b
Change-Id: Ibb520d55cedc8ad18b51bbb09ecf266506eb79cf
2020-04-24 00:50:52 +00:00
TreeHugger Robot
e7997bd1ff Merge "Add support to USER_IDENTIFICATION_ASSOCIATION_PROPERTY." into rvc-dev am: a772a420b0
Change-Id: Ic981e7f833ca7a7360336882bedd875d07fd2be7
2020-04-24 00:39:46 +00: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
cffea8bcc7 Merge "Minor corrections on USER_SWITCH documentation." into rvc-dev am: bb0349f722 am: 4ee3d99007
Change-Id: I3686b6a0caae79eba0c481fe160182c36fb7af21
2020-04-24 00:19:30 +00:00
TreeHugger Robot
4ee3d99007 Merge "Minor corrections on USER_SWITCH documentation." into rvc-dev am: bb0349f722
Change-Id: I2ee22516956b8ec8b5baf9ca5f0273637e6b5868
2020-04-23 23:47:57 +00:00
TreeHugger Robot
bb0349f722 Merge "Minor corrections on USER_SWITCH documentation." into rvc-dev 2020-04-23 23:26:20 +00:00
Calvin Huang
ed4bb9e1d0 Merge "Add manifest to vintf fragments" into rvc-dev am: 96ea2ce5e7 am: 3c9af5eb07 am: cf71ec955c am: e961adcb75
Change-Id: I2ccc2c38387cc3d864b0e22822470a3bf74394f8
2020-04-23 21:31:17 +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
cf71ec955c Merge "Add manifest to vintf fragments" into rvc-dev am: 96ea2ce5e7 am: 3c9af5eb07
Change-Id: I63955b4db7c285e63f73872a3fad05a86ffc15dd
2020-04-23 20:57:16 +00:00
Calvin Huang
3c9af5eb07 Merge "Add manifest to vintf fragments" into rvc-dev am: 96ea2ce5e7
Change-Id: I3d0d89cb9b8b36a0e2428b867dcccf8a2be7a978
2020-04-23 20:41:01 +00:00
Calvin Huang
96ea2ce5e7 Merge "Add manifest to vintf fragments" into rvc-dev 2020-04-23 20:24:30 +00:00
Jordan Jozwiak
2542fe9c35 Merge "Add config for tire pressure display units" into rvc-dev am: 93f22c85c7 am: 8de5b31ff7 am: cde6e952a4 am: b3022ad86c
Change-Id: I16f431bcfdd3baa60f6ef21de5d9d69b5e4232ae
2020-04-23 20:12:35 +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
cde6e952a4 Merge "Add config for tire pressure display units" into rvc-dev am: 93f22c85c7 am: 8de5b31ff7
Change-Id: I0b7798a57a15830208b64587687a8c89608ca831
2020-04-23 19:45:33 +00:00
Jordan Jozwiak
8de5b31ff7 Merge "Add config for tire pressure display units" into rvc-dev am: 93f22c85c7
Change-Id: If8ec9373e256476213d5743c7504b8e2d18fe705
2020-04-23 19:33:09 +00: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
43ca6c25d4 Merge "Add manifest for IVehicle" into rvc-dev am: ef826c728c am: ad84b138cb am: 76363ffeb5 am: 7b252da62a
Change-Id: I89b06e7f57b147fcce94088fc9cbcc3a6a48b81d
2020-04-17 02:25:59 +00:00
Calvin Huang
76363ffeb5 Merge "Add manifest for IVehicle" into rvc-dev am: ef826c728c am: ad84b138cb
Change-Id: Ia3e2a3cbf1c08f6870210bbcb964e1c717010116
2020-04-17 01:41:46 +00:00
Calvin Huang
ad84b138cb Merge "Add manifest for IVehicle" into rvc-dev am: ef826c728c
Change-Id: Ie123467e4298da21ed6dfcc4daa937fb73e94185
2020-04-17 01:21:13 +00: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
db0f920adc Merge "Adding android_filesystem_config.h import" into rvc-dev am: 6eaedbae7c am: 0004813471 am: fbf06faecb am: b8f1fb89e6
Change-Id: I022564be49f859c717c4ecff3d9921844990a6f1
2020-04-10 17:27:19 +00:00
Hayden Gomes
fbf06faecb Merge "Adding android_filesystem_config.h import" into rvc-dev am: 6eaedbae7c am: 0004813471
Change-Id: Id43f6f0895ca4501302a17ef6caa96f6c88cf446
2020-04-10 16:29:39 +00:00
Hayden Gomes
0004813471 Merge "Adding android_filesystem_config.h import" into rvc-dev am: 6eaedbae7c
Change-Id: Ic5d6e807172e65480621cd9c2781c2f332a52869
2020-04-10 16:28:24 +00: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
TreeHugger Robot
d2dd71446f Merge "Move virtualization-specific proto definition to /device/google/trout" into rvc-dev am: b82cdd09a3 am: 95a080b38c am: 01148c0fcb am: 9a0327997e
Change-Id: Ib2c98724dad29442d081cb6b94ea053ca8812cee
2020-04-09 21:59:57 +00:00
TreeHugger Robot
01148c0fcb Merge "Move virtualization-specific proto definition to /device/google/trout" into rvc-dev am: b82cdd09a3 am: 95a080b38c
Change-Id: Ie06a3eb402bd4415516a5f49edbd0380676305a1
2020-04-09 21:13:37 +00:00
TreeHugger Robot
95a080b38c Merge "Move virtualization-specific proto definition to /device/google/trout" into rvc-dev am: b82cdd09a3
Change-Id: I47fdd9bdab69346ffb8a1ee5aa9647e9a7f8b958
2020-04-09 20:47:58 +00: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
2bdbefa23f Merge "Add filegroup for trout project to use VehicleHalProto definition" into rvc-dev am: 03a34b7964 am: 91c9d6f16e am: 0b46f3eb21 am: 0662d5a277
Change-Id: I9819a2ceec2a757a57777164db3cda4a674d5051
2020-04-07 21:34:12 +00:00
TreeHugger Robot
451ea9a14e Merge "Add filegroup for trout project to use VehicleHalProto definition" into rvc-dev am: 03a34b7964
Change-Id: Icafe246cdc3bc69d55f9dc713bf59d04e7c2739d
2020-04-07 20:18:46 +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
04df530681 Merge "Override VHAL property init value with json" into rvc-dev am: 0c8803cb75 am: 1fc6ac7c9d am: 4b56583b25 am: d609dc7886
Change-Id: If38405f94a3113ca049f0b3a597c5384f4898e06
2020-04-07 19:16:44 +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
TreeHugger Robot
8024de7fcc Merge "Implemented SWITCH_USER in the emulated User HAL." into rvc-dev am: 5a8697164d am: 4d4556aacd am: 6bd37ccfa4 am: 7a9c5dcaae
Change-Id: Ifb913d4610d80cd8642ab3832581232a97a222bd
2020-03-31 00:59:12 +00:00
TreeHugger Robot
4d4556aacd Merge "Implemented SWITCH_USER in the emulated User HAL." into rvc-dev am: 5a8697164d
Change-Id: I94ff3ceec6ae85b25ea5f9f89526713f896cccb8
2020-03-30 23:58:28 +00: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
e290b293d0 Merge "Add timestamp for continuously property." into rvc-dev am: e5a22f2fa1 am: 668f6889dd am: e8b5b7b482 am: 5169e0b0f4
Change-Id: Ie4b312703a4348b42b0d3f087d7ac1efdd304e03
2020-03-18 19:05:55 +00:00
Kai Wang
668f6889dd Merge "Add timestamp for continuously property." into rvc-dev am: e5a22f2fa1
Change-Id: I5ee32d0f9a88c46f021434dbb6270815bcbe74f8
2020-03-18 17:55:54 +00:00
Kai Wang
6780365567 Merge "Add timestamp for continuously property." into rvc-dev am: e5a22f2fa1
Change-Id: I704d3a902c9077cddb3aa8be4a057371db7d3b6a
2020-03-18 17:55:37 +00: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
Huihong Luo
ffb22ec965 Merge "Don't send brightness to car service inside Emulator" 2020-03-11 16:49:24 +00:00
Automerger Merge Worker
c70775f853 Merge "Bugfix: add "override" explicitly to make the compiler happy" into rvc-dev am: 8f3fee6216 am: 72d170ffb7 am: 104b9d3367 am: 1665d91e76
Change-Id: I2006463f0b03570c3a229362cb85b402008086e5
2020-03-10 22:01:38 +00:00
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
Kai
42a26244ad Add Speed_Display_Units property in DefaultHal
Update properties for DefaultHal and it is also be a code
sample for adding new properties.

Bug: 134988550
Test: flash it and verify property by kitchenSink
Change-Id: Iedf3ea5b288acfe95b3c676d90660435b34ed367
2019-06-22 01:52:02 +00:00
Prachi Hande
a5bd3ffd11 Merge "Updated a method name in VmsUtils." into qt-dev
am: 1f968cd87c

Change-Id: Iaf6cfb281fbdfb786a96ced641017a20da9cd4be
2019-06-21 13:33:58 -07:00
Prachi Hande
a9c6df2ba9 Updated a method name in VmsUtils.
Corrected "CreateDataMessageWithLayerPublisherInfo" to "createDataMessageWithLayerPublisherInfo"

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

Change-Id: Ie5e130e125b90689d13a3f9bb8fa1f2f8a2bcbe0
2019-06-19 19:11:29 -07:00
Prachi Hande
deb18b68e7 Merge "VMS Utils: Fixed createDataMessage method." into qt-dev
am: 20ee67c070

Change-Id: I43dc16f65aaf480eec3988df47fb21ea0a15b4f8
2019-06-19 14:52:59 -07:00
Prachi Hande
20ee67c070 Merge "VMS Utils: Fixed createDataMessage method." into qt-dev 2019-06-19 21:11:56 +00:00
Prachi Hande
258c7c2504 VMS Utils: Fixed createDataMessage method.
Before, it used to process only the payload but now it also
takes in VMS layer info and publisher ID.

Bug: 135051289
Fixes: 135051289
Test: Updated unit tests in VmsUtilsTest. Ran the tests on Hawk.
Change-Id: I6c11f95a815af5d7b9fc9288692285766d2ca98f
2019-06-17 13:47:50 -07:00
Mark Tabry
8972707256 Merge "Move START_SESSION definition to bottom of VmsMessageType." into qt-dev
am: 977d275a9a

Change-Id: I0a2d667d066701e55636283da564ae7f7bb2e392
2019-06-17 13:21:35 -07:00
Mark Tabry
56ff57b4ce Move START_SESSION definition to bottom of VmsMessageType.
Bug: 130313799
Test: N/A
Change-Id: Iaa1be8f047c58491970b5aaa0dfab4e418164dee
2019-06-14 10:34:43 -07:00
Kai Wang
4a012c1dda Merge "Add number of ticks in HW_KEY_INPUT" into qt-dev
am: 4522783767

Change-Id: I893402874ef3a72dfedaf457d0ac3a21d3dc9619
2019-05-30 13:55:44 -07:00
Kai Wang
4522783767 Merge "Add number of ticks in HW_KEY_INPUT" into qt-dev 2019-05-30 20:27:14 +00:00
Kai
26dcce67aa Add number of ticks in HW_KEY_INPUT
Bug: 132291593
Test: build and flash
Change-Id: I0baf4d8bbb802f724122d63cd19af5c5f9f4ddfb
2019-05-29 21:16:47 +00:00
Kai Wang
9096e933d3 Merge "Update VHAL documentation" into qt-dev
am: 68fa370815

Change-Id: I7a17925b6ed288616c8109ead69a38b266545f8a
2019-05-21 13:43:44 -07:00
Kai Wang
68fa370815 Merge "Update VHAL documentation" into qt-dev 2019-05-21 18:45:48 +00:00
Kai
ac4edf053e Update VHAL documentation
Clarify when range in VehcileAreaConfig need to be specified.
Change Range_remaining to be read only.
Update docmentation about Night Mode.

Bug: 126908895
Bug: 128607457
Test: Flash and build
Change-Id: Ifcf92bcc9eed3859d8a846d55e824c2b00d61d19
2019-05-20 17:33:33 -07:00
Kai Wang
52281d32a2 Merge "Add configArray for HVAC_TEMPERATURE_DISPLAY_UNITS" into qt-dev
am: 728455da65

Change-Id: I063cc867e8d13be511f7685b8c8179b4892b6cf4
2019-05-15 19:11:05 -07:00
Kai Wang
728455da65 Merge "Add configArray for HVAC_TEMPERATURE_DISPLAY_UNITS" into qt-dev 2019-05-16 00:51:17 +00:00
Kai Wang
0cd91ad832 Merge "Add property for vehicle speed" into qt-dev
am: 0664dba927

Change-Id: I4fd87ed8461f68377090f01e56d3b802c6cc4e9d
2019-05-15 15:24:42 -07:00
Kai Wang
0664dba927 Merge "Add property for vehicle speed" into qt-dev 2019-05-15 21:13:46 +00:00
Prachi Hande
991f3e8a2b Merge "Add utility methods to create and parse handshake messages." into qt-dev
am: c62ce9d611

Change-Id: I1afa87ebfbf90e630e082061c84eb00e32a6ca36
2019-05-14 15:45:02 -07:00
Prachi Hande
2bc0c5f292 Add utility methods to create and parse handshake messages.
Bug:131165419
Fixes: 131165419
Test: Added new unit tests for both the new functions in VmsUtilsTest.
Ran the tests on Hawk.
Change-Id: Ie750983762b5706054ace35c5671f88b6457477a
2019-05-14 11:55:39 -07:00
Mark Tabry
1ed3e4b67c Merge "Adds VMS START_SESSION message type and message definition." into qt-dev
am: 2d8ce13d14

Change-Id: I024804fcc4c2109c2d0e5e9f86e4fbcabdebf43b
2019-05-10 23:47:14 -07:00
Kai
8b6484bce6 Add property for vehicle speed
Add proerty and units for vehicle speed.

Bug: 131715430
Test: build and flash
Change-Id: I4b34808b75d76385d0b1b76530889f69bd945c84
2019-05-10 12:49:26 -07:00
Mark Tabry
0862fabdbe Adds VMS START_SESSION message type and message definition.
Bug: 130313799
Test: No tests affected. VmsUtils support will be added in a separate CL.
Change-Id: I1c7b713b85f191b057051737ca6bbdd0ae9bc170
2019-05-09 15:38:44 -07:00
Kai
8acfc0ce73 Add configArray for HVAC_TEMPERATURE_DISPLAY_UNITS
Add configArray for HVAC_TEMPERATURE_DISPLAY_UNITS

Bug: 80298447
Test: build
Change-Id: Ie4fb6ea78f4a4c1337420db8d9b6d545fd9f377c
2019-04-30 00:13:55 +00:00
Steven Moreland
6d494b2346 Merge "Update hidl makefiles for bpfmt" am: ff0bd741ca
am: 96f40f7b02

Change-Id: Idbf030e4993067bdb8181321bca2de00c9b6f7ef
2019-04-18 14:34:45 -07:00
Steven Moreland
1ae4615d9f Update hidl makefiles for bpfmt
hidl-generated makefiles are now generated such that bpfmt(file) == file.

Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
2019-04-17 09:38:50 -07:00
Prachi Hande
cde1aa9617 Updates to VMS Utils to support HAL Client Publisher
1. Added new API/utility functions to support publishing VMS messages from HAL client.
2. Fixed creation of offering message by adding publisher ID
3. Fixed an existing failing test from VmsHalManager_test.cpp

Bug: 129475485
Bug: 129163926
Fixes: 129475485
Fixes: 129163926
Test: Added tests for all the new and updated functions in VmsUtilsTest.
Ran the tests on Hawk.
Change-Id: Ie561dafb86d137a4fdf3042e033f8cb133b4aca7
2019-04-02 17:51:21 -07:00
Kai Wang
ba464daf31 Merge "Add VHAL params for fuel economy and units" 2019-03-20 18:19:54 +00:00
Kai
8675df05d7 Add VHAL params for fuel economy and units
Add Units: US_GALLON and IMPERIAL_GALLON
Add property: FUEL_CONSUMPTION_UNITES_DISTANCE_OVER_VOLUME

Bug: 127734378
Test: make and flash
Change-Id: Id11501e6dd6ea43fdbda29cccc10ec954e5c3cc4
2019-03-19 12:08:16 -07:00
Steven Moreland
8780306ce3 Merge "Remove VehicleApPowerStateConfigFlag comment." am: 336bba076f am: 6acd292bf5
am: 7467de0d4d

Change-Id: I4d23ea4066ad6a398efde3f9f1a65807b284a37e
2019-03-11 19:43:46 -07:00
Kai Wang
0bfb124a97 Merge "Add an annotation for property" 2019-03-11 18:17:49 +00:00
Steven Moreland
4bd35050c3 Remove VehicleApPowerStateConfigFlag comment.
Since interface is unfrozen, removing comment.

Bug: 124382459
Test: N/A

Change-Id: I7cbae55f2d34c794be3d38d61181eda0d7dbaeac
2019-03-08 16:37:13 -08:00
Steven Moreland
2503e39b4b Update automotive makefile.
Bug: 123976090
Test: N/A
Change-Id: I34add915c896b4b5fcbcfa0ad0c42950fff9e9fc
Merged-In: I84b659b163b63d39535b462a3df8a9c19f680976
2019-03-05 01:29:21 +00:00
Kai
7054ac55b8 Add an annotation for property
Add enum annotation for HVAC_TEMPERATURE_DISPLAY_UNITS

Bug: 126925065
Test: make and flash to HU
Change-Id: I083fee4401a3f6e43e69d86ff0e851cbc5ae32e2
2019-03-04 16:14:29 -08:00
Steven Moreland
b91ac5c6a0 Update makefies: no 'types' internal
Bug: 123976090
Test: N/A
Change-Id: I84b659b163b63d39535b462a3df8a9c19f680976
2019-03-04 14:09:25 -08:00
Kai Wang
e09b39a6c6 Merge "Add and update VHAL Properties and permissions" 2019-02-27 06:02:03 +00:00
Kai
53cc4ffafc Add and update VHAL Properties and permissions
Add and update VHAL properties and permissions.

Bug: 112435211, 120095752
Test: build and run on HAWK
Change-Id: Ia750a472e0185a6f858d23e638c535f67bc86c00
(cherry picked from commit fa638809675178b2f517f02b85bd372b47c08cf2)
2019-02-26 20:58:06 +00:00
Kai
b1fc16aab5 Fix vts-hal-auto test
Add min/maxSampleRate for some properties and add new static
properties.

Bug: 112596543
Test: Build and flash into Mojave
      Run vts-hal-auto test

Change-Id: Ide0c09e4790770e5415ca223b2e09f5958b5e783
(cherry picked from commit 3acc549fa87fbe19b181edea39eead0772f75822)
2019-01-29 17:46:28 -08:00
Gregory Clark
ea1fe59370 Add a trunk and sunroof.
Bug: b/118139582
Test: Get and set the VHAL properties.

Exempt-From-Owner-Approval: Nobody on the owners list works on AAE.

Change-Id: Ib2274a7f347d962d80ce9213c4ae17a2f44b74ad
(cherry picked from commit 6ef517989fb25a39536c65b1636c1292f8bdcec1)
2019-01-14 18:40:32 +00:00
Kai Wang
8b4548ca32 Merge "Add comments for some properties." 2019-01-08 18:34:36 +00:00
TreeHugger Robot
78493e31e0 Merge "Update owners for automotive HALs" 2019-01-08 06:01:19 +00:00
Scott Randolph
6ea0d8c60a Update owners for automotive HALs
Test:  No functional change
Change-Id: I3f4a51b6533d3383e299731e048c773737c02cd3
2019-01-07 19:22:13 -08:00
Kai
066b20d749 Add comments for some properties.
Descible hebavior for VHAL property set with value out of bounds
Change comments.

Bug: 112204545
Test: build and flash
Change-Id: I48cf2f8dfb8a175992535db17d8f69e8fde1f34c
(cherry picked from commit 2234dc2e4f3d55ea9e8cbb4ec11544ca0207625d)
2019-01-07 14:55:07 -08:00
Chih-hung Hsieh
df66e3cb29 Merge "Fix performance-for-range-copy warnings" am: d01f7050ac am: 51e835ce22
am: 86fefab5e9

Change-Id: Ib139d710d47a7a51e24ba8ba582b252f5ff6e244
2018-12-17 14:09:52 -08:00
Chih-Hung Hsieh
65ab67312b Fix performance-for-range-copy warnings
Bug: 30413223
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,performance*
Change-Id: I1b76a22eab100a31e77048626e48169fe7eeaf92
2018-12-17 19:57:21 +00:00
Gregory Clark
b06432c9fa Added the DOOR_POS and WINDOW_POS properties.
Bug: b/111797715
Test: Set and get the properties.

Exempt-From-Owner-Approval: Nobody on the owners list is left on AAE.

Change-Id: I24b79ffed2e53dd260f482d6fa00ea05f3fb073a
(cherry picked from commit 6e90b0e9660e5bb9fa5c48a7c601ac4a9117f398)
2018-12-14 22:00:34 +00:00
Keun Soo YIM
68ae05dd2d pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Merged-In: I363450d205868f900e4925ccff1430e2a569f2a4
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-12-07 10:49:56 -08:00
Keun Soo YIM
ff84c37bc1 pack VTS cc_test binaries as general-tests
Test: make general-tests
Bug: 120093339
Change-Id: I363450d205868f900e4925ccff1430e2a569f2a4
2018-11-27 16:11:41 -08:00
Jordan Jozwiak
8cbf1aae08 Update HVAC_POWER_ON config array to correct values
Bug: 119687687
Test: Build and install.

Exempt-From-Owner-Approval: Trivial change. Updating old int value.

Change-Id: Idf3c89f330303b79a2ddfd336402546ccae31f16
(cherry picked from commit 005ec2d45418c190391a1ad17fba3e8bd64e3198)
2018-11-22 00:47:51 +00:00
Steve Paik
d217630d40 Fix Default VHAL to send ON request when device boots
Bug: 117947229
Test: Reboot Mojave, it stays on
Change-Id: Ia36d71343e43d59c07dc76b3cc7b7d45376d898c
(cherry picked from commit b91f9c3bad3948cb5804949a858835219e9aeac3)
2018-10-22 16:29:27 +00:00
Steve Paik
55367e6102 Refactor Power Management
- Remove Boot Reason property
- Add extra states to AP_POWER_STATE_REPORT

Bug: 112548962
Test: vhal_emulator.py

Change-Id: I96662820a02141256c53546db662d1e05e1925ae
(cherry picked from commit b863f86ff7fad325c66c9a47a3a3e18a602adab3)
2018-10-17 22:23:02 +00:00
Gregory Clark
49e24cad30 Merge "Add the window lock property." 2018-10-10 20:43:43 +00:00
Gregory Clark
2c820039ca Add the window lock property.
Bug: b/80429405
Test: Call carPropertyManager.setIntProperty
Change-Id: I465c82f6735e714cd26397de281025e69f3e4c38
(cherry picked from commit d9ed04473eaa633a60a8f8a234a024c9816f4db9)
2018-10-10 16:45:49 +00:00
Gregory Clark
3e6403b5bf Update the DOOR_LOCK property to have WRITE access.
Bug: b/80427694
Test: Call carPropertyManager.setBooleanProperty
Change-Id: I78eded9a30b24dd0e977fc6dec1e085685344ed7
(cherry picked from commit e746aab48a5446108a7cb5237a477a0561d742c6)
2018-10-06 00:35:53 +00:00
Steve Paik
f38f62a1d4 Add STEERING_ANGLE property
Bug: 80551979
Test: Added property to VHAL
Change-Id: Ie6310d85af9bf0aebe63f0f2fdbac9a75c32b1ec
2018-09-14 17:26:20 +00:00
Jordan Jozwiak
c72501342a Add the INFO_DRIVER_SEAT property.
Bug: b/113356861
Test: Build and install.
Change-Id: I07963fd94aca1a2e83d968f85daa78be7ab90fd9
(cherry picked from commit e4d470dc3adc5ba2b35abcdc61e37927953c36d4)
2018-09-11 20:47:17 +00:00
Steve Paik
4569ca2f88 Add detail to FUEL_LEVEL_LOW to include all energy types
Bug: 109700633
Bug: 109740025
Test: Comment change only
Change-Id: Ief87c4a82d965187f0d8f00fd226e4d539c58643
(cherry picked from commit 9108bc896655541d087dc3a457e8429f45b9d8eb)
2018-08-28 04:26:38 +00:00
Gregory Clark
61a7bbcb77 Add the HVAC_FAN_DIRECTION_AVAILABLE property.
Bug: b/111371726
Test: Build and flash.
Change-Id: I586e607e313792dae689b82f411db94bf22982aa
(cherry picked from commit a5b4872c616c8f9fa983fad8ed8ef77e1edef618)
2018-08-23 18:40:02 +00:00
Jordan Jozwiak
a8e73abffe Add the HVAC_SEAT_VENTILATION property.
Bug: b/111610946
Test: Build and install.
Exempt-From-Owner-Approval: Add property for HVAC_SEAT_VENTILATION
following existing pattern
Change-Id: I71c23d01c35d9db76eb8d4845e6bb9ce4257defb
(cherry picked from commit 2158eccd4bd139a29f14a041c6de60831a2405a7)
2018-08-22 15:52:50 +00:00
Jordan Jozwiak
510fff3675 Merge "Add the HVAC_SEAT_TEMPERATURE property." 2018-08-22 15:47:13 +00:00
Jordan Jozwiak
782ef26b41 Add missing VHAL properties
Bug: b/111500076
Test: Build and install.
Change-Id: I32bfd33ce050ab6ffc886e2ba63b99bd5a33ad31
(cherry picked from commit 85df08f4fe94fd6dfedd6d7def5192cf1f7ce2c4)
2018-08-21 22:17:18 +00:00
Jordan Jozwiak
c0ce8b2a10 Add the HVAC_SEAT_TEMPERATURE property.
Bug: b/111564723
Test: Build and install.
Change-Id: I37184aff227910a91adcb810078b578764fa56ec
(cherry picked from commit 7cc52cdaa6c2d37edbdc87a456a59d2e74591f9d)
2018-08-21 22:15:04 +00:00
Steve Paik
61b24e3a44 Add PERF_VEHICLE_SPEED_DISPLAY
Bug: 110881960
Test: none
Change-Id: I486d71bb00e2d943293e5e5567f4dbb0c35e39b0
2018-08-07 09:25:14 -07:00
davidln
cfb94787ea Propagate set events in the emulated vehicle HAL.
Bug: 110105682

Test: build, deploy, test updating temp via app UI, temp change reflected in subscribed system UI
Change-Id: I75e6825ff9450f977c1f5d7f2b97bca6c78f1883
(cherry picked from commit 6d8110ffbf7e964246c13810d909b3a5cf7818b6)
2018-07-25 15:46:24 +00:00
Dean Harding
bea881c9a1 Make the emulated VHAL always listen for socket connections.
Previously, when running under the emulator, it would only connect to
the emulator's qemu pipe and you couldn't script the emulated VHAL.

Also changed the logic of SocketComm so that it supports connections
from more than one client at a time.

Bug: 87643732
Test: tested locally
Change-Id: I504cd806f0a95799a68b75c3515c1f230109f1d0
(cherry picked from commit 8dad67a0148114cb60f3567268bc2cf40ff18f82)
2018-06-26 21:17:15 +00:00
Chao Yan
454d4ef594 Generate VHAL property mixed type from JSON
Bug: 76017041
Test: atest VehicleHALTest
Change-Id: Iaf2f01f71e2eee6478de0aadd2fe2bd13a385404
2018-06-22 10:52:25 -07:00
Steve Paik
9ab31039e2 Add example vendor extension properties
Bug: 110415164
Test: EKS Property Test
Change-Id: Ia1815376d96141ef4401eb4784b81ad4ed889c63
2018-06-21 11:09:15 -07:00
Chao Yan
e2d0c55739 Merge "Added support for multiple VHAL generators" 2018-06-06 20:45:20 +00:00
Chao Yan
0f85dd1684 Added support for multiple VHAL generators
Using priority queue to schedule multiple VHAL event generators

Bug: 76017041
Test: atest VehicleHALTest
Change-Id: I6bc8071cafd12334dfe37d4f3808530836aec4df
2018-06-05 16:42:01 -07:00
Steve Paik
44b0283f6c Add initial values for properties
Cleanup defaultconfig.h to have proper initial values so that all
properties may be tested with EmbeddedKitchenSink.

Bug: 109674339
Test: Embedded Kitchen Sink
Change-Id: I3007c645b90b0e6805b8d1011c3a8d659eb13d2b
2018-06-04 21:07:39 +00:00
Steve Paik
57b63bd356 Fix tire pressure sensor property
Update comment to remove reference to unused min/max values

Bug: 80102628
Test: comments updated
Change-Id: I9555ac2e6c274b52e01ce9555e8403b2b94a5036
2018-05-23 18:03:16 -07:00
Scott Randolph
3fea05cd40 Fix name of Wheel to VehicleAreaWheel
All but this enum follow the naming pattern.  Now Wheels do too.

Test:  Build Mojave and Owl
Bug: 79995183
Change-Id: Ifa9efd50aaae13ac7f437c5efe8cf70aa64218e9
2018-05-21 18:27:39 -07:00
TreeHugger Robot
cf31bf85a9 Merge "Remove ConfigFlags" into pi-dev 2018-05-21 22:26:28 +00:00
Steve Paik
3de778f448 Remove ConfigFlags
ConfigArray replaces the need for configFlags.  Deprecate this before it
gets released.

Bug: 74133619
Test: grep -ril configflag shows all instances removed
Change-Id: I645862507959738eb2739e70a53827b749e88aeb
2018-05-16 17:48:49 -07:00
Steve Paik
de2feefd4d Update default config areaId's
Bug: 79752968
Test: Embedded Kitchen Sink

Change-Id: I9b32c22ae2f141c1ead7d3969186fa513e785ccf
2018-05-16 15:45:51 -07:00
Kiran Rachuri
e9a39e2714 Update types.hal comments
(1) Specify rules for property to area mapping
(2) Fix comment for WHEEL_TICK property
(3) Document the need for supported gears from vhal. CURRENT_GEAR and GEAR_SELECTION should report the list of available gears in the vehicle. This helps in determining the driving state of the vehicle.
Merge changes from ag/4051112 ag/4026897

Bug: 79434788
Bug: 77849652
Bug: 79260189
Test: Build and Flash
Change-Id: Ib2bd488a5ec09fe3bdf8807c253aebcdb240324b
2018-05-15 17:18:09 +00:00
Chao Yan
7a53d3e9af Merge "Added fake VHAL value generator based on JSON file" into pi-dev 2018-05-10 22:41:17 +00:00