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:14:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-07-29 13:14:40 +0000
commit8c932cbd0a9563d03e914051e6447728875e6c2b (patch)
treee00e84fa098049f5d9dc522d32040d0edb29b261 /java/src/com/android/inputmethod/event/CombinerChain.java
parent716c7d2923b0bd455dd9e0464c0dbf289ba76965 (diff)
parent3c7cb5234fa33f67a4029d6e858ccccf5c7feeb3 (diff)
downloadlatinime-8c932cbd0a9563d03e914051e6447728875e6c2b.tar.gz
latinime-8c932cbd0a9563d03e914051e6447728875e6c2b.tar.xz
latinime-8c932cbd0a9563d03e914051e6447728875e6c2b.zip
am 3c7cb523: Merge "[HW7.5] Introduce the @Nonnull annotation" into lmp-dev
* commit '3c7cb5234fa33f67a4029d6e858ccccf5c7feeb3': [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;
}