Create benchmarks for libvibratorservice module
Adding benchmarks for vibrator::HalController, including the cached
execution of some getters.
Output on coral device:
https://paste.googleplex.com/5006149054103552
Some side fixes:
- Remove AndroidTest.xml from libpowermanager_benchmarks,
which is not required for ci and metric upload integration.
- Add missing EXTERNAL_AMPLITUDE_CONTROL capability to HIDL wrappers.
Fix: 159799891
Test: atest libvibratorservice_benchmarks
Change-Id: I193d070fad67414afd4025e747290d56203d7c56
diff --git a/services/vibratorservice/VibratorHalWrapper.cpp b/services/vibratorservice/VibratorHalWrapper.cpp
index ce20aeb..9672644 100644
--- a/services/vibratorservice/VibratorHalWrapper.cpp
+++ b/services/vibratorservice/VibratorHalWrapper.cpp
@@ -501,6 +501,10 @@
}
if (externalControlResult.withDefault(false)) {
capabilities |= Capabilities::EXTERNAL_CONTROL;
+
+ if (amplitudeResult.withDefault(false)) {
+ capabilities |= Capabilities::EXTERNAL_AMPLITUDE_CONTROL;
+ }
}
return HalResult<Capabilities>::fromReturn(externalControlResult, capabilities);