Skip to content
peyo-hd edited this page Dec 20, 2015 · 1 revision

Avoid logcat flood

Apply following patch under frameworks/base, to avoid logcat flood by mouse event.

 core/java/android/view/GestureDetector.java
 @@ line 490 @@ public class GestureDetector {
     public boolean onTouchEvent(MotionEvent ev) {
 +        switch(ev.getAction() & MotionEvent.ACTION_MASK) {
 +        case MotionEvent.ACTION_HOVER_MOVE:
 +        case MotionEvent.ACTION_HOVER_ENTER:
 +        case MotionEvent.ACTION_HOVER_EXIT:
 +        case MotionEvent.ACTION_BUTTON_PRESS:
 +        case MotionEvent.ACTION_BUTTON_RELEASE:
 +        case MotionEvent.ACTION_SCROLL:
 +            return false;
 +        }
          if (mInputEventConsistencyVerifier != null) {
Clone this wiki locally