Ensure stylus buttons generate events consistently

Add tests to verify that a touchscreen stylus and fused/unfused external
styluses generate button events consistently.

Make changes in TouchInputMapper to enforce consistentcy for external
stylus buttons. In particular, we allow the external stylus's button
state to be applied to the touches even when there is no fusion in
progress.

Bug: 246394583
Test: atest inputflinger_tests
Change-Id: I645481db18e1bec8b61d8309aa4f02afcf1a5383
diff --git a/services/inputflinger/tests/UinputDevice.h b/services/inputflinger/tests/UinputDevice.h
index ad6125b..51e331d 100644
--- a/services/inputflinger/tests/UinputDevice.h
+++ b/services/inputflinger/tests/UinputDevice.h
@@ -168,7 +168,7 @@
 // --- UinputTouchScreen ---
 
 // A multi-touch touchscreen device with specific size that also supports styluses.
-class UinputTouchScreen : public UinputDevice {
+class UinputTouchScreen : public UinputKeyboard {
 public:
     static constexpr const char* DEVICE_NAME = "Test Uinput Touch Screen";
     static constexpr int16_t PRODUCT_ID = 47;
@@ -193,7 +193,6 @@
     void sendUp();
     void sendToolType(int32_t toolType);
     void sendSync();
-    void sendKey(int32_t scanCode, int32_t value);
 
     const Point getCenterPoint();