Commit graph

1329 commits

Author SHA1 Message Date
Steven Moreland
77b74ffc0a Merge "CHECK -> CHECK_EQ copy pasta" am: a8138bfbf6 am: dd39b5c9d0 am: f711c9d406 am: 53c7517b02
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1921302

Change-Id: I3f32bf37c1c025e82e14ee6c9f0ffde87f6bcbd6
2021-12-14 18:40:32 +00:00
Steven Moreland
53c7517b02 Merge "CHECK -> CHECK_EQ copy pasta" am: a8138bfbf6 am: dd39b5c9d0 am: f711c9d406
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1921302

Change-Id: I9b89252729e62a12050df91ee7f7747895ae905e
2021-12-14 18:22:29 +00:00
Steven Moreland
dd39b5c9d0 Merge "CHECK -> CHECK_EQ copy pasta" am: a8138bfbf6
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1921302

Change-Id: I1a2df79239155845652d5e062c7f74d97bca2ae7
2021-12-14 17:50:59 +00:00
Steven Moreland
ffb03995e6 CHECK -> CHECK_EQ copy pasta
Hey did I start this? We can take a little bit better errors. :)

Bug: N/A
Test: N/A
Change-Id: I0e96f7f49dae9968904333da9b8269694058c11c
2021-12-14 01:45:47 +00:00
Yu Shan
498b6b7856 Change the VHAL service name.
Change the VHAL service name.

Test: Manually build and test on emulator.
Bug: 209718034
Change-Id: If6d654648d8d7b197c1c75b7de024bbadcec2122
2021-12-09 15:49:43 -08:00
Yu Shan
d9ce3c88df Change IVehicleHardware callbacks to shared_ptr.
Use shared_ptr for hardware callbacks so that same callback could
be reused for multiple hardware calls.

Test: atest DefaultVehicleHalTest
atest FakeVehicleHardwareTest
Bug: 200737967

Change-Id: I2a005bbf77241fe2c85f871690c8aef18e770b69
2021-12-09 15:49:28 -08:00
TreeHugger Robot
01649e0b4d Merge "Beef up the documentation of VehicleApPowerStateReq" 2021-12-01 20:33:12 +00:00
Yu Shan
f9dcdea9f4 Add Java equal and toString annotations.
Add annotations so that the Java backend would generate equals and
toString methods, which would be useful in our code.

Test: Manual build.
Bug: 205774940
Change-Id: Ib08c5f42d29c6d028abcaa1a577147d1495cf550
2021-11-23 17:14:07 -08:00
Yu Shan
7a1c24fd5f Create ConnectedClient to manage VHAL clients.
Create a class to represent each VHAL client for each operations.
This class would manage the pending requests and maintain callbacks
that should be called when we get the result for async requests or
when the request time-out.

Test: atest DefaultVehicleHalTest
Bug: 200737967
Change-Id: I0e0be46f4a77b5dd5569fa949f67618a9aa9ac73
2021-11-16 15:45:03 -08:00
Yu Shan
8c24b293eb Add MockVehicleCallback for testing.
Test: None
Bug: 200737967
Change-Id: I2d34138a865be684720a1e0582cc9ea5a8a8ff04
2021-11-16 15:45:03 -08:00
Yu Shan
a8bc472e43 Add ParcelableUtils.
Add some helper functions to manage parsing/marshaling large
parcelable.

Test: None.
Bug: 200737967
Change-Id: I48729915aafe6d23de725e38ca5f653ba3147253
2021-11-16 15:45:03 -08:00
Eric Jeong
9e2b9e3f0e Beef up the documentation of VehicleApPowerStateReq
- HIBERNATION_ENTRY and HIBERNATION_EXIT are added next to
DEEP_SLEEP_ENTRY and DEEP_SLEEP_EXIT.

Bug: 206690574
Test: build okay
Change-Id: I157bb4798babd415f9a6302ce45aeb2560a505fd
2021-11-16 15:15:37 -08:00
Xin Li
8f6d361f15 Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I96a417467346a57b13c2efae12a183d78506afc3
Change-Id: I570a3b599281f519af7a440562c83f8484684fd5
2021-11-10 08:05:55 +00:00
Yu Shan
b33ac200cc Implement getPropConfigs in Default VHAL.
Test: atest DefaultVehicleHalTest
Bug: 200737967
Change-Id: Id0152cb2dbf489f5d709845108b87961f6d9a019
2021-11-03 16:11:47 -07:00
Yu Shan
23fcad97b1 Use FakeUserHal in FakeVehicleHardware.
Handle fake user hal properties in FakeVehicleHardware.

Test: atest FakeVehicleHardwareTest
Bug: 201830716

Change-Id: Ia60bbf7ae6a0fc5909dc8d27363af5c9939055d3
2021-11-01 22:29:12 -07:00
Yu Shan
7ed3aeb6ff Migrate fake user hal.
This CL mostly copies the existing user hal library with minor
modifications to use new AIDL type.

