Commit graph

581 commits

Author SHA1 Message Date
Dan Shi
e5c9b5e722 Suppress gtest error for tests without any instance am: ba4d532fee am: 73122cd284
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1374050

Change-Id: Ie5e956d4613f5e947c36ba4f1048f0c3aa8944ba
2020-07-29 05:45:58 +00:00
Dan Shi
ba4d532fee Suppress gtest error for tests without any instance
Bug: 162052785
Test: m -j vts
Change-Id: I8c1a48e6fbd7c8161137902b5332911fa0d7b8b3
2020-07-28 15:12:32 -07:00
Jooyung Han
d610435ac4 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

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

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

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-07 16:22:36 +09:00
Jooyung Han
d18cba85fe update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

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

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

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
2020-07-02 12:26:37 +09:00
Jooyung Han
b0907a6bb8 update hidl .bp
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.

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

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

Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
2020-07-02 09:18:17 +09:00
Brian Duddie
069d6dd8db Add support for IAllocator/IMapper v4.0 in sensors VTS am: 97f1a3aeaa am: b3cda9ef6d am: f6c5f764a4 am: 2492bd3251
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11744993

Change-Id: I6d81ed6a3326593ce1f3ac564fccec9a1caae96e
2020-06-05 18:25:16 +00:00
Brian Duddie
f6c5f764a4 Add support for IAllocator/IMapper v4.0 in sensors VTS am: 97f1a3aeaa am: b3cda9ef6d
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11744993

Change-Id: I91d85a478ce628fc80232d3caa6bf47a7217ff55
2020-06-05 14:52:17 +00:00
Brian Duddie
35a1cb8e00 Add support for IAllocator/IMapper v4.0 in sensors VTS am: 97f1a3aeaa
Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/11744993

Change-Id: Ia66309472684ff6552884ddd2ef0de8d1bd9a1bd
2020-06-05 14:38:42 +00:00
Brian Duddie
97f1a3aeaa Add support for IAllocator/IMapper v4.0 in sensors VTS
Also, pull in the static libs associated with the graphics HALs to
VtsHalSensorsTargetTestUtils so that the VTS binaries that depend on it
don't need to all pull them in themselves.

Fixes: 158018963
Test: VtsHalSensorsV2_0TargetTest on a device supporting the v4.0 HALs
Change-Id: Idc47ffb8cacd1ac84d45b979cd45fe630b6808f6
2020-06-04 16:33:09 -07:00
Dan Shi
268dab27f8 Merge "Use StopServicesSetup to stop/start framework." into rvc-dev am: e8f9e0959f am: f2956479e3 am: 603e12a745 am: 042001e278
Change-Id: Ice28fd6e459934e478ceef5d18cefd035f1b0f4b
2020-05-13 23:51:09 +00:00
Dan Shi
f2956479e3 Merge "Use StopServicesSetup to stop/start framework." into rvc-dev am: e8f9e0959f
Change-Id: I9b0e7c3c76a33526bd90730b1f775e29134d909e
2020-05-13 23:12:44 +00:00
Dan Shi
e8f9e0959f Merge "Use StopServicesSetup to stop/start framework." into rvc-dev 2020-05-13 22:52:20 +00:00
TreeHugger Robot
2e59c22326 Merge "Use StopServicesSetup to stop/start framework." into rvc-dev 2020-05-13 21:44:19 +00:00
Dan Shi
2d11037a0b Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: none
Change-Id: I3dfec18df478b0a4ae16c454d110e5c05f33cbca
2020-05-13 14:03:24 -07:00
Dan Shi
1a380f7b5b Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: none
Exempt-From-Owner-Approval: This CL replaces target preparer, shouldn't
change test behavior.

