Fix a bug where LatinIME would leak pipes.

Bug: 12667742
Bug: 12821388
Change-Id: Ic0bad56fb96e54ac032759adffc8ea320c06dff2
diff --git a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
index 79b8a37..e2cdbb3 100644
--- a/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
+++ b/java/src/com/android/inputmethod/latin/inputlogic/InputLogic.java
@@ -130,6 +130,7 @@
         // so we try using some heuristics to find out about these and fix them.
         mConnection.tryFixLyingCursorPosition();
         cancelDoubleSpacePeriodCountdown();
+        mInputLogicHandler.destroy();
         mInputLogicHandler = new InputLogicHandler(mLatinIME, this);
     }