Maintain CapsLock, NumLock and ScrollLock of keyboard

Currently, CapsLock, NumLock and ScrollLock would keep the state in
KeyboardInputMapper. It cause 2 problems:

1. If user reattach the hardware keyboard, the state would be reset.
2. If there are multiple hardware keyboards, we can't make them
consistent.

We need to store them in the global state and notify others if there
is some state changed.

- Store the meta state of CapsLock, NumLock and ScrollLock in InputReader.
- Set NumLock default on.

Bug: 141329037
Test: atest inputflinger_tests
Change-Id: I3ff5e9d25ed76466a86080350f00d39d6db57c8c
diff --git a/services/inputflinger/reader/mapper/KeyboardInputMapper.h b/services/inputflinger/reader/mapper/KeyboardInputMapper.h
index 0bdeded..4c0b42a 100644
--- a/services/inputflinger/reader/mapper/KeyboardInputMapper.h
+++ b/services/inputflinger/reader/mapper/KeyboardInputMapper.h
@@ -42,6 +42,7 @@
     virtual int32_t getMetaState() override;
     virtual void updateMetaState(int32_t keyCode) override;
     virtual std::optional<int32_t> getAssociatedDisplayId() override;
+    virtual void updateLedState(bool reset);
 
 private:
     // The current viewport.
@@ -93,7 +94,6 @@
 
     void resetLedState();
     void initializeLedState(LedState& ledState, int32_t led);
-    void updateLedState(bool reset);
     void updateLedStateForModifier(LedState& ledState, int32_t led, int32_t modifier, bool reset);
     std::optional<DisplayViewport> findViewport(nsecs_t when,
                                                 const InputReaderConfiguration* config);