@@ -201,7 +201,9 @@ class MockInputDevice : public InputDevice {
201201
202202 MOCK_METHOD (uint32_t , getSources, (), (const , override ));
203203 MOCK_METHOD (std::optional<DisplayViewport>, getAssociatedViewport, (), (const ));
204+ MOCK_METHOD (KeyboardType, getKeyboardType, (), (const , override ));
204205 MOCK_METHOD (bool , isEnabled, (), ());
206+ MOCK_METHOD (bool , isExternal, (), (override ));
205207
206208 MOCK_METHOD (void , dump, (std::string& dump, const std::string& eventHubDevStr), ());
207209 MOCK_METHOD (void , addEmptyEventHubDevice, (int32_t eventHubId), ());
@@ -249,8 +251,6 @@ class MockInputDevice : public InputDevice {
249251 MOCK_METHOD (int32_t , getMetaState, (), ());
250252 MOCK_METHOD (void , setKeyboardType, (KeyboardType keyboardType), ());
251253
252- MOCK_METHOD (void , bumpGeneration, (), ());
253-
254254 MOCK_METHOD (const PropertyMap&, getConfiguration, (), (const , override ));
255255
256256 MOCK_METHOD (NotifyDeviceResetArgs, notifyReset, (nsecs_t when), ());
@@ -260,5 +260,11 @@ class MockInputDevice : public InputDevice {
260260 MOCK_METHOD (void , updateLedState, (bool reset), ());
261261
262262 MOCK_METHOD (size_t , getMapperCount, (), ());
263+
264+ virtual int32_t getGeneration () const override { return mGeneration ; }
265+ virtual void bumpGeneration () override { mGeneration ++; }
266+
267+ private:
268+ int32_t mGeneration = 0 ;
263269};
264270} // namespace android
0 commit comments