Change-Id: I83cffadfff15e6352a69641c3227efb63e7a34e4
Merged-In: I83cffadfff15e6352a69641c3227efb63e7a34e4
2020-05-13 14:02:04 -07:00
Dan Shi
ea682bae05 Use StopServicesSetup to stop/start framework. am: 8a648312f8 am: 95d430d6c8 am: 3b6534e36d am: f1e1ac586d am: 5ed212e3e4
Change-Id: I073f9338b844db98c920fba9b6cf312982c49ad1
2020-05-13 18:56:14 +00:00
Dan Shi
3b6534e36d Use StopServicesSetup to stop/start framework. am: 8a648312f8 am: 95d430d6c8
Change-Id: I96a02ab530d4efd386c5f835bbb932e62ea8ea7d
2020-05-13 18:19:37 +00:00
Dan Shi
95d430d6c8 Use StopServicesSetup to stop/start framework. am: 8a648312f8
Change-Id: I0a3f67e848b2452b1919ae0e26d69fc1a9a9ce15
2020-05-13 18:05:52 +00:00
Dan Shi
8a648312f8 Use StopServicesSetup to stop/start framework.
Bug: 155774142
Test: none
Exempt-From-Owner-Approval: This CL replaces target preparer, shouldn't
change test behavior.

Change-Id: I83cffadfff15e6352a69641c3227efb63e7a34e4
2020-05-12 14:07:30 -07:00
Treehugger Robot
552990ed42 Merge "Rename vts-core to vts" 2020-05-08 01:44:18 +00:00
Dan Shi
fcced28d93 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
Change-Id: If871035f66631869d1082a557e2639a2766cd1de
2020-05-07 16:25:29 -07:00
Ahmad Rahmati
048b243436 Merge "Add SCOPED_TRACE to VTS tests that loop over all sensors" into rvc-dev am: 91c5deafc3 am: df10e7f247 am: 3b57b2cd1f am: 3a8fcbbff2
Change-Id: Ia32ecfbfe77069235d09c9e56e42d51ee31126ea
2020-05-07 23:07:39 +00:00
Ahmad Rahmati
3b57b2cd1f Merge "Add SCOPED_TRACE to VTS tests that loop over all sensors" into rvc-dev am: 91c5deafc3 am: df10e7f247
Change-Id: Ie497bbc585ba3718d80f05a2c2e5894782291821
2020-05-07 22:27:24 +00:00
Ahmad Rahmati
388e2efecc Merge "Add SCOPED_TRACE to VTS tests that loop over all sensors" into rvc-dev am: 91c5deafc3
Change-Id: I41aeba2fa41e10dad5ad05b6b87b89ea048bf58f
2020-05-07 22:16:17 +00:00
Treehugger Robot
1f65d20a39 Merge "sensors:2.0:vts fix functional test for typeAsString field" am: e3fc570d6d
Change-Id: Iec84bed4fe462001a577b382e4934b59b765017b
2020-05-07 16:50:25 +00:00
Treehugger Robot
e3fc570d6d Merge "sensors:2.0:vts fix functional test for typeAsString field" 2020-05-07 16:34:31 +00:00
Ahmad Rahmati
8276a3bb02 Add SCOPED_TRACE to VTS tests that loop over all sensors
SCOPED_TRACE enables the error message contains enough detail to
easily narrow down the root cause

Bug: 154357354
Test: atest VtsHalSensorsV2_0Target VtsHalSensorsV2_1Target
Change-Id: Id6dbbe8bd8617776efec383d5276e9e12006f27d
2020-05-07 02:45:30 +00:00
Stan Rokita
f26ba8c59f Search for subhal .so files in additional directories am: b42bde95cb
Change-Id: I1fb0ce977406e07a26278a2be0e2380ee7d677f4
2020-05-06 23:00:18 +00:00
Stan Rokita
b42bde95cb Search for subhal .so files in additional directories
Fixes: 154634207
Test: Load onto flame and confirm that subhal .so
android.hardware.sensors@2.X-fakesubhal-config3.so loads when it is
living in the /vendor/lib64/hw directory using
adb shell lshal debug android.hardware.sensors@2.0::ISensors/default

