Loading include/input/Input.h +2 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,8 @@ protected: nsecs_t mEventTime; }; std::ostream& operator<<(std::ostream& out, const KeyEvent& event); /* * Motion events. */ Loading libs/input/Input.cpp +22 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,28 @@ const char* KeyEvent::actionToString(int32_t action) { return "UNKNOWN"; } std::ostream& operator<<(std::ostream& out, const KeyEvent& event) { out << "KeyEvent { action=" << KeyEvent::actionToString(event.getAction()); out << ", keycode=" << event.getKeyCode() << "(" << KeyEvent::getLabel(event.getKeyCode()) << ")"; if (event.getMetaState() != 0) { out << ", metaState=" << event.getMetaState(); } out << ", eventTime=" << event.getEventTime(); out << ", downTime=" << event.getDownTime(); out << ", flags=" << std::hex << event.getFlags() << std::dec; out << ", repeatCount=" << event.getRepeatCount(); out << ", deviceId=" << event.getDeviceId(); out << ", source=" << inputEventSourceToString(event.getSource()); out << ", displayId=" << event.getDisplayId(); out << ", eventId=" << event.getId(); out << "}"; return out; } // --- PointerCoords --- float PointerCoords::getAxisValue(int32_t axis) const { Loading libs/input/android/os/InputEventInjectionResult.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -37,4 +37,7 @@ enum InputEventInjectionResult { /* Injection failed due to a timeout. */ TIMED_OUT = 3, ftl_first=PENDING, ftl_last=TIMED_OUT, } services/inputflinger/dispatcher/Entry.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -331,4 +331,28 @@ uint32_t DispatchEntry::nextSeq() { return seq; } std::ostream& operator<<(std::ostream& out, const DispatchEntry& entry) { out << "DispatchEntry{resolvedAction="; switch (entry.eventEntry->type) { case EventEntry::Type::KEY: { out << KeyEvent::actionToString(entry.resolvedAction); break; } case EventEntry::Type::MOTION: { out << MotionEvent::actionToString(entry.resolvedAction); break; } default: { out << "<invalid, not a key or a motion>"; break; } } std::string transform; entry.transform.dump(transform, "transform"); out << ", resolvedFlags=" << entry.resolvedFlags << ", targetFlags=" << entry.targetFlags.string() << ", transform=" << transform << "} original =" << entry.eventEntry->getDescription(); return out; } } // namespace android::inputdispatcher services/inputflinger/dispatcher/Entry.h +2 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,8 @@ private: static uint32_t nextSeq(); }; std::ostream& operator<<(std::ostream& out, const DispatchEntry& entry); VerifiedKeyEvent verifiedKeyEventFromKeyEntry(const KeyEntry& entry); VerifiedMotionEvent verifiedMotionEventFromMotionEntry(const MotionEntry& entry, const ui::Transform& rawTransform); Loading Loading
include/input/Input.h +2 −0 Original line number Diff line number Diff line Loading @@ -550,6 +550,8 @@ protected: nsecs_t mEventTime; }; std::ostream& operator<<(std::ostream& out, const KeyEvent& event); /* * Motion events. */ Loading
libs/input/Input.cpp +22 −0 Original line number Diff line number Diff line Loading @@ -343,6 +343,28 @@ const char* KeyEvent::actionToString(int32_t action) { return "UNKNOWN"; } std::ostream& operator<<(std::ostream& out, const KeyEvent& event) { out << "KeyEvent { action=" << KeyEvent::actionToString(event.getAction()); out << ", keycode=" << event.getKeyCode() << "(" << KeyEvent::getLabel(event.getKeyCode()) << ")"; if (event.getMetaState() != 0) { out << ", metaState=" << event.getMetaState(); } out << ", eventTime=" << event.getEventTime(); out << ", downTime=" << event.getDownTime(); out << ", flags=" << std::hex << event.getFlags() << std::dec; out << ", repeatCount=" << event.getRepeatCount(); out << ", deviceId=" << event.getDeviceId(); out << ", source=" << inputEventSourceToString(event.getSource()); out << ", displayId=" << event.getDisplayId(); out << ", eventId=" << event.getId(); out << "}"; return out; } // --- PointerCoords --- float PointerCoords::getAxisValue(int32_t axis) const { Loading
libs/input/android/os/InputEventInjectionResult.aidl +3 −0 Original line number Diff line number Diff line Loading @@ -37,4 +37,7 @@ enum InputEventInjectionResult { /* Injection failed due to a timeout. */ TIMED_OUT = 3, ftl_first=PENDING, ftl_last=TIMED_OUT, }
services/inputflinger/dispatcher/Entry.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -331,4 +331,28 @@ uint32_t DispatchEntry::nextSeq() { return seq; } std::ostream& operator<<(std::ostream& out, const DispatchEntry& entry) { out << "DispatchEntry{resolvedAction="; switch (entry.eventEntry->type) { case EventEntry::Type::KEY: { out << KeyEvent::actionToString(entry.resolvedAction); break; } case EventEntry::Type::MOTION: { out << MotionEvent::actionToString(entry.resolvedAction); break; } default: { out << "<invalid, not a key or a motion>"; break; } } std::string transform; entry.transform.dump(transform, "transform"); out << ", resolvedFlags=" << entry.resolvedFlags << ", targetFlags=" << entry.targetFlags.string() << ", transform=" << transform << "} original =" << entry.eventEntry->getDescription(); return out; } } // namespace android::inputdispatcher
services/inputflinger/dispatcher/Entry.h +2 −0 Original line number Diff line number Diff line Loading @@ -254,6 +254,8 @@ private: static uint32_t nextSeq(); }; std::ostream& operator<<(std::ostream& out, const DispatchEntry& entry); VerifiedKeyEvent verifiedKeyEventFromKeyEntry(const KeyEntry& entry); VerifiedMotionEvent verifiedMotionEventFromMotionEntry(const MotionEntry& entry, const ui::Transform& rawTransform); Loading