From 750cd48981d78af5babf479e28c33e3666139b67 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 12 Mar 2014 17:02:13 +0900 Subject: [CB03] Pass whole events to the various input logic handlers. Bug: 13406701 Change-Id: I0a0e4e0b3357f116e1b915c548dee4575e300c92 --- java/src/com/android/inputmethod/event/Event.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'java/src/com/android/inputmethod/event/Event.java') diff --git a/java/src/com/android/inputmethod/event/Event.java b/java/src/com/android/inputmethod/event/Event.java index 31092f176..a4a17e12d 100644 --- a/java/src/com/android/inputmethod/event/Event.java +++ b/java/src/com/android/inputmethod/event/Event.java @@ -130,6 +130,12 @@ public class Event { return 0 != (FLAG_DEAD & mFlags); } + // Returns whether this is a fake key press from the suggestion strip. This happens with + // punctuation signs selected from the suggestion strip. + public boolean isSuggestionStripPress() { + return EVENT_INPUT_KEYPRESS == mType && Constants.SUGGESTION_STRIP_COORDINATE == mX; + } + // TODO: remove this method - we should not have to test this public boolean isCommittable() { return EVENT_INPUT_KEYPRESS == mType || EVENT_MODE_KEY == mType || EVENT_TOGGLE == mType; -- cgit v1.2.3-83-g751a