Revert "[HW7.5] Introduce the @Nonnull annotation"

This reverts commit 60a2cd8ac439bf41bfddc5f5f339feda7c7ff175.

Reverting due to build breakage under the unbundled branch.

Change-Id: Iab2988c53884166f62c95da920ac7a7079a0e5a0
diff --git a/java/Android.mk b/java/Android.mk
index 9b8b2b4..b580624 100644
--- a/java/Android.mk
+++ b/java/Android.mk
@@ -25,7 +25,7 @@
 
 LOCAL_JNI_SHARED_LIBRARIES := libjni_latinime
 
-LOCAL_STATIC_JAVA_LIBRARIES := android-common inputmethod-common android-support-v4 jsr305
+LOCAL_STATIC_JAVA_LIBRARIES := android-common inputmethod-common android-support-v4
 
 # Do not compress dictionary files to mmap dict data runtime
 LOCAL_AAPT_FLAGS := -0 .dict
diff --git a/java/src/com/android/inputmethod/event/Combiner.java b/java/src/com/android/inputmethod/event/Combiner.java
index fee93f0..8b808c6 100644
--- a/java/src/com/android/inputmethod/event/Combiner.java
+++ b/java/src/com/android/inputmethod/event/Combiner.java
@@ -18,8 +18,6 @@
 
 import java.util.ArrayList;
 
-import javax.annotation.Nonnull;
-
 /**
  * A generic interface for combiners. Combiners are objects that transform chains of input events
  * into committable strings and manage feedback to show to the user on the combining state.
@@ -35,7 +33,6 @@
      * @param event the event to combine with the existing state.
      * @return the resulting event.
      */
-    @Nonnull
     Event processEvent(ArrayList<Event> previousEvents, Event event);
 
     /**
diff --git a/java/src/com/android/inputmethod/event/CombinerChain.java b/java/src/com/android/inputmethod/event/CombinerChain.java
index f69bf4f..8ddc9e7 100644
--- a/java/src/com/android/inputmethod/event/CombinerChain.java
+++ b/java/src/com/android/inputmethod/event/CombinerChain.java
@@ -24,8 +24,6 @@
 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.
  *
@@ -89,7 +87,6 @@
      * @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;
@@ -97,6 +94,10 @@
             // 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;
     }
diff --git a/java/src/com/android/inputmethod/event/DeadKeyCombiner.java b/java/src/com/android/inputmethod/event/DeadKeyCombiner.java
index d816247..342f499 100644
--- a/java/src/com/android/inputmethod/event/DeadKeyCombiner.java
+++ b/java/src/com/android/inputmethod/event/DeadKeyCombiner.java
@@ -23,8 +23,6 @@
 
 import java.util.ArrayList;
 
-import javax.annotation.Nonnull;
-
 /**
  * A combiner that handles dead keys.
  */
@@ -33,7 +31,6 @@
     final StringBuilder mDeadSequence = new StringBuilder();
 
     @Override
-    @Nonnull
     public Event processEvent(final ArrayList<Event> previousEvents, final Event event) {
         if (TextUtils.isEmpty(mDeadSequence)) {
             if (event.isDead()) {
diff --git a/java/src/com/android/inputmethod/event/MyanmarReordering.java b/java/src/com/android/inputmethod/event/MyanmarReordering.java
index 7285512..80c711f 100644
--- a/java/src/com/android/inputmethod/event/MyanmarReordering.java
+++ b/java/src/com/android/inputmethod/event/MyanmarReordering.java
@@ -21,8 +21,6 @@
 import java.util.ArrayList;
 import java.util.Arrays;
 
-import javax.annotation.Nonnull;
-
 /**
  * A combiner that reorders input for Myanmar.
  */
@@ -130,7 +128,6 @@
                 : Event.createSoftwareTextEvent(combinedText, Event.NOT_A_KEY_CODE);
     }
 
-    @Nonnull
     @Override
     public Event processEvent(ArrayList<Event> previousEvents, Event newEvent) {
         final int codePoint = newEvent.mCodePoint;
diff --git a/java/src/com/android/inputmethod/latin/WordComposer.java b/java/src/com/android/inputmethod/latin/WordComposer.java
index 75d616e..171d0bb 100644
--- a/java/src/com/android/inputmethod/latin/WordComposer.java
+++ b/java/src/com/android/inputmethod/latin/WordComposer.java
@@ -25,8 +25,6 @@
 import java.util.ArrayList;
 import java.util.Collections;
 
-import javax.annotation.Nonnull;
-
 /**
  * A place to store the currently composing word with information such as adjacent key codes as well
  */
@@ -181,7 +179,6 @@
      * @param event the unprocessed event.
      * @return the processed event. Never null, but may be marked as consumed.
      */
-    @Nonnull
     public Event processEvent(final Event event) {
         final Event processedEvent = mCombinerChain.processEvent(mEvents, event);
         mEvents.add(event);