diff options
author | 2014-07-29 13:39:41 +0000 | |
---|---|---|
committer | 2014-07-29 13:39:41 +0000 | |
commit | 96089b4f687f1a9990625ef7cdb2f055829d36a9 (patch) | |
tree | 7a397296ff4e9cc39c455df541b5866ad49a6504 /java/src/com/android/inputmethod/event/CombinerChain.java | |
parent | b874b87eb3938f07ddbe249847e97f027628a418 (diff) | |
parent | 6bc87b96ce25887bb8bfe561308a65204152c577 (diff) | |
download | latinime-96089b4f687f1a9990625ef7cdb2f055829d36a9.tar.gz latinime-96089b4f687f1a9990625ef7cdb2f055829d36a9.tar.xz latinime-96089b4f687f1a9990625ef7cdb2f055829d36a9.zip |
am 6bc87b96: am 8c932cbd: am 3c7cb523: Merge "[HW7.5] Introduce the @Nonnull annotation" into lmp-dev
* commit '6bc87b96ce25887bb8bfe561308a65204152c577':
[HW7.5] Introduce the @Nonnull annotation
Diffstat (limited to '')
-rw-r--r-- | java/src/com/android/inputmethod/event/CombinerChain.java | 7 |
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; } |