Updating composePwleV2 VTS test to verify cases where the PWLE V2 capability is not supported.
Bug: 347034419
Flag: TEST_ONLY
Test: vts-tradefed run vts -m VtsHalVibratorTargetTest
Change-Id: I73de882f6595e858cea922b5378e5e7da4719140
Updating IVibrator.aidl to introduce APIs for PWLE V2 support. The updated interface now enables retrieval of minimum and maximum PWLE durations, maximum composition size, and facilitates the composition of PWLE effects using points.
Bug: 347034419
Flag: EXEMPT HAL interface change
Test: vts-tradefed run vts -m VtsHalVibratorTargetTest
Change-Id: Id0a93e4f8678622bdb698cddc2b39f46e0283fdd
Update VendorEffect.aidl to support 2 continuous float scale parameters,
one that reflects the user intensity settings for that effect and a
second that is forwarded from the vendor vibrator controller service for
that vibration usage.
This allows vendors to apply the 2-tier scaling function to the
vibrations, one reflecting the user settings and a second reflecting the
vendor parameter sent to the platform based on the device current
state.
Bug: 345409060
Test: VtsHalVibratorTargetTest
Flag: EXEMPT HAL interface changes
Change-Id: Ic88f90fd0ff1eae8797a7fe7d84d5b11f6c2f6bf
Introduce HAL API to perform vibration effects defined by the vendor.
The new API accepts a PersistableBundle representing the effect and some
platform-provided parameters, e.g. EffectStrength and scale.
The callback support for completion is required for this API, since
effect duration is undefined.
Fix: 345409060
Test: VtsHalVibratorTargetTest
Flag: EXEMPT HAL interface change
Change-Id: I26379ede4b64e41e1fc85feae6de5105cb636511
Disable CPP backend for vibrator HAL. Dependencies should use the
stable NDK instead.
This is also the recommended choice:
https://source.android.com/docs/core/architecture/aidl/aidl-hals#choosing-runtime
The HAL will be allowed to use ndk-stable types like PersistableBundle
after disabling the legacy CPP backend.
Fix: 349595412
Test: VtsHalVibratorTargetTest & VtsHalVibratorManagerTargetTest
Flag: EXEMPT NDK
Change-Id: Id5736e092afd36e786ecf3978ff6ad81c7a4df56
Fix benchmark crash error:
`FORTIFY: pthread_mutex_lock called on a destroyed mutex`
Caused by the bench loop trying to wait on the callback promise future
after the callback instance was destroyed.
The fix grabs the promise future before performing the HAL operation, so
it can access the fulfilled value after the promise fulfilled and then
destroyed.
Change-Id: I4504129672a11ad1662ea36c79f522d754535765
Fix: 336977792
Test: atest VibratorHalIntegrationBenchmark
Flag: TEST_ONLY
Update assertions on vibration completion callback to use a fixed
timeout of 100ms. Tests are flaky on cuttlefish, which indicates it's
not hardware latency causing it.
Fix: 333639794
Test: atest VtsHalVibratorTargetTest
Change-Id: I986cdd8087895fc0694d689e70feef0a9fe4140e
Fix error on waiting for long vibration callback that might have been
already cleared by the HAL when vibration finished. Test run crash log:
FORTIFY: pthread_mutex_lock called on a destroyed mutex (0xf5a83bbc)
Keep all test cleanup logic in teardown methods.
Bug: 329899022
Change-Id: If7c13296b870e792063a9ad7b307d57fb5c333aa
Test: atest VibratorHalIntegrationBenchmark
Setup binder process thread pool for vibrator HAL benchmark tests to fix
binder transaction errors of the type:
E Vibrator: Failed completion callback: -129
This change also adds checks for HAL results, which will cause them to
fail earlier with a useful error message when the device reaches a bad
state. This should avoid timeout failures for the whole test suite.
Other fixes:
- Fix vibrator.on(ms) tests to use a valid max duration value
(previously failing with illegal argument);
- Use a smaller fixed # of iterations on tests that iterate on vibrate
calls, and add wait for vibration to be complete to measure the HAL
in a more stable state;
- Skip getSupportedAlwaysOnEffects on devices without capability;
Fix: 329239120
Bug: 329899022
Bug: 329203383
Test: atest VibratorHalIntegrationBenchmark
Change-Id: Id541a62745320a601934fd3f176f8ba42b5a7b2d
Make vibrator VTS tests deterministic by removing all uses of
std::rand() from HAL input values used in test. Rely on max supported
values instead.
Fix: 324840028
Test: atest VtsHalVibratorTargetTest
Change-Id: Id40fb5a86238226feec9affff631bab37383f26b
Add TearDown method to reset the vibrator state between tests to avoid
illegal state errors caused by unrelated tests.
Add calls to vibrator->off between vibrator->compose invocations within
the same test, so calls are tested individually.
Test runs with this change on failing targets:
Bug: 323087313
Test: atest VtsHalVibratorTargetTest
Change-Id: I1e9aa243da07040b33df2474977fc8becac440a5
Fixes an issue with the benchmarks, where they would skip unsupported
situations by early returning without reaching the measure loop and
without notifying the framework.
The framework would then retry the exact same scenario indefinitely.
To fix, makes sure every early return also calls SkipWithMessage.
Fixes: 302845046
Test: adb shell /tmp/foobar/VibratorHalIntegrationBenchmark --v=2
Change-Id: Ib52b8c4d94755a0961bcfb40d508482e5c49cb52
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
go/new-android-ownership-model
Bug: 304529413
Test: N/A
Change-Id: Ic8c4bd6ac246e7efa98bbdaf822d12ae8e1230a5
This CL is created as a best effort to migrate test targets
to the new android ownership model. If you find incorrect or unnecessary
attribution in this CL, please create a separate CL to fix that.
For more details please refer to the link below,
<add g3 doc link>
Bug: 304529413
Test: N/A
Change-Id: I3322344f595f974f730dc824af0110388076d838
This reverts commit 29254e1e23.
It includes a fix for product apps for the targets without
PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE=true.
Reason for revert: reland from partner questions with a fix
Bug: b/271988499 # asked again
Test: TARGET_PRODUCT=ndk build/soong/soong_ui.bash --make-mode --soong-only out/soong/ndk.timestamp
Change-Id: I066eb75274c291cf832ad9847c0a4623af797f41
This reverts commit f2ff92f3e0.
Reason for revert: DroidMonitor: Potential culprit for Bug b/265255626 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I30f87a33803d00c03f9472a77ba73479c06044b0
Add minimum wait time for effect completion. Effects with short
durations were not completing in time with current wait time estimation.
Bug: 240946208
Test: Ran updated tests
Change-Id: I40f65244c3478fb2f0a3b84c3991313ad5e28cd9
Signed-off-by: Nathan Kulczak <nathankulczak@google.com>
see comments added in code and Android.bp
We don't have examples of a common Android ecosystem usecase, so
I'm adding one here.
Bug: 227289255
Test: after sepolicy + PRODUCT_PACKAGES:
11-19 03:14:27.460 488 488 I android.hardware.vibrator-service.example: Vibrator on for timeoutMs: 100
Change-Id: Iee430d85e23c6c8f771dc5aa77bff9be1a91f080
Adding the cancelSynced() once prepareSynced() was called and return ok.
Fix: 247687286
Test: atest VtsHalVibratorManagerTargetTest
Signed-off-by: Chase Wu <chasewu@google.com>
Change-Id: I91e08e92cb8e1399eb6acdbedf95958fbf44c393
Using service_fuzzer_defaults in
- android.hardware.health-service.aidl_fuzzer
- android.hardware.vibrator-service.example_fuzzer
Bug: 240318902
Test: m android.hardware.health-service.aidl_fuzzer
Test: m android.hardware.vibrator-service.example_fuzzer
Change-Id: I3fd1cf37a5835ebef14658ed40332132cec07e49
Some are still in VNDK because they are used in other VNDK libs.
Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
Some are still in VNDK because they are used in other VNDK libs.
Ignore-AOSP-First: some libs are still in internal master only.
Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
To try to protect against this easy mistake, I removed the implicit
capture from thread lambdas.
Bug: 228523213
Test: atest
Change-Id: I8fa37dacb4acf89848a8b17db8db317a988809d4