Loading include/input/Input.h +2 −2 Original line number Diff line number Diff line Loading @@ -529,7 +529,7 @@ public: inline nsecs_t getEventTime() const { return mEventTime; } static const char* getLabel(int32_t keyCode); static int32_t getKeyCodeFromLabel(const char* label); static std::optional<int> getKeyCodeFromLabel(const char* label); void initialize(int32_t id, int32_t deviceId, uint32_t source, int32_t displayId, std::array<uint8_t, 32> hmac, int32_t action, int32_t flags, int32_t keyCode, Loading Loading @@ -842,7 +842,7 @@ public: } static const char* getLabel(int32_t axis); static int32_t getAxisFromLabel(const char* label); static std::optional<int> getAxisFromLabel(const char* label); static std::string actionToString(int32_t action); Loading include/input/InputEventLabels.h +6 −6 Original line number Diff line number Diff line Loading @@ -35,22 +35,22 @@ struct InputEventLabel { class InputEventLookup { public: static int lookupValueByLabel(const std::unordered_map<std::string, int>& map, static std::optional<int> lookupValueByLabel(const std::unordered_map<std::string, int>& map, const char* literal); static const char* lookupLabelByValue(const std::vector<InputEventLabel>& vec, int value); static int32_t getKeyCodeByLabel(const char* label); static std::optional<int> getKeyCodeByLabel(const char* label); static const char* getLabelByKeyCode(int32_t keyCode); static uint32_t getKeyFlagByLabel(const char* label); static std::optional<int> getKeyFlagByLabel(const char* label); static int32_t getAxisByLabel(const char* label); static std::optional<int> getAxisByLabel(const char* label); static const char* getAxisLabel(int32_t axisId); static int32_t getLedByLabel(const char* label); static std::optional<int> getLedByLabel(const char* label); private: static const std::unordered_map<std::string, int> KEYCODES; Loading libs/binder/Parcel.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -375,6 +375,10 @@ size_t Parcel::dataSize() const return (mDataSize > mDataPos ? mDataSize : mDataPos); } size_t Parcel::dataBufferSize() const { return mDataSize; } size_t Parcel::dataAvail() const { size_t result = dataSize() - dataPosition(); Loading libs/binder/TEST_MAPPING +14 −0 Original line number Diff line number Diff line Loading @@ -99,5 +99,19 @@ { "name": "binderLibTest" } ], "kernel-presubmit": [ { "name": "binderDriverInterfaceTest" }, { "name": "binderLibTest" }, { "name": "binderSafeInterfaceTest" }, { "name": "memunreachable_binder_test" } ] } libs/binder/include/binder/Parcel.h +1 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ public: size_t dataAvail() const; size_t dataPosition() const; size_t dataCapacity() const; size_t dataBufferSize() const; status_t setDataSize(size_t size); Loading Loading
include/input/Input.h +2 −2 Original line number Diff line number Diff line Loading @@ -529,7 +529,7 @@ public: inline nsecs_t getEventTime() const { return mEventTime; } static const char* getLabel(int32_t keyCode); static int32_t getKeyCodeFromLabel(const char* label); static std::optional<int> getKeyCodeFromLabel(const char* label); void initialize(int32_t id, int32_t deviceId, uint32_t source, int32_t displayId, std::array<uint8_t, 32> hmac, int32_t action, int32_t flags, int32_t keyCode, Loading Loading @@ -842,7 +842,7 @@ public: } static const char* getLabel(int32_t axis); static int32_t getAxisFromLabel(const char* label); static std::optional<int> getAxisFromLabel(const char* label); static std::string actionToString(int32_t action); Loading
include/input/InputEventLabels.h +6 −6 Original line number Diff line number Diff line Loading @@ -35,22 +35,22 @@ struct InputEventLabel { class InputEventLookup { public: static int lookupValueByLabel(const std::unordered_map<std::string, int>& map, static std::optional<int> lookupValueByLabel(const std::unordered_map<std::string, int>& map, const char* literal); static const char* lookupLabelByValue(const std::vector<InputEventLabel>& vec, int value); static int32_t getKeyCodeByLabel(const char* label); static std::optional<int> getKeyCodeByLabel(const char* label); static const char* getLabelByKeyCode(int32_t keyCode); static uint32_t getKeyFlagByLabel(const char* label); static std::optional<int> getKeyFlagByLabel(const char* label); static int32_t getAxisByLabel(const char* label); static std::optional<int> getAxisByLabel(const char* label); static const char* getAxisLabel(int32_t axisId); static int32_t getLedByLabel(const char* label); static std::optional<int> getLedByLabel(const char* label); private: static const std::unordered_map<std::string, int> KEYCODES; Loading
libs/binder/Parcel.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -375,6 +375,10 @@ size_t Parcel::dataSize() const return (mDataSize > mDataPos ? mDataSize : mDataPos); } size_t Parcel::dataBufferSize() const { return mDataSize; } size_t Parcel::dataAvail() const { size_t result = dataSize() - dataPosition(); Loading
libs/binder/TEST_MAPPING +14 −0 Original line number Diff line number Diff line Loading @@ -99,5 +99,19 @@ { "name": "binderLibTest" } ], "kernel-presubmit": [ { "name": "binderDriverInterfaceTest" }, { "name": "binderLibTest" }, { "name": "binderSafeInterfaceTest" }, { "name": "memunreachable_binder_test" } ] }
libs/binder/include/binder/Parcel.h +1 −0 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ public: size_t dataAvail() const; size_t dataPosition() const; size_t dataCapacity() const; size_t dataBufferSize() const; status_t setDataSize(size_t size); Loading