vibrator: add CAP_EXTERNAL_AMPLITUDE_CONTROL
For HIDL, vibrator may change the value of supportsAmplitudeControl
based on context. Since the interface is being redone in AIDL, we're
avoiding this changing value and providing capabilities for amplitudes
we expect to be available in different states.
Bug: 141828236
Test: VtsHalVibratorTargetTest
Change-Id: Idf0b28ffe5b1175469d32e790b10b4232482dc2b
diff --git a/vibrator/aidl/default/Vibrator.cpp b/vibrator/aidl/default/Vibrator.cpp
index 2aec8c5..18be1a6 100644
--- a/vibrator/aidl/default/Vibrator.cpp
+++ b/vibrator/aidl/default/Vibrator.cpp
@@ -27,7 +27,8 @@
ndk::ScopedAStatus Vibrator::getCapabilities(int32_t* _aidl_return) {
LOG(INFO) << "Vibrator reporting capabilities";
*_aidl_return = IVibrator::CAP_ON_CALLBACK | IVibrator::CAP_PERFORM_CALLBACK |
- IVibrator::CAP_AMPLITUDE_CONTROL | IVibrator::CAP_EXTERNAL_CONTROL;
+ IVibrator::CAP_AMPLITUDE_CONTROL | IVibrator::CAP_EXTERNAL_CONTROL |
+ IVibrator::CAP_EXTERNAL_AMPLITUDE_CONTROL;
return ndk::ScopedAStatus::ok();
}