diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-12-12 02:03:35 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-12-12 02:03:35 +0000 |
commit | fd4775b5c3a7c7beb800813e81667c6743ead65d (patch) | |
tree | 7657a55f3d9000fad0ed629254fb001c73eb79c4 | |
parent | dc3aaa41d29ddf60d0ffd5a24303c725747441d1 (diff) | |
parent | a785d00d111b2dce9f189cb5993d06561f309fd2 (diff) | |
download | native-fd4775b5c3a7c7beb800813e81667c6743ead65d.tar.gz |
Snap for 6066307 from a785d00d111b2dce9f189cb5993d06561f309fd2 to qt-qpr2-release
Change-Id: I88c27953426158e35c4113ac7d5875cac80ef616
-rw-r--r-- | services/inputflinger/InputClassifier.cpp | 2 | ||||
-rw-r--r-- | services/inputflinger/InputDispatcher.cpp | 52 |
2 files changed, 3 insertions, 51 deletions
diff --git a/services/inputflinger/InputClassifier.cpp b/services/inputflinger/InputClassifier.cpp index 6a7f2797f4..ef1a2247e9 100644 --- a/services/inputflinger/InputClassifier.cpp +++ b/services/inputflinger/InputClassifier.cpp @@ -82,7 +82,7 @@ static bool isTouchEvent(const NotifyMotionArgs& args) { // Check if the "deep touch" feature is on. static bool deepPressEnabled() { std::string flag_value = server_configurable_flags::GetServerConfigurableFlag( - INPUT_NATIVE_BOOT, DEEP_PRESS_ENABLED, "false"); + INPUT_NATIVE_BOOT, DEEP_PRESS_ENABLED, "true"); std::transform(flag_value.begin(), flag_value.end(), flag_value.begin(), ::tolower); if (flag_value == "1" || flag_value == "true") { ALOGI("Deep press feature enabled."); diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp index c2ff4c9629..b921d954dc 100644 --- a/services/inputflinger/InputDispatcher.cpp +++ b/services/inputflinger/InputDispatcher.cpp @@ -109,36 +109,6 @@ static inline const char* toString(bool value) { return value ? "true" : "false"; } -static std::string motionActionToString(int32_t action) { - // Convert MotionEvent action to string - switch(action & AMOTION_EVENT_ACTION_MASK) { - case AMOTION_EVENT_ACTION_DOWN: - return "DOWN"; - case AMOTION_EVENT_ACTION_MOVE: - return "MOVE"; - case AMOTION_EVENT_ACTION_UP: - return "UP"; - case AMOTION_EVENT_ACTION_POINTER_DOWN: - return "POINTER_DOWN"; - case AMOTION_EVENT_ACTION_POINTER_UP: - return "POINTER_UP"; - } - return StringPrintf("%" PRId32, action); -} - -static std::string keyActionToString(int32_t action) { - // Convert KeyEvent action to string - switch (action) { - case AKEY_EVENT_ACTION_DOWN: - return "DOWN"; - case AKEY_EVENT_ACTION_UP: - return "UP"; - case AKEY_EVENT_ACTION_MULTIPLE: - return "MULTIPLE"; - } - return StringPrintf("%" PRId32, action); -} - static std::string dispatchModeToString(int32_t dispatchMode) { switch (dispatchMode) { case InputTarget::FLAG_DISPATCH_AS_IS: @@ -4614,11 +4584,7 @@ InputDispatcher::KeyEntry::~KeyEntry() { } void InputDispatcher::KeyEntry::appendDescription(std::string& msg) const { - msg += StringPrintf("KeyEvent(deviceId=%d, source=0x%08x, displayId=%" PRId32 ", action=%s, " - "flags=0x%08x, keyCode=%d, scanCode=%d, metaState=0x%08x, " - "repeatCount=%d), policyFlags=0x%08x", - deviceId, source, displayId, keyActionToString(action).c_str(), flags, keyCode, - scanCode, metaState, repeatCount, policyFlags); + msg += StringPrintf("KeyEvent"); } void InputDispatcher::KeyEntry::recycle() { @@ -4661,21 +4627,7 @@ InputDispatcher::MotionEntry::~MotionEntry() { } void InputDispatcher::MotionEntry::appendDescription(std::string& msg) const { - msg += StringPrintf("MotionEvent(deviceId=%d, source=0x%08x, displayId=%" PRId32 - ", action=%s, actionButton=0x%08x, flags=0x%08x, metaState=0x%08x, buttonState=0x%08x, " - "classification=%s, edgeFlags=0x%08x, xPrecision=%.1f, yPrecision=%.1f, pointers=[", - deviceId, source, displayId, motionActionToString(action).c_str(), actionButton, flags, - metaState, buttonState, motionClassificationToString(classification), edgeFlags, - xPrecision, yPrecision); - - for (uint32_t i = 0; i < pointerCount; i++) { - if (i) { - msg += ", "; - } - msg += StringPrintf("%d: (%.1f, %.1f)", pointerProperties[i].id, - pointerCoords[i].getX(), pointerCoords[i].getY()); - } - msg += StringPrintf("]), policyFlags=0x%08x", policyFlags); + msg += StringPrintf("MotionEvent"); } |