Change-Id: I8a676b97f6f6992e8937ecf31c3b7af06e676ebb
Merged-In: I8a676b97f6f6992e8937ecf31c3b7af06e676ebb
2020-05-06 15:02:42 -07:00
TreeHugger Robot
a55566d5e3 Merge "Fix Sensors VTS asserts for sensor type strings" into rvc-dev am: abc7986d1a am: 89519e760d am: 8feb1f8e87 am: 13006f8f60
Change-Id: Ia90d8cb90270912a180bdffb29053aae3f2da58b
2020-05-05 16:12:29 +00:00
Denis Ciocca
8ab752617f sensors:2.0:vts fix functional test for typeAsString field
For sensors of known type defined in SensorType (value <
DEVICE_PRIVATE_BASE), typeAsString field can be an empty string since
framework overrides it anyways.
The empty string test should fails only if type is >=
DEVICE_PRIVATE_BASE.
The matching type with typeAsString test is instead executed only if
the string is not empty (if it's not an empty string let's check that
at least is set to the right value).

Bug: 155514483
Test: atest VtsHalSensorsV2_0TargetTest
Signed-off-by: Denis Ciocca <denis.ciocca@gmail.com>
Merged-In: Ib5f8fd513313670e88c2b973c1ff724658914eb2
Change-Id: I4267ff6a158a571ff43122bdb7a38c9fa38f5900
2020-05-05 16:10:46 +00:00
TreeHugger Robot
8feb1f8e87 Merge "Fix Sensors VTS asserts for sensor type strings" into rvc-dev am: abc7986d1a am: 89519e760d
Change-Id: I1759a855ba720db4018ba4fdf9c40a371c319d56
2020-05-05 15:37:03 +00:00
TreeHugger Robot
f4ebf94103 Merge "Fix Sensors VTS asserts for sensor type strings" into rvc-dev am: abc7986d1a
Change-Id: Iaf3b7fd1de42a5e5665a5bd74bb9f49d7d13c2ec
2020-05-05 15:24:41 +00:00
Anthony Stange
908e4479dd Fix Sensors VTS asserts for sensor type strings
Private sensors are the only sensor types that must define a type
string. For public sensors, a type string can be left empty as it will
be overridden by the sensors frameork.

Bug: 155514483
Test: atest VtsHalSensorsV2_0Target
Change-Id: Ib5f8fd513313670e88c2b973c1ff724658914eb2
2020-05-04 14:54:19 -04:00
TreeHugger Robot
a470b95e39 Merge "Search for subhal .so files in additional directories" into rvc-dev am: 358db3b106 am: 08da8ed673 am: 6524d1e263 am: 2d54506196
Change-Id: Ifa6b0ac78a1ef9707e91c25bb539042c67a39f2f
2020-05-02 03:37:42 +00:00
TreeHugger Robot
6524d1e263 Merge "Search for subhal .so files in additional directories" into rvc-dev am: 358db3b106 am: 08da8ed673
Change-Id: I05c7361e983e95c6e2e6543b85a4af8d53766a93
2020-05-02 03:09:23 +00:00
TreeHugger Robot
da0ae1cfe4 Merge "Search for subhal .so files in additional directories" into rvc-dev am: 358db3b106
Change-Id: Id04399150e05bcc198ed8f9ccee9448e4a4a1581
2020-05-02 02:48:41 +00:00
Stan Rokita
c786dfc5b1 Search for subhal .so files in additional directories
Fixes: 154634207
Test: Load onto flame and confirm that subhal .so
android.hardware.sensors@2.X-fakesubhal-config3.so loads when it is
living in the /vendor/lib64/hw directory using
adb shell lshal debug android.hardware.sensors@2.0::ISensors/default

