Commit graph

460 commits

Author SHA1 Message Date
Yu Shan
ede3c2aafb Update comment for SUPPORTED_PROPERTY_IDS.
Test: None
Bug: 246606989
Change-Id: Ic8aa060bae2577229e96ce7b113bf1d452784dcd
2022-09-13 19:01:34 -07:00
Yu Shan
b88515aa50 Add VHAL_SUPPORTED_PROPERTY_IDS to ref VHAL.
Add the special property VHAL_SUPPORTED_PROPERTY_IDS to ref VHAL
to test getting all property configs through multiiple requests.

Test: atest DefaultConfigSupportedPropertyIdsTest
Run gcar emulator and check HVAC property.
Bug: 243449202

Change-Id: I9e7e8e798044c363548b879db1c4f39841362bbd
2022-09-12 21:07:01 -07:00
Steven Moreland
d288bca01b VehicleManager: use with RefBase am: 3b8e60afa3 am: 7a96e33640 am: 20405515a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/19300534

Change-Id: If3148897b97c8d61b29ffde719dd8052be932859
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-16 07:59:31 +00:00
Steven Moreland
20405515a2 VehicleManager: use with RefBase am: 3b8e60afa3 am: 7a96e33640
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/19300534

Change-Id: I3b795177938a388719a4d2942f5a15b1ce38dcca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-16 07:41:02 +00:00
Steven Moreland
3b8e60afa3 VehicleManager: use with RefBase
RefBase with sp<>

Bug: 232557259
Test: build
Change-Id: Id6b3b7e222980fd0e82b2d94ff2518e92d42a4d9
2022-07-15 22:55:13 +00:00
Yu Shan
6a553afeec Add support for GSR property in HIDL ref VHAL.
Test: Presubmit
Bug: 236135569
Merged-In: I3788b66aa409304927e8f5af371c049cb1bcd58e
(cherry-picked from I3788b66aa409304927e8f5af371c049cb1bcd58e)

Change-Id: I3788b66aa409304927e8f5af371c049cb1bcd58e
2022-06-23 21:43:40 +00:00
Yu Shan
d3cf8d6294 Add support for GSR property in HIDL ref VHAL.
Test: Presubmit
Bug: 236135569
Change-Id: I3788b66aa409304927e8f5af371c049cb1bcd58e
2022-06-23 21:36:41 +00:00
Florian Mayer
e4ffd01586 Fix out of bounds access in test.
The test code constructed an `std::string` without a size from a
non-terminated string, which causes a memory error.

Test: atest 'DefaultVhalImplTest#testDump' on flame_hwasan
Bug: 233677013
Change-Id: I7d27c009c2e3307895a4a741743332fd4eed0e24
2022-05-23 23:53:54 +00:00
Keith Mok
22ebbf7822 vehicle-aidl: Fix various race condition
mThread should not be created in initization list,
since class member variables are not ready yet,
and the thread will access those variables.

Even if the shared variable is atomic, it must be modified under the
mutex in order to correctly publish the modification to the waiting
thread.

Bug: 231668271
Test: android.hardware.automotive.vehicle@V1-default-service_fuzzer
Change-Id: Ibbf36ddf9edcaa8d016349631784f54f6fd6c877
2022-05-09 03:38:11 +00:00
Nishtha Ahuja
63534553f5 Add value for FUEL_VOLUME_DISPLAY_UNITS in old default config for backward compatibility.
Fix: 221916124
Test: Tested manually in KitchenSink app
Change-Id: I656215c51e8b5ac897f247d462fbe57f31e954f4
2022-03-29 22:09:38 +00:00
Chih-hung Hsieh
34593d4e2a Merge "Add timed out test files to tidy_timeout_srcs" am: ff54f73b4f am: fa83970b3a am: 581616e658
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232

Change-Id: I2eac13fe3b5ab0b4f15d6ceadf376e5e74124a81
2022-02-24 01:32:09 +00:00
Chih-hung Hsieh
fa83970b3a Merge "Add timed out test files to tidy_timeout_srcs" am: ff54f73b4f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1992232

Change-Id: Ic6072a539d185abc0bcce2ef1dd4a96ddf70e3b8
2022-02-24 00:40:48 +00:00
Chih-Hung Hsieh
ad1bf31b78 Add timed out test files to tidy_timeout_srcs
* Timed out runs do not show any warning messages.
* These test files cannot finish clang-tidy runs with
  the following settings:
    TIDY_TIMEOUT=90
    WITH_TIDY=1
    CLANG_ANALYZER_CHECKS=1
* When TIDY_TIMEOUT is set, in Android continuous builds,
  tidy_timeout_srcs files will not be compiled by clang-tidy.
  When developers build locally without TIDY_TIMEOUT,
  tidy_timeout_srcs files will be compiled.
* Some of these test modules may be split into smaller ones,
  or disable some time consuming checks, and then
  enable clang-tidy to run within limited time.

Bug: 201099167
Test: make droid tidy-hardware-interfaces_subset
Change-Id: I1de28f1572fff368f67eab512fffec9f2e5c2a9b
2022-02-18 17:25:41 -08:00
Yu Shan
6cd2fd7e5f Move VehicleHalProto out from vhal_v2_0.
VehicleHalProto would be used by AIDL Vhal as well so move it to
a common place.

Test: Presubmit
Bug: 215419573
Change-Id: I1e886a64a6c5ef76f7dc918feccc9cf63b8bca0c
2022-01-21 15:30:52 -08:00
Yu Shan
6e289c86d9 Fix CLUSTER_SWITCH_UI init value.
CLUSTER_SWITCH_UI is a INT32 property that should only have one
init value instead of 2. This is causing confusion in the code
that uses the default value.

Test: None
Bug: 202448791
Change-Id: Id55f448f1dd5ee33291e30d32e6fbf868ad8fe3a
2021-10-08 13:26:30 -07:00
Kai Wang
0bc1600786 Merge "Add areaId for CRITICALLY_LOW_TIRE_PRESSURE" into sc-v2-dev am: 773ed6ddd9 am: 7e1abd0cd8
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15856346

Change-Id: I6a72d2cc8fa14602d51a9095b4f43e67dbc871d8
2021-09-28 22:45:49 +00:00
Kai Wang
7e1abd0cd8 Merge "Add areaId for CRITICALLY_LOW_TIRE_PRESSURE" into sc-v2-dev am: 773ed6ddd9
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15856346

Change-Id: I3ff39c2658f9a8a70add9331231e3ee951f400de
2021-09-28 22:31:51 +00:00
Kai Wang
773ed6ddd9 Merge "Add areaId for CRITICALLY_LOW_TIRE_PRESSURE" into sc-v2-dev 2021-09-28 22:22:17 +00:00
Kai Wang
e509bf1f76 Add areaId for CRITICALLY_LOW_TIRE_PRESSURE
CRITICALLY_LOW_TIRE_PRESSURE is a seat type property. Added areaId into
the property config.

Bug: 174585018
Test: atest AtsCarHostTests
Change-Id: I260b9e79844f44cad31efcf510301af0ee6227a1
2021-09-17 22:46:09 +00:00
TreeHugger Robot
8589253e58 Merge "Update Documentation for EPOCH_TIME." into sc-qpr1-dev am: 922f2b0bca am: a66bac8e90 am: 4c002642b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15618006

Change-Id: I863dae6cd37a87dd92a4aedd0d5fbb44f7c11b8c
2021-08-21 00:00:53 +00:00
TreeHugger Robot
4c002642b0 Merge "Update Documentation for EPOCH_TIME." into sc-qpr1-dev am: 922f2b0bca am: a66bac8e90
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15618006

Change-Id: I7c184383fd0a6720351947dac7808cfab34080cb
2021-08-20 22:28:55 +00:00
TreeHugger Robot
a66bac8e90 Merge "Update Documentation for EPOCH_TIME." into sc-qpr1-dev am: 922f2b0bca
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15618006

Change-Id: Ifbf528768e04cf583d1798340a7c9a7df66a304a
2021-08-20 21:32:44 +00:00
TreeHugger Robot
828a063f3c Merge "Update Documentation for EPOCH_TIME." into sc-qpr1-dev am: 922f2b0bca
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15618006

Change-Id: Iada15d1177104ca60713d927c8457dd1ca26c766
2021-08-20 21:23:09 +00:00
Ashutosh Agarwal
52799bd05d Update Documentation for EPOCH_TIME.
This is a change in behaviour for EPOCH_TIME to align it with a future revisions.

Bug: 157504928
Test: atest CarServicesTest
Test: atest VehiclePropertyIdsTest

Change-Id: I81881a03a1a562afc93cb1a2fe8a8fffa43f093d
2021-08-19 18:54:54 +00:00
Kai Wang
6439b4257d Merge "Add placeholder properties for emulator" into sc-v2-dev am: c490c1359b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15546061

Change-Id: I5822c80b2405f509cbfe339667d128cda7c8ae49
2021-08-13 23:41:00 +00:00
Bob Badour
f79355756f [LSC] Add LOCAL_LICENSE_KINDS to hardware/interfaces
Added SPDX-license-identifier-Apache-2.0 to:
  automotive/vehicle/2.0/default/impl/vhal_v2_0/tests/Android.bp
  automotive/vehicle/2.0/default/impl/vhal_v2_0/userhal/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I07633391fdf6298dadd9bde70e7fc12cee2bb646
2021-08-12 17:40:47 -07:00
Kai
b22a8678f8 Add placeholder properties for emulator
Add some placeholder properties in google VHAL. Developers who use the
aae emulator can use them in developing new features without
implementing a real property.

Bug: 193460353
Test: build aae emulator, use adb lshal to change property values
Change-Id: I6131a4892495c4c1e1c73e078572a666a33f984e
Merged-In: I6131a4892495c4c1e1c73e078572a666a33f984e
(cherry picked from commit 4d1fe81bee)
2021-08-12 18:50:44 +00:00
Kai Wang
34c5b9ae41 Merge "Add placeholder properties for emulator" 2021-08-12 16:50:42 +00:00
Kai
4d1fe81bee Add placeholder properties for emulator
Add some placeholder properties in google VHAL. Developers who use the
aae emulator can use them in developing new features without
implementing a real property.

Bug: 193460353
Test: build aae emulator, use adb lshal to change property values
Change-Id: I6131a4892495c4c1e1c73e078572a666a33f984e
2021-08-11 23:32:58 +00:00
Yu Shan
58f71e79cb Rename EmulatedUserHal to FakeUserHal.
EmulatedUserHal is a library that allows setting and getting fake
user HAL properties, and has nothing to do with emulator. So we
rename it to FakeUserHal to be clearer.

Test: Local build.
Bug: 194340549
Change-Id: I29bf3ceb9e4cacb0a1da96699bd4ba843cab883d
2021-08-11 23:10:31 +00:00
TreeHugger Robot
44b0ff42e3 Merge "Set the minSampleRate > 0 for continuous properties on the AAOS emulator." into sc-dev am: 4f8d0ea1ad am: abf474d2e9 am: 029819097b
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15483496

Change-Id: I3f87d595174addf0adbf47a21ec4770e14299b3c
2021-08-10 03:49:41 +00:00
TreeHugger Robot
029819097b Merge "Set the minSampleRate > 0 for continuous properties on the AAOS emulator." into sc-dev am: 4f8d0ea1ad am: abf474d2e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15483496

Change-Id: I0e59e20d25da0d9d40127e66ae5fd37280481a6b
2021-08-10 03:33:55 +00:00
TreeHugger Robot
171be708d9 Merge "Set the minSampleRate > 0 for continuous properties on the AAOS emulator." into sc-dev am: 4f8d0ea1ad am: abf474d2e9
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15483496

Change-Id: I8d626df393b44121bc1e67682b812fd75910bbfb
2021-08-10 03:33:54 +00:00
TreeHugger Robot
0766c8b05e Merge "Set the minSampleRate > 0 for continuous properties on the AAOS emulator." into sc-dev am: 4f8d0ea1ad am: b868d54446
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15483496

Change-Id: Id908872cefc47078b2a8302915b452f6292fc223
2021-08-10 03:33:10 +00:00
Jiyong Park
b1e88b8ce6 Merge "Remove ndk_platform backend. Use the ndk backend." into sc-dev-plus-aosp am: e996f02801 am: 82230861e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15481541

Change-Id: Ica7ec2964d726cfb5259ab6db26777b1d9ff1bc7
2021-08-10 00:21:08 +00:00
Tyler Trephan
d1705d569a Set the minSampleRate > 0 for continuous properties on the AAOS
emulator.

Test: atest CarPropertyManagerTest
Bug: 194680297
Change-Id: I3b9c359885d173c89e825b206b629ed9dfa38d13
2021-08-09 08:44:55 -07:00
Jiyong Park
d55d28a1d0 Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Merged-In: I0652f1efe920111d79dd8c2ecd52e55dda54538f
Change-Id: Ib58c9f1cb80d083a3c62d03415610be855b80f03
(cherry picked from commit c426c6dbdc)
2021-08-09 11:20:04 +09:00
Yu Shan
5e9d9cde8e Remove debug properties.
After migrating all existing usage of debug properties, we no longer
need them.

Test: Local build.
Bug: 193565753
Change-Id: I6d94ebf527ee0fbb3041cdf949f7c61f81488752
2021-08-05 18:36:06 -07:00
Yu Shan
1e23e77316 Merge "Add DEBUG_CMD in emulator message." 2021-08-05 22:07:51 +00:00
Jiyong Park
c426c6dbdc Remove ndk_platform backend. Use the ndk backend.
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.

Bug: 161456198
Test: m
Change-Id: I0652f1efe920111d79dd8c2ecd52e55dda54538f
2021-08-04 12:48:07 +09:00
Yu Shan
3a338c6829 Add DEBUG_CMD in emulator message.
Add DEBUG_CMD to allow emulator to send debug commands to VHAL.
This is used to replace the special debug properites.

Test: None
Bug: 193565753
Change-Id: I5fe8fbae05e075e74c85aa6771f14c243003bc77
2021-08-03 17:10:51 -07:00
TreeHugger Robot
0786af29fb Merge "Support more types for set property cmd." into sc-v2-dev 2021-08-03 19:39:34 +00:00
Tyler Trephan
feacd6e72c Fixed failing CTS tests related vehicle properties on the AAOS emulator. am: 6ac46d6bf2 am: 0531800197
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15421133

Change-Id: I560faae33d947b0e329b928518eef0f86e659297
2021-07-30 17:19:48 +00:00
Tyler Trephan
93a3dff55e Fixed failing CTS tests related vehicle properties on the AAOS emulator. am: 6ac46d6bf2
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15421133

Change-Id: I7da297cd9110378408a4a440eebe6c849dd57870
2021-07-30 17:08:42 +00:00
Tyler Trephan
6ac46d6bf2 Fixed failing CTS tests related vehicle properties on the AAOS emulator.
-Added supported gears to CURRENT_GEAR config.
-Changed INFO_EXTERIOR_DIMENSIONS to int32 array

Test: atest CarPropertyManagerTest
Bug: 194182294
Change-Id: I96d241d0c388b8fc397af9f45a8a8072a05ee8d1
2021-07-29 16:49:39 -07:00
Yu Shan
27946f0b00 Support more types for set property cmd.
Now support int64, float and bytes.
This CL also allows setting read-only properties or reading
write-only properties through cmdline. The cmdline debug interface
is for test only and does not need to enforce these restrictions.

Test: unit tests.
Bug: b/189969547
Merged-In: Ib0e085f7a68e3d54782c21fb12caa500a0ad82ec
Change-Id: Ib0e085f7a68e3d54782c21fb12caa500a0ad82ec
(cherry picked from commit 8ae3ea9813)
2021-07-29 19:38:06 +00:00
TreeHugger Robot
9e420b77de Merge "Support debug setValue." 2021-07-28 23:34:12 +00:00
Yu Shan
5d7442f9c9 Merge "Create default VehicleService." 2021-07-28 18:18:52 +00:00
Kai Wang
bb68774ddd Merge "Add FAN_DIRECTION for assistant's test case" 2021-07-28 16:45:35 +00:00
Kai
36588116b9 Add FAN_DIRECTION for assistant's test case
Add more FAN_DIRECTION in google VHAL for testing

Bug: 192508890
Test: adb shell dumpsys cmd get-property-value 356582673
Change-Id: I6d2bbf04477b0f80d40cd5999c648d5163de86ac
2021-07-27 17:18:29 -07:00