Test: atest FakeUserHalTest.
Bug: 201830716
Change-Id: I2bf4e96fb9fd71242e01f89c92cf743f7287ef64
2021-10-29 13:58:09 -07:00
Yu Shan
18198d7c51 Add special logic handle setting some props.
Add special logic to handle setting OBD2 properties and
VEHICLE_MAP_SERVICE.

Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: I9b136efc452944e6c393c12feca14942919993c7
2021-10-29 13:58:09 -07:00
Yu Shan
bfc7030ee4 Migrate FakeObd2Frame to AIDL.
Test: atest FakeObd2FrameTest
Bug: 201830716

Change-Id: I1d83db2b0a1eb08ddc86c2a6106403edb73b6536
2021-10-29 13:58:09 -07:00
Yu Shan
27bfe01fc5 Migrate Obd2SensorStore.
Test: atest FakeObd2FrameTest
Bug: 201830716
Change-Id: Ibd460ab4c129707d567689d90979ca0424551a64
2021-10-29 13:58:06 -07:00
Yu Shan
a311631992 Add logic to handle special set values.
Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: Ibecae5f917148d42a806c2a76faec4eac6d9ec7c
2021-10-28 18:30:03 -07:00
Yu Shan
b63d94be3c Change user flags to be bit map of flags.
Remove UserFlags enum. Change the flag field in UserInfo to be
bitmap of user flags.

Test: None
Bug: 202520478
Change-Id: Ia1837dde783b92dde830ee1244d38dfb684d546a
2021-10-28 18:30:02 -07:00
TreeHugger Robot
bef03540bc Merge "Add vendor override property to fake VHAL hardware." 2021-10-27 17:48:39 +00:00
TreeHugger Robot
a584ed0cd7 Merge "Using a manifest fragment" into sc-v2-dev am: fe342525b2 am: 8d5db93057
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16068072

Change-Id: Ic195aff1812e4ecdd5483a7fd331f6d73b08ec73
2021-10-27 05:27:35 +00:00
TreeHugger Robot
8d5db93057 Merge "Using a manifest fragment" into sc-v2-dev am: fe342525b2
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16068072

Change-Id: Iaa561429882703c11300636bd78e0a3b1b568ded
2021-10-27 05:08:00 +00:00
TreeHugger Robot
fe342525b2 Merge "Using a manifest fragment" into sc-v2-dev 2021-10-27 04:04:59 +00:00
TreeHugger Robot
e56bf6b9b5 Merge "Add EXTERNAL_CAR_TIME property in the Vehicle HAL." 2021-10-26 20:40:13 +00:00
Felipe Leme
53f9948c62 Merge "Parse user flags as flags instead of enum." am: 8bfd990678
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1869945

Change-Id: I6a14d852008dd847c289c8430e4d6c3932f0bc03
2021-10-26 20:11:37 +00:00
Yu Shan
68cb8c04e8 Parse user flags as flags instead of enum.
The flags field in UserInfo is a int32_t that contains multiple
UserFlags 'or'ed together. We should not parse it as enum.

Test: atest android.hardware.automotive.vehicle@2.0-utils-unit-tests
Bug: 202520478
Change-Id: Ie7e81a8a5f39f6070e35f2e77bce88a211fd526b
Merged-In: Ie7e81a8a5f39f6070e35f2e77bce88a211fd526b
(cherry picked from commit 5c0ec3f1de)
2021-10-26 19:39:48 +00:00
Yu Shan
d7575f7672 Add vendor override property to fake VHAL hardware.
Allow vendor to override default properties in fake VHAL hardware.

Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: Ie6061d7a8123e3b22c6fa467639f1fe77dec222c
2021-10-25 17:36:32 -07:00
Yu Shan
04e371dc3f Merge "Update epoch time property name." 2021-10-25 22:04:11 +00:00
Yu Shan
f242d50b18 Update epoch time property name.
The EPOCH_TIME is renamed to ANDROID_EPOCH_TIME in ag/16039960.

Test: Presubmit
Bug: 204104488
Change-Id: Icba29460d608734d6b6f708caf148871c0efba46
2021-10-25 14:16:04 -07:00
TreeHugger Robot
07a3abf2a5 Merge "Parse user flags as flags instead of enum." into sc-v2-dev am: f8183c2914 am: ebb0fb0ccb
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16095300

Change-Id: I0bf66295b013462d595464a6fb2889ae4fda4924
2021-10-25 20:57:42 +00:00
TreeHugger Robot
ebb0fb0ccb Merge "Parse user flags as flags instead of enum." into sc-v2-dev am: f8183c2914
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/16095300

