Loading core/java/android/view/EventLogTags.logtags 0 → 100644 +49 −0 Original line number Diff line number Diff line # See system/core/logcat/event.logtags for a description of the format of this file. option java_package android.view # The entries in this file map a sparse set of log tag numbers to tag names. # This is installed on the device, in /system/etc, and parsed by logcat. # # Tag numbers are decimal integers, from 0 to 2^31. (Let's leave the # negative values alone for now.) # # Tag names are one or more ASCII letters and numbers or underscores, i.e. # "[A-Z][a-z][0-9]_". Do not include spaces or punctuation (the former # impacts log readability, the latter makes regex searches more annoying). # # Tag numbers and names are separated by whitespace. Blank lines and lines # starting with '#' are ignored. # # Optionally, after the tag names can be put a description for the value(s) # of the tag. Description are in the format # (<name>|data type[|data unit]) # Multiple values are separated by commas. # # The data type is a number from the following values: # 1: int # 2: long # 3: string # 4: list # # The data unit is a number taken from the following list: # 1: Number of objects # 2: Number of bytes # 3: Number of milliseconds # 4: Number of allocations # 5: Id # 6: Percent # Default value for data of type int/long is 2 (bytes). # # See system/core/logcat/event.logtags for the master copy of the tags. # 62000 - 62199 reserved for inputflinger # --------------------------- # android.view # --------------------------- # Enqueue Input Event 62002 view_enqueue_input_event (eventType|3),(action|3) # NOTE - the range 1000000-2000000 is reserved for partners and others who # want to define their own log tags without conflicting with the core platform. No newline at end of file core/java/android/view/ViewRootImpl.java +14 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ import android.os.UserHandle; import android.sysprop.DisplayProperties; import android.util.AndroidRuntimeException; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Log; import android.util.LongArray; import android.util.MergedConfiguration; Loading Loading @@ -7946,6 +7947,19 @@ public final class ViewRootImpl implements ViewParent, InputEventReceiver receiver, int flags, boolean processImmediately) { QueuedInputEvent q = obtainQueuedInputEvent(event, receiver, flags); if (event instanceof MotionEvent) { MotionEvent me = (MotionEvent) event; if (me.getAction() == MotionEvent.ACTION_CANCEL) { EventLog.writeEvent(EventLogTags.VIEW_ENQUEUE_INPUT_EVENT, "Motion - Cancel", getTitle()); } } else if (event instanceof KeyEvent) { KeyEvent ke = (KeyEvent) event; if (ke.isCanceled()) { EventLog.writeEvent(EventLogTags.VIEW_ENQUEUE_INPUT_EVENT, "Key - Cancel", getTitle()); } } // Always enqueue the input event in order, regardless of its time stamp. // We do this because the application or the IME may inject key events // in response to touch events and we want to ensure that the injected keys Loading Loading
core/java/android/view/EventLogTags.logtags 0 → 100644 +49 −0 Original line number Diff line number Diff line # See system/core/logcat/event.logtags for a description of the format of this file. option java_package android.view # The entries in this file map a sparse set of log tag numbers to tag names. # This is installed on the device, in /system/etc, and parsed by logcat. # # Tag numbers are decimal integers, from 0 to 2^31. (Let's leave the # negative values alone for now.) # # Tag names are one or more ASCII letters and numbers or underscores, i.e. # "[A-Z][a-z][0-9]_". Do not include spaces or punctuation (the former # impacts log readability, the latter makes regex searches more annoying). # # Tag numbers and names are separated by whitespace. Blank lines and lines # starting with '#' are ignored. # # Optionally, after the tag names can be put a description for the value(s) # of the tag. Description are in the format # (<name>|data type[|data unit]) # Multiple values are separated by commas. # # The data type is a number from the following values: # 1: int # 2: long # 3: string # 4: list # # The data unit is a number taken from the following list: # 1: Number of objects # 2: Number of bytes # 3: Number of milliseconds # 4: Number of allocations # 5: Id # 6: Percent # Default value for data of type int/long is 2 (bytes). # # See system/core/logcat/event.logtags for the master copy of the tags. # 62000 - 62199 reserved for inputflinger # --------------------------- # android.view # --------------------------- # Enqueue Input Event 62002 view_enqueue_input_event (eventType|3),(action|3) # NOTE - the range 1000000-2000000 is reserved for partners and others who # want to define their own log tags without conflicting with the core platform. No newline at end of file
core/java/android/view/ViewRootImpl.java +14 −0 Original line number Diff line number Diff line Loading @@ -115,6 +115,7 @@ import android.os.UserHandle; import android.sysprop.DisplayProperties; import android.util.AndroidRuntimeException; import android.util.DisplayMetrics; import android.util.EventLog; import android.util.Log; import android.util.LongArray; import android.util.MergedConfiguration; Loading Loading @@ -7946,6 +7947,19 @@ public final class ViewRootImpl implements ViewParent, InputEventReceiver receiver, int flags, boolean processImmediately) { QueuedInputEvent q = obtainQueuedInputEvent(event, receiver, flags); if (event instanceof MotionEvent) { MotionEvent me = (MotionEvent) event; if (me.getAction() == MotionEvent.ACTION_CANCEL) { EventLog.writeEvent(EventLogTags.VIEW_ENQUEUE_INPUT_EVENT, "Motion - Cancel", getTitle()); } } else if (event instanceof KeyEvent) { KeyEvent ke = (KeyEvent) event; if (ke.isCanceled()) { EventLog.writeEvent(EventLogTags.VIEW_ENQUEUE_INPUT_EVENT, "Key - Cancel", getTitle()); } } // Always enqueue the input event in order, regardless of its time stamp. // We do this because the application or the IME may inject key events // in response to touch events and we want to ensure that the injected keys Loading