Change-Id: I8a676b97f6f6992e8937ecf31c3b7af06e676ebb
2020-05-02 00:03:27 +00:00
Anthony Stange
5c0072bdbb V2: Update tests for multihal to test HAL 2.1 am: 7a21c53268 am: 2dc496d9c2 am: e5552f1e47 am: ed6b30c495
Change-Id: Ie45294c0a5cd27cce799acad7283ee3444069f97
2020-04-30 22:42:27 +00:00
Anthony Stange
8f86dd1907 V2: Create Multi-HAL 2.1 service am: 199b5ff96a am: 2708e59bc3 am: 296f9e3d13 am: 47a2eb3b20
Change-Id: Ib58757d86120272059c4f7e7828ca508bb2efaf1
2020-04-30 22:42:25 +00:00
Anthony Stange
dee2a35507 V2: Set up Multi-HAL for Sensors HAL 2.1 am: 33acf9fb3a am: cca52d44da am: 488b752161 am: 3831c8f436
Change-Id: Ifc5c49249ac267aebe109562300d97ce639a1db9
2020-04-30 22:42:20 +00:00
Anthony Stange
e5552f1e47 V2: Update tests for multihal to test HAL 2.1 am: 7a21c53268 am: 2dc496d9c2
Change-Id: I307087c94c71a819375fc20c134c47f2fc9d03ce
2020-04-30 22:07:51 +00:00
Anthony Stange
296f9e3d13 V2: Create Multi-HAL 2.1 service am: 199b5ff96a am: 2708e59bc3
Change-Id: Ic66259addd51428d47e40da2475e433caa21beb7
2020-04-30 22:07:48 +00:00
Anthony Stange
488b752161 V2: Set up Multi-HAL for Sensors HAL 2.1 am: 33acf9fb3a am: cca52d44da
Change-Id: I17415986e336ef80da49ed7ece2169581a7115c0
2020-04-30 22:07:45 +00:00
Anthony Stange
6c3ed907d7 V2: Update tests for multihal to test HAL 2.1 am: 7a21c53268
Change-Id: Ic4addb6b376c34390f8afb2b954a2fb163c25d99
2020-04-30 21:51:24 +00:00
Anthony Stange
91b3dced0f V2: Create Multi-HAL 2.1 service am: 199b5ff96a
Change-Id: Ibfd005e49e0754daf757f4db1b6154760a55b04d
2020-04-30 21:51:20 +00:00
Anthony Stange
56f6c459df V2: Set up Multi-HAL for Sensors HAL 2.1 am: 33acf9fb3a
Change-Id: I5de7348d33466bcfb8da450c57472327aafd7772
2020-04-30 21:51:18 +00:00
Anthony Stange
7a21c53268 V2: Update tests for multihal to test HAL 2.1
Updates tests and fake subhals to support Multi-HAL 2.1 to make
on-device testing feasible.

Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device

Change-Id: I7a9d7c1678826bb1956119e8b76f591c7bc213e1
2020-04-30 08:45:19 -04:00
Anthony Stange
199b5ff96a V2: Create Multi-HAL 2.1 service
Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device

Change-Id: I275274659816b3a00374fb0b7a93f199874afdcd
2020-04-30 08:45:19 -04:00
Anthony Stange
33acf9fb3a V2: Set up Multi-HAL for Sensors HAL 2.1
Bug: 149758467
Test: Load onto device and verify VTS passes
Test: Verify new fake subhals load properly and that unit tests pass
that have been updated in this topic

Change-Id: Ie73458b3447dab80f6b692e55832ef562636bfdb
2020-04-30 08:45:19 -04:00
Nick Chalko
706753b1e9 Merge changes from topic "revert-10501254-multihal_2_1-FNHFKNQMKB" into rvc-dev am: 7a63ec7734 am: f26b11ea4d am: 2d45a577fe am: bb92acbba9
Change-Id: Icb61e774bad3f7d28a7ae77a17281a9e5163ab40
2020-04-29 23:39:37 +00:00
Nick Chalko
2d45a577fe Merge changes from topic "revert-10501254-multihal_2_1-FNHFKNQMKB" into rvc-dev am: 7a63ec7734 am: f26b11ea4d
Change-Id: I3b0a7055a2cd785a21261a37d85e59dbbe6dca8d
2020-04-29 23:17:01 +00:00
Nick Chalko
68bf7e87b3 Merge changes from topic "revert-10501254-multihal_2_1-FNHFKNQMKB" into rvc-dev am: 7a63ec7734
Change-Id: Ic95046c31867bcda12ab27c0870907fb0109afab
2020-04-29 23:00:34 +00:00
Nick Chalko
7a63ec7734 Merge changes from topic "revert-10501254-multihal_2_1-FNHFKNQMKB" into rvc-dev
* changes:
  Revert "Set up Multi-HAL for Sensors HAL 2.1"
  Revert "Create Multi-HAL 2.1 service"
  Revert "Update tests for multihal to test HAL 2.1"
