aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/event/CombinerChain.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2014-07-29 13:32:03 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-29 13:32:03 +0000
commit6bc87b96ce25887bb8bfe561308a65204152c577 (patch)
treefedb8aa316f7383304192b1bbb51fb9ab3bd8b1e /java/src/com/android/inputmethod/event/CombinerChain.java
parent8c6778f9ca6c09fa1034168ae13b68cea93f9420 (diff)
parent8c932cbd0a9563d03e914051e6447728875e6c2b (diff)
downloadlatinime-6bc87b96ce25887bb8bfe561308a65204152c577.tar.gz
latinime-6bc87b96ce25887bb8bfe561308a65204152c577.tar.xz
latinime-6bc87b96ce25887bb8bfe561308a65204152c577.zip
am 8c932cbd: am 3c7cb523: Merge "[HW7.5] Introduce the @Nonnull annotation" into lmp-dev
* commit '8c932cbd0a9563d03e914051e6447728875e6c2b': [HW7.5] Introduce the @Nonnull annotation
Diffstat (limited to 'java/src/com/android/inputmethod/event/CombinerChain.java')
-rw-r--r--java/src/com/android/inputmethod/event/CombinerChain.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/java/src/com/android/inputmethod/event/CombinerChain.java b/java/src/com/android/inputmethod/event/CombinerChain.java
index 8ddc9e7d9..f69bf4fd0 100644
--- a/java/src/com/android/inputmethod/event/CombinerChain.java
+++ b/java/src/com/android/inputmethod/event/CombinerChain.java
@@ -24,6 +24,8 @@ import com.android.inputmethod.latin.Constants;
import java.util.ArrayList;
import java.util.HashMap;
+import javax.annotation.Nonnull;
+
/**
* This class implements the logic chain between receiving events and generating code points.
*
@@ -87,6 +89,7 @@ public class CombinerChain {
* @return the processed event. It may be the same event, or a consumed event, or a completely
* new event. However it may never be null.
*/
+ @Nonnull
public Event processEvent(final ArrayList<Event> previousEvents, final Event newEvent) {
final ArrayList<Event> modifiablePreviousEvents = new ArrayList<>(previousEvents);
Event event = newEvent;
@@ -94,10 +97,6 @@ public class CombinerChain {
// A combiner can never return more than one event; it can return several
// code points, but they should be encapsulated within one event.
event = combiner.processEvent(modifiablePreviousEvents, event);
- if (null == event) {
- // Combiners return null if they eat the event.
- break;
- }
}
return event;
}