Today, when a ScopedWakelock is moved, the default move constructor
doesn't unlock the old wakelock instance. This results in the moved
ScopedWakelock instance decrementing the wakelock ref count which leaves
the multi-HAL out of sync from the sensor service.
Fix this by adding a custom move constructor / operator to ensure old
state is cleared on the moved instance.
Bug: 163468874
Test: Load multi-HAL and verify that it properly waits to release the
wakelock until the sensor service notifies that it has a lock held.
Test: Run unit tests
Change-Id: Ifd5a3c7596f78d7a756c4472f30efb625d670791
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)
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)
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
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
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
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
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
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
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
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
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
Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device
Change-Id: I275274659816b3a00374fb0b7a93f199874afdcd
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
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
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
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
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
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
Bug: 149758467
Test: Verify that the new unit tests and subhals in this topic load and
run on a Pixel device
Change-Id: Id5ab7b606f91764a456d8e3a16f7f0f2cf9b4fef
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
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
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
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
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
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
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