2020-04-29 22:46:09 +00:00
Nick Chalko
cd5d437ae9 Revert "Set up Multi-HAL for Sensors HAL 2.1"
Revert submission 10501254-multihal_2_1



Reason for revert: Droidcop: Potential culprit for b/155328660 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Bug: 155328660
Reverted Changes:
I2be51568b:Update tests for multihal to test HAL 2.1
Id5ab7b606:Create Multi-HAL 2.1 service
Icefae8c12:Set up Multi-HAL for Sensors HAL 2.1

Change-Id: I21176759d45972cde3221cb462934fc1d7bd88c2
2020-04-29 22:21:25 +00:00
Nick Chalko
6691d85d0b Revert "Create Multi-HAL 2.1 service"
Revert submission 10501254-multihal_2_1



Reason for revert: Droidcop: Potential culprit for b/155328660 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Bug: 155328660
Reverted Changes:
I2be51568b:Update tests for multihal to test HAL 2.1
Id5ab7b606:Create Multi-HAL 2.1 service
Icefae8c12:Set up Multi-HAL for Sensors HAL 2.1

Change-Id: I5e828d1dfd4f9ede5cbd38ff8bc4cc5dc48e4d76
2020-04-29 22:20:59 +00:00
Nick Chalko
f4b5b40b4a Revert "Update tests for multihal to test HAL 2.1"
Revert submission 10501254-multihal_2_1

Reason for revert: Droidcop: Potential culprit for b/155328660 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Bug: 155328660
Reverted Changes:
I2be51568b:Update tests for multihal to test HAL 2.1
Id5ab7b606:Create Multi-HAL 2.1 service
Icefae8c12:Set up Multi-HAL for Sensors HAL 2.1

Change-Id: I8b97eb29633cf24f464d742770256791108c27dd
2020-04-29 22:13:29 +00:00
TreeHugger Robot
489a77cbaa Merge changes from topic "multihal_2_1" into rvc-dev am: 89b216690c am: f3660d09f7 am: 4b63f3a03b am: bbe39b86a3
Change-Id: Ibc9d060f10b0691466a52addebb565a5602553a6
2020-04-29 21:42:42 +00:00
TreeHugger Robot
5f5403006a Merge "Remove non-test ScopedWakelock dependency" into rvc-dev am: 24087f1219 am: a76d3722bf am: 0515212bcd am: 5b0159c7d9
Change-Id: I566ff80151b72ac3dd70f0bc9a697f84fc5aa630
2020-04-29 21:42:01 +00:00
TreeHugger Robot
4b63f3a03b Merge changes from topic "multihal_2_1" into rvc-dev am: 89b216690c am: f3660d09f7
Change-Id: I596bcbc3ac680251e031297fd504785e21a98278
2020-04-29 21:13:21 +00:00
TreeHugger Robot
0515212bcd Merge "Remove non-test ScopedWakelock dependency" into rvc-dev am: 24087f1219 am: a76d3722bf
Change-Id: I23ccfd584b5f88870625ed1d270885073da391da
2020-04-29 21:13:12 +00:00
TreeHugger Robot
e5f735df7d Merge changes from topic "multihal_2_1" into rvc-dev am: 89b216690c
Change-Id: I3d5bc424d10777f37fb66b6023f4d822afcfea7a
2020-04-29 21:03:43 +00:00
TreeHugger Robot
32d96a1852 Merge "Remove non-test ScopedWakelock dependency" into rvc-dev am: 24087f1219
Change-Id: I9f5da262411ec143ba3da9da0e5734d96dfa53b9
2020-04-29 21:02:58 +00:00
TreeHugger Robot
89b216690c Merge changes from topic "multihal_2_1" into rvc-dev
* changes:
  Update tests for multihal to test HAL 2.1
  Create Multi-HAL 2.1 service
  Set up Multi-HAL for Sensors HAL 2.1
