summaryrefslogtreecommitdiff
path: root/services/vibratorservice
diff options
context:
space:
mode:
author Lais Andrade <lsandrade@google.com> 2024-10-03 07:32:36 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-10-03 07:32:36 +0000
commit00488b0849ed11b41dfc93c60ae4f9dc53e1116d (patch)
tree8a1f5cb6bc796ca6cfd8d88c3f0279d8ee26e78e /services/vibratorservice
parentcd46f387716d2f926a8bacbc0ae81378b2b9306c (diff)
parentbdd05339835a9e57e2e4fe470c5d4f9348e02873 (diff)
Merge "Add mocks for vibration session HAL APIs" into main
Diffstat (limited to 'services/vibratorservice')
-rw-r--r--services/vibratorservice/test/VibratorManagerHalWrapperAidlTest.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/services/vibratorservice/test/VibratorManagerHalWrapperAidlTest.cpp b/services/vibratorservice/test/VibratorManagerHalWrapperAidlTest.cpp
index 764d9bea4f..ca13c0b70e 100644
--- a/services/vibratorservice/test/VibratorManagerHalWrapperAidlTest.cpp
+++ b/services/vibratorservice/test/VibratorManagerHalWrapperAidlTest.cpp
@@ -31,10 +31,12 @@ using aidl::android::hardware::vibrator::CompositeEffect;
using aidl::android::hardware::vibrator::CompositePrimitive;
using aidl::android::hardware::vibrator::Effect;
using aidl::android::hardware::vibrator::EffectStrength;
+using aidl::android::hardware::vibrator::IVibrationSession;
using aidl::android::hardware::vibrator::IVibrator;
using aidl::android::hardware::vibrator::IVibratorCallback;
using aidl::android::hardware::vibrator::IVibratorManager;
using aidl::android::hardware::vibrator::PrimitivePwle;
+using aidl::android::hardware::vibrator::VibrationSessionConfig;
using namespace android;
using namespace testing;
@@ -55,6 +57,12 @@ public:
MOCK_METHOD(ndk::ScopedAStatus, triggerSynced, (const std::shared_ptr<IVibratorCallback>& cb),
(override));
MOCK_METHOD(ndk::ScopedAStatus, cancelSynced, (), (override));
+ MOCK_METHOD(ndk::ScopedAStatus, startSession,
+ (const std::vector<int32_t>& ids, const VibrationSessionConfig& s,
+ const std::shared_ptr<IVibratorCallback>& cb,
+ std::shared_ptr<IVibrationSession>* ret),
+ (override));
+ MOCK_METHOD(ndk::ScopedAStatus, clearSessions, (), (override));
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceVersion, (int32_t*), (override));
MOCK_METHOD(ndk::ScopedAStatus, getInterfaceHash, (std::string*), (override));
MOCK_METHOD(ndk::SpAIBinder, asBinder, (), (override));