diff options
author | 2014-07-30 17:11:34 +0000 | |
---|---|---|
committer | 2014-07-30 17:11:34 +0000 | |
commit | 46f56262ed3fecf6cbe7341dc903636b30b23f2c (patch) | |
tree | 071b95987eaccf3ad13ce0871e0bf29cb6ee7dde /java/src/com/android/inputmethod/event/CombinerChain.java | |
parent | 026350a179995ef530a38cde3043d813a55129b1 (diff) | |
parent | 99e13e485a314615a6523794fbb26eecb6e67a74 (diff) | |
download | latinime-46f56262ed3fecf6cbe7341dc903636b30b23f2c.tar.gz latinime-46f56262ed3fecf6cbe7341dc903636b30b23f2c.tar.xz latinime-46f56262ed3fecf6cbe7341dc903636b30b23f2c.zip |
am 99e13e48: am bf2a3210: Merge "[HW6] Split processing and applying the event." into lmp-dev
* commit '99e13e485a314615a6523794fbb26eecb6e67a74':
[HW6] Split processing and applying the event.
Diffstat (limited to 'java/src/com/android/inputmethod/event/CombinerChain.java')
-rw-r--r-- | java/src/com/android/inputmethod/event/CombinerChain.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/java/src/com/android/inputmethod/event/CombinerChain.java b/java/src/com/android/inputmethod/event/CombinerChain.java index 61bc11b39..8c6b3d949 100644 --- a/java/src/com/android/inputmethod/event/CombinerChain.java +++ b/java/src/com/android/inputmethod/event/CombinerChain.java @@ -81,11 +81,11 @@ public class CombinerChain { } /** - * Pass a new event through the whole chain. + * Process an event through the combining chain, and return a processed event to apply. * @param previousEvents the list of previous events in this composition * @param newEvent the new event to process */ - public void processEvent(final ArrayList<Event> previousEvents, final Event newEvent) { + public Event processEvent(final ArrayList<Event> previousEvents, final Event newEvent) { final ArrayList<Event> modifiablePreviousEvents = new ArrayList<>(previousEvents); Event event = newEvent; for (final Combiner combiner : mCombiners) { @@ -97,6 +97,14 @@ public class CombinerChain { break; } } + return event; + } + + /** + * Apply a processed event. + * @param event the event to be applied + */ + public void applyProcessedEvent(final Event event) { if (null != event) { // TODO: figure out the generic way of doing this if (Constants.CODE_DELETE == event.mKeyCode) { |