2020-04-29 20:56:30 +00:00
Anthony Stange
67888489ce Update tests for multihal to test HAL 2.1
Updates tests and fake subhals to support Multi-HAL 2.1 to make
on-device testing feasible.

Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device

Change-Id: I2be51568ba8dd99aa0588b8945d3d41bda7d9941
2020-04-29 11:25:26 -04:00
Stan Rokita
99a9a529ba Remove non-test ScopedWakelock dependency
Unit tests were depending on a non test library unecesarrily and it was
causing unit test build failure.

Fixes: 155239061
Test: atest android.hardware.sensors@2.0-halproxy-unit-tests
Change-Id: I057a432fdbef93680a67558c27ed7adc7fedfbbc
2020-04-28 18:31:46 -07:00
Anthony Stange
82f8d46691 Create Multi-HAL 2.1 service
Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device

Change-Id: Id5ab7b606f91764a456d8e3a16f7f0f2cf9b4fef
2020-04-28 17:49:02 -04:00
Anthony Stange
bc20e5c2a3 Set up Multi-HAL for Sensors HAL 2.1
Bug: 149758467
Test: Load onto device and verify VTS passes
Test: Verify new fake subhals load properly and that unit tests pass
that have been updated in this topic

Change-Id: Icefae8c1261b29d704beedd51de5b3f53b374cc4
2020-04-28 17:48:59 -04:00
Denis Ciocca
d3c27ec3f7 Include VtsHalSensorsV2_0TargetTest into the vts test suites
Without adding the test into vts test suite the testcases are not
available within the vts-tradefed.

Test: manual - build vts using 'make vts' with arm64 target selected,
               verifying that the test is then available under:
               out/host/linux-x86/vts/android-vts/testcases/VtsHalSensorsV2_0TargetTest

Signed-off-by: Denis Ciocca <denis.ciocca@gmail.com>
Change-Id: I34a89bef09832e5fa8295340f52dafd91fa33c96
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-23 10:24:43 -07:00
TreeHugger Robot
ae7a11b7de Merge "Add the missing unregisterCallback call" into rvc-dev am: eac1cdbba9 am: 4035a9be3d am: 2cb6a98a1e am: cc26b357ea
Change-Id: I8c0d52a9e154d6f82507a6327f730322cfb877ea
2020-04-15 19:47:53 +00:00
TreeHugger Robot
2cb6a98a1e Merge "Add the missing unregisterCallback call" into rvc-dev am: eac1cdbba9 am: 4035a9be3d
Change-Id: I7931dae286ce5715397ad43f2770cd5709fc1056
2020-04-15 19:34:35 +00:00
TreeHugger Robot
c57ee9e0a5 Merge "Add the missing unregisterCallback call" into rvc-dev am: eac1cdbba9
Change-Id: Ib273274fbd4e400ce14450da445e62487413f2c2
2020-04-15 19:22:12 +00:00
Roman Kiryanov
226761ce9d Add the missing unregisterCallback call
The sensor reading thread continues producing
event and refers to the already destroyed
callback object which causes a crash in
SensorsHidlEnvironmentBase::addEvent.

Bug: 153754380
Test: atest VtsHalSensorsV2_0TargetTest
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: I3017afe670e5a53d0d7444b3d5b34ba34f3567e3
Merged-In: Id7fb72c42dc67f89ceef93d937241e1584b853e7
2020-04-15 12:12:46 -07:00
Roman Kiryanov
279a5ae37e Add the missing unregisterCallback call
The sensor reading thread continues producing
event and refers to the already destroyed
callback object which causes a crash in
SensorsHidlEnvironmentBase::addEvent.

Bug: 153754380
Test: atest VtsHalSensorsV2_0TargetTest
Signed-off-by: Roman Kiryanov <rkir@google.com>
Change-Id: Id7fb72c42dc67f89ceef93d937241e1584b853e7
2020-04-15 10:34:11 -07:00
TreeHugger Robot
3f5e5bfb0b Merge "Don't modify -1 sensorHandle value" into rvc-dev am: 2adce34722 am: 613d716a4e am: 6bea6bcb30 am: 50c450c074
Change-Id: I96ef71fecede961d5ced85a29c31ded40b39f7e9
2020-04-09 18:29:20 +00:00
TreeHugger Robot
6bea6bcb30 Merge "Don't modify -1 sensorHandle value" into rvc-dev am: 2adce34722 am: 613d716a4e
Change-Id: I056cef988030a784f3e5ec39ed8269ce25d026bc
2020-04-09 17:52:37 +00:00
TreeHugger Robot
14725a36aa Merge "Don't modify -1 sensorHandle value" into rvc-dev am: 2adce34722
Change-Id: I7c346a31648c7f9d3aabd0d4a4c54ef174d84986
2020-04-09 17:39:12 +00:00
TreeHugger Robot
2adce34722 Merge "Don't modify -1 sensorHandle value" into rvc-dev 2020-04-09 17:14:38 +00:00
Anthony Stange
cd4d9abdcc Don't modify -1 sensorHandle value
A -1 sensorHandle value is used to denote all active sensors should be
stopped for a given channel. Make sure the multi-HAL code doesn't modify
handles of this value or it'll corrupt them before passing to the direct
channel sub-HAL.

Bug: 153413565
Test: atest VtsHalSensorsV2_0Target
Change-Id: I3fe9cbf4661aa3db4ff534765d5112a193b7bf4a
2020-04-09 11:07:56 -04:00
TreeHugger Robot
2698f8d521 Merge "Adds context_hub group to sensors HAL" into rvc-dev am: ee01c9ec22 am: acc50061f8 am: d4f3f697c7 am: 8bb62512fe
Change-Id: I10b03ee18c738fccd51d6f52229b912605e03599
2020-04-09 12:54:09 +00:00
TreeHugger Robot
d4f3f697c7 Merge "Adds context_hub group to sensors HAL" into rvc-dev am: ee01c9ec22 am: acc50061f8
Change-Id: Icc02965deaa2d0c6e2c4e9c6d8b1b6af228ef09a
2020-04-09 12:24:01 +00:00
TreeHugger Robot
db79614a58 Merge "Adds context_hub group to sensors HAL" into rvc-dev am: ee01c9ec22
Change-Id: I4bc3a5aefe6eb65aca35ea62ed17fa7042f2b0ee
2020-04-09 12:10:21 +00:00
TreeHugger Robot
ee01c9ec22 Merge "Adds context_hub group to sensors HAL" into rvc-dev 2020-04-09 11:55:15 +00:00
Dan Shi
aad51fa000 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 16:37:40 -07:00
Dan Shi
3a8a650c61 Rename vts-core to vts
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.

Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
2020-04-07 18:03:49 +00:00
Rick Chen
cdc9be8c7d Adds context_hub group to sensors HAL
Bug: 152005392
Bug: 152727489
Test: Compile pass. Verify sensor function.
Signed-off-by: Rick Chen <rickctchen@google.com>
Change-Id: Ifd7b9239a732619307bbb2e99d37791915fe7dc1
2020-04-07 22:51:13 +08:00
Anthony Stange
f1d431f634 Add SubHal header for Sensors HAL 2.1
Bug: 149758467
Test: compile
Change-Id: Id10d20e5d24571572565ac5d968f265ef7d7070f
2020-03-19 18:11:28 -04:00
TreeHugger Robot
d6f4acf514 Merge "Move Multi-HAL 2.0 to the common directory" into rvc-dev 2020-03-05 07:02:59 +00:00
TreeHugger Robot
0dad3a6381 Merge "HalProxy unit test to expose incorrect numEventsOnPendingQueue" into rvc-dev 2020-03-04 21:47:07 +00:00
TreeHugger Robot
89fe74560d Merge "Build HalProxy unit tests with a test library ScopedWakelock" into rvc-dev 2020-03-04 21:43:00 +00:00
Anthony Stange
05d7496e4c Move Multi-HAL 2.0 to the common directory
Sensors Multi-HAL 2.0 will soon have a shared implementation for both
Sensors HAL 2.0 and 2.1 and moving the files to the common directory
first will minimize the diff in upcoming CLs.

Bug: 149758467
Test: compile
Change-Id: I15f84a7aaa302d83d4f4b1ffe357f515e36d6382
2020-03-04 15:09:58 -05:00
Stan Rokita
14499028cf HalProxy unit test to expose incorrect numEventsOnPendingQueue
Bug: 147912609
Test: run unit test
Merged-In: Ia6fe3cafc1c2adb02463c28481bcf4c723551860
Change-Id: Ia6fe3cafc1c2adb02463c28481bcf4c723551860
2020-03-04 14:56:07 -05:00
Stan Rokita
d5d021b380 Build HalProxy unit tests with a test library ScopedWakelock
Unit tests do not currently build because they cannot find the
ScopedWakelock shared object. Make a test library version of
ScopedWakelock for them.

Bug: 147912609
Test: Build and run atest android.hardware.sensors@2.0-halproxy-unit-tests
Merged-In: Ie8d3eb606ccba3825be2c8102b9a7bc6ea033f65
Change-Id: Ie8d3eb606ccba3825be2c8102b9a7bc6ea033f65
2020-03-04 14:55:59 -05:00
Anthony Stange
e969e81bee Fix Sensors HAL 1.0 VTS tests
HAL 1.0 VTS tests need to detach the polling thread or it will never
exit on its own. Additionally, the poll() methods return status needs to
be checked or HIDL will assert and cause the program to crash.

Bug: 150475314
Test: atest VtsHalSensorsV1_0TargetTest VtsHalSensorsV2_0TargetTest
Change-Id: I626b7aa064a1f258c968d1787872b9c67786dede
2020-03-04 18:44:06 +00:00
Anthony Stange
72992c7bea Merge "Move common tests into SensorsV2_0 VTS only" into rvc-dev 2020-03-02 22:45:29 +00:00
Anthony Stange
e49ee681b0 Move common tests into SensorsV2_0 VTS only
Since Sensors HAL 2.1 implementations need to run VTS for both HAL 2.0
and 2.1, move tests that don't differ in logic between the two HAL
implementations to the VTS for 2.0 only to minimize the total run time
for both suites.

Bug: 149927057
Test: atest VtsHalSensorsV2_0Target VtsHalSensorsV2_1Target
Change-Id: I5213cdf05bafb2d4014078a03b22d98b96b7c5ee
2020-03-02 15:25:12 -05:00
Automerger Merge Worker
e1d8fbe4fd Merge "HalProxy unit test to expose incorrect numEventsOnPendingQueue" am: 4ce37f131d
Change-Id: I88f427ba574f7e2349dc20d979ba698b00edc438
2020-02-27 20:53:20 +00:00
Automerger Merge Worker
3e2dc4396a Merge "Build HalProxy unit tests with a test library ScopedWakelock" am: 43e05713c5
Change-Id: I3bb1cc38cc9761b3b0c9f31e3f817b5347c834b6
2020-02-27 20:53:12 +00:00
Stan Rokita
2f4ac1599a HalProxy unit test to expose incorrect numEventsOnPendingQueue
Bug: 147912609
Test: run unit test
Change-Id: Ia6fe3cafc1c2adb02463c28481bcf4c723551860
2020-02-26 15:19:17 -08:00
Stan Rokita
8c51fca223 Build HalProxy unit tests with a test library ScopedWakelock
Unit tests do not currently build because they cannot find the
ScopedWakelock shared object. Make a test library version of
ScopedWakelock for them.

Test: Build and run atest android.hardware.sensors@2.0-halproxy-unit-tests
Change-Id: Ie8d3eb606ccba3825be2c8102b9a7bc6ea033f65
2020-02-26 10:42:14 -08:00