Change-Id: I3cd4fb0735dfbce84cf2df293c612988c15d3c8d
2021-10-25 20:47:31 +00:00
TreeHugger Robot
f8183c2914 Merge "Parse user flags as flags instead of enum." into sc-v2-dev 2021-10-25 20:33:59 +00:00
Yu Shan
d963db98f3 Merge "Migrate fake value generator." 2021-10-25 20:04:03 +00:00
Yu Shan
4ef92a9438 Merge "Migrate fake value generator hub." 2021-10-25 20:03:56 +00:00
TreeHugger Robot
a4865ca558 Merge "Support set/get value in fake vehicle hardware." 2021-10-25 20:03:39 +00:00
Yu Shan
5c0ec3f1de Parse user flags as flags instead of enum.
The flags field in UserInfo is a int32_t that contains multiple
UserFlags 'or'ed together. We should not parse it as enum.

Test: atest android.hardware.automotive.vehicle@2.0-utils-unit-tests
Bug: 202520478
Change-Id: Ie7e81a8a5f39f6070e35f2e77bce88a211fd526b
2021-10-25 12:36:27 -07:00
Ashutosh Agarwal
bb11285156 Add EXTERNAL_CAR_TIME property in the Vehicle HAL.
This property will be used to sync time between external ECUs and AAOS.

Bug: 157504928
Bug: 202376653
Test: build
Change-Id: Idb095246a786a771af7f31516b90098c1470e1ab
2021-10-25 17:50:26 +00:00
TreeHugger Robot
00836281ff Merge "Update Documentation and name for EPOCH_TIME to ANDROID_EPOCH_TIME." 2021-10-25 16:56:59 +00:00
TreeHugger Robot
9d29ac6c71 Merge "Update VtsHalEvsV1_1TargetTest" into sc-v2-dev am: 7630dd9f4f am: 6a5253c763
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15973919

Change-Id: I9ba97e1d23e89fd70bf4960563deddba224efe15
2021-10-24 15:39:00 +00:00
TreeHugger Robot
6a5253c763 Merge "Update VtsHalEvsV1_1TargetTest" into sc-v2-dev am: 7630dd9f4f
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15973919

Change-Id: If8328ed7aa95612f37658402508132f8841c3a5e
2021-10-24 15:24:25 +00:00
Changyeon Jo
9b3c9adb71 Using a manifest fragment
Fix: 203414344
Test: m -j and start CAN services
Change-Id: I423ab883d959f234a52adf680fae91bf264bea8b
2021-10-21 09:12:47 -07:00
Ashutosh Agarwal
1d9f2eb6f8 Update Documentation and name for EPOCH_TIME to ANDROID_EPOCH_TIME.
This is a change in behaviour for ANDROID_EPOCH_TIME property to align it with a future revisions.

This change was submitted to VHAL HIDL in http://ag/15618006.

Bug: 157504928
Bug: 202379958
Test: build using `make -j96 android.hardware.automotive.vehicle-V1-java`
Test: atest VehicleHalDefaultConfigTest

Change-Id: I464b9215f4bdcbbf53c1239b6d38f9940248b5cf
2021-10-21 05:24:57 +00:00
Yu Shan
f2b8b8f9ae Migrate fake value generator.
Test: atest FakeVehicleHalValueGeneratorsTest
Bug: 201830716
Change-Id: Ic113c9b189a07140a288d6d03d3a8a2b9061881f
2021-10-20 11:13:09 -07:00
Yu Shan
7987654ed6 Migrate fake value generator hub.
Migrate fake value generator hub. This CL also turns all exising
LockGuard to ScopedLock.

Test: atest FakeVehicleHalValueGeneratorsTest
Bug: 201830716
Change-Id: I3ce64792fa5a49ae5e11e1fc5636a30221c596e6
2021-10-20 11:13:08 -07:00
Yu Shan
b219ef0b5f Support set/get value in fake vehicle hardware.
Support setValues and getValues in fake vehicle hardware
implementation.

Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: I4b94408434fd8511ab79d757116b776105d69222
2021-10-20 11:09:44 -07:00
Yu Shan
5ec4f372e9 Migrate ConcurrentQueue.
Test: atest VehicleHalVehicleUtilsTest
Bug: 201830716
Change-Id: I78671befd8351f17bf3da43372ec302e106690de
2021-10-20 11:09:44 -07:00
Yu Shan
5bd6aefe99 Add error code to VeiclePropertyStore.
Add error code to differentiate between different error cases, e.g.
when the value is not configured v.s. the value is not set.

Test: atest VehicleHalVehicleUtilsTest
Bug: 201830716
Change-Id: I1ef0716edce5bc72e07a769026769a330b4e3025
2021-10-19 17:04:38 -07:00
Yu Shan
8e7f780484 Add fake vehicle hardware implementation.
Add a fake vehicle hardware implementation that uses default config.
This would be used in emulator.

Test: atest FakeVehicleHardwareTest
Bug: 201830716
Change-Id: If93bdebb5c82b947a327688db80978fc4cb46d3c
2021-10-19 17:04:37 -07:00