@@ -105,36 +105,6 @@ static inline const char* toString(bool value) {
105105 return value ? " true" : " false" ;
106106}
107107
108- static std::string motionActionToString (int32_t action) {
109- // Convert MotionEvent action to string
110- switch (action & AMOTION_EVENT_ACTION_MASK) {
111- case AMOTION_EVENT_ACTION_DOWN:
112- return " DOWN" ;
113- case AMOTION_EVENT_ACTION_MOVE:
114- return " MOVE" ;
115- case AMOTION_EVENT_ACTION_UP:
116- return " UP" ;
117- case AMOTION_EVENT_ACTION_POINTER_DOWN:
118- return " POINTER_DOWN" ;
119- case AMOTION_EVENT_ACTION_POINTER_UP:
120- return " POINTER_UP" ;
121- }
122- return StringPrintf (" %" PRId32, action);
123- }
124-
125- static std::string keyActionToString (int32_t action) {
126- // Convert KeyEvent action to string
127- switch (action) {
128- case AKEY_EVENT_ACTION_DOWN:
129- return " DOWN" ;
130- case AKEY_EVENT_ACTION_UP:
131- return " UP" ;
132- case AKEY_EVENT_ACTION_MULTIPLE:
133- return " MULTIPLE" ;
134- }
135- return StringPrintf (" %" PRId32, action);
136- }
137-
138108static inline int32_t getMotionEventActionPointerIndex (int32_t action) {
139109 return (action & AMOTION_EVENT_ACTION_POINTER_INDEX_MASK)
140110 >> AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT;
@@ -4006,11 +3976,7 @@ InputDispatcher::KeyEntry::~KeyEntry() {
40063976}
40073977
40083978void InputDispatcher::KeyEntry::appendDescription (std::string& msg) const {
4009- msg += StringPrintf (" KeyEvent(deviceId=%d, source=0x%08x, action=%s, "
4010- " flags=0x%08x, keyCode=%d, scanCode=%d, metaState=0x%08x, "
4011- " repeatCount=%d), policyFlags=0x%08x" ,
4012- deviceId, source, keyActionToString (action).c_str (), flags, keyCode,
4013- scanCode, metaState, repeatCount, policyFlags);
3979+ msg += StringPrintf (" KeyEvent" );
40143980}
40153981
40163982void InputDispatcher::KeyEntry::recycle () {
@@ -4051,19 +4017,7 @@ InputDispatcher::MotionEntry::~MotionEntry() {
40514017}
40524018
40534019void InputDispatcher::MotionEntry::appendDescription (std::string& msg) const {
4054- msg += StringPrintf (" MotionEvent(deviceId=%d, source=0x%08x, action=%s, actionButton=0x%08x, "
4055- " flags=0x%08x, metaState=0x%08x, buttonState=0x%08x, "
4056- " edgeFlags=0x%08x, xPrecision=%.1f, yPrecision=%.1f, displayId=%d, pointers=[" ,
4057- deviceId, source, motionActionToString (action).c_str (), actionButton, flags, metaState,
4058- buttonState, edgeFlags, xPrecision, yPrecision, displayId);
4059- for (uint32_t i = 0 ; i < pointerCount; i++) {
4060- if (i) {
4061- msg += " , " ;
4062- }
4063- msg += StringPrintf (" %d: (%.1f, %.1f)" , pointerProperties[i].id ,
4064- pointerCoords[i].getX (), pointerCoords[i].getY ());
4065- }
4066- msg += StringPrintf (" ]), policyFlags=0x%08x" , policyFlags);
4020+ msg += StringPrintf (" MotionEvent" );
40674021}
40684022
40694023
0 commit comments