KeyboardInputMapper: migrate most tests to InputMapperUnitTest

Some of these tests create multiple input devices and mappers, which I
didn't have time to work out how to mimic using InputMapperUnitTest. The
rest have been migrated.

Notes:
* Split out Process_UnknownKey from Process_SimpleKeyPress, since it's a
  separate behaviour to test
* As far as I can tell, Process_KeyRemapping was just testing the
  remapping code in FakeEventHub, so I removed it
* Process_WhenNotOrientationAware_ShouldNotRotateDPad now checks for a
  display ID of DISPLAY_ID, not INVALID. This is because the method
  called by KeyboardInputMapper to check orientation
  (getAssociatedViewport) will never return an orientation without also
  returning a valid display ID; setting one without the other appears to
  have been possible in the old testing infrastructure, but would only
  have affected state somewhere outside of KeyboardInputMapper.
  For similar reasons, removed the second half of
  DisplayIdConfigurationChange_NotOrientationAware.
* MarkSupportedKeyCodes was removed, as the code to test it would have
  been too bulky to test a trivial one-liner (and it would basically
  have been a change detector).

Test: atest --host inputflinger_tests
Bug: 283812079
Flag: TEST_ONLY
Change-Id: Id6d2eb4ec2bae6bd0e9a263209169785e40a6024
diff --git a/services/inputflinger/tests/InterfaceMocks.h b/services/inputflinger/tests/InterfaceMocks.h
index 25e2b45..6f7c2e5 100644
--- a/services/inputflinger/tests/InterfaceMocks.h
+++ b/services/inputflinger/tests/InterfaceMocks.h
@@ -201,7 +201,9 @@
 
     MOCK_METHOD(uint32_t, getSources, (), (const, override));
     MOCK_METHOD(std::optional<DisplayViewport>, getAssociatedViewport, (), (const));
+    MOCK_METHOD(KeyboardType, getKeyboardType, (), (const, override));
     MOCK_METHOD(bool, isEnabled, (), ());
+    MOCK_METHOD(bool, isExternal, (), (override));
 
     MOCK_METHOD(void, dump, (std::string& dump, const std::string& eventHubDevStr), ());
     MOCK_METHOD(void, addEmptyEventHubDevice, (int32_t eventHubId), ());
@@ -249,8 +251,6 @@
     MOCK_METHOD(int32_t, getMetaState, (), ());
     MOCK_METHOD(void, setKeyboardType, (KeyboardType keyboardType), ());
 
-    MOCK_METHOD(void, bumpGeneration, (), ());
-
     MOCK_METHOD(const PropertyMap&, getConfiguration, (), (const, override));
 
     MOCK_METHOD(NotifyDeviceResetArgs, notifyReset, (nsecs_t when), ());
@@ -260,5 +260,11 @@
     MOCK_METHOD(void, updateLedState, (bool reset), ());
 
     MOCK_METHOD(size_t, getMapperCount, (), ());
+
+    virtual int32_t getGeneration() const override { return mGeneration; }
+    virtual void bumpGeneration() override { mGeneration++; }
+
+private:
+    int32_t mGeneration = 0;
 };
 } // namespace android