diff --git a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java
index 41da2aa..af10e75 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibilityUtils.java
@@ -21,17 +21,14 @@
 import android.media.AudioManager;
 import android.os.SystemClock;
 import android.provider.Settings;
-import android.support.v4.view.MotionEventCompat;
 import android.util.Log;
 import android.view.MotionEvent;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityManager;
 import android.view.inputmethod.EditorInfo;
 
-import com.android.inputmethod.compat.AccessibilityManagerCompatUtils;
 import com.android.inputmethod.compat.AudioManagerCompatWrapper;
 import com.android.inputmethod.compat.InputTypeCompatUtils;
-import com.android.inputmethod.compat.MotionEventCompatUtils;
 import com.android.inputmethod.compat.SettingsSecureCompatUtils;
 import com.android.inputmethod.latin.R;
 
@@ -93,7 +90,7 @@
     public boolean isTouchExplorationEnabled() {
         return ENABLE_ACCESSIBILITY
                 && mAccessibilityManager.isEnabled()
-                && AccessibilityManagerCompatUtils.isTouchExplorationEnabled(mAccessibilityManager);
+                && mAccessibilityManager.isTouchExplorationEnabled();
     }
 
     /**
@@ -107,9 +104,9 @@
     public boolean isTouchExplorationEvent(MotionEvent event) {
         final int action = event.getAction();
 
-        return action == MotionEventCompatUtils.ACTION_HOVER_ENTER
-                || action == MotionEventCompatUtils.ACTION_HOVER_EXIT
-                || action == MotionEventCompat.ACTION_HOVER_MOVE;
+        return action == MotionEvent.ACTION_HOVER_ENTER
+                || action == MotionEvent.ACTION_HOVER_EXIT
+                || action == MotionEvent.ACTION_HOVER_MOVE;
     }
 
     /**
diff --git a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
index 2401d93..c85a551 100644
--- a/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
+++ b/java/src/com/android/inputmethod/accessibility/AccessibleKeyboardViewProxy.java
@@ -21,15 +21,12 @@
 import android.graphics.Paint;
 import android.inputmethodservice.InputMethodService;
 import android.support.v4.view.AccessibilityDelegateCompat;
-import android.support.v4.view.MotionEventCompat;
 import android.support.v4.view.ViewCompat;
 import android.support.v4.view.accessibility.AccessibilityEventCompat;
 import android.view.MotionEvent;
 import android.view.View;
 import android.view.accessibility.AccessibilityEvent;
 
-import com.android.inputmethod.compat.MotionEventCompatUtils;
-import com.android.inputmethod.compat.ViewParentCompatUtils;
 import com.android.inputmethod.keyboard.Key;
 import com.android.inputmethod.keyboard.Keyboard;
 import com.android.inputmethod.keyboard.KeyboardId;
@@ -136,10 +133,10 @@
         mLastHoverKey = key;
 
         switch (event.getAction()) {
-        case MotionEventCompatUtils.ACTION_HOVER_ENTER:
-        case MotionEventCompatUtils.ACTION_HOVER_EXIT:
+        case MotionEvent.ACTION_HOVER_ENTER:
+        case MotionEvent.ACTION_HOVER_EXIT:
             return onHoverKey(key, event);
-        case MotionEventCompat.ACTION_HOVER_MOVE:
+        case MotionEvent.ACTION_HOVER_MOVE:
             if (key != previousKey) {
                 return onTransitionKey(key, previousKey, event);
             } else {
@@ -163,13 +160,13 @@
     private boolean onTransitionKey(Key currentKey, Key previousKey, MotionEvent event) {
         final int savedAction = event.getAction();
 
-        event.setAction(MotionEventCompatUtils.ACTION_HOVER_EXIT);
+        event.setAction(MotionEvent.ACTION_HOVER_EXIT);
         onHoverKey(previousKey, event);
 
-        event.setAction(MotionEventCompatUtils.ACTION_HOVER_ENTER);
+        event.setAction(MotionEvent.ACTION_HOVER_ENTER);
         onHoverKey(currentKey, event);
 
-        event.setAction(MotionEventCompat.ACTION_HOVER_MOVE);
+        event.setAction(MotionEvent.ACTION_HOVER_MOVE);
         final boolean handled = onHoverKey(currentKey, event);
 
         event.setAction(savedAction);
@@ -192,10 +189,10 @@
         }
 
         switch (event.getAction()) {
-        case MotionEventCompatUtils.ACTION_HOVER_ENTER:
+        case MotionEvent.ACTION_HOVER_ENTER:
             sendAccessibilityEventForKey(key, AccessibilityEventCompat.TYPE_VIEW_HOVER_ENTER);
             break;
-        case MotionEventCompatUtils.ACTION_HOVER_EXIT:
+        case MotionEvent.ACTION_HOVER_EXIT:
             sendAccessibilityEventForKey(key, AccessibilityEventCompat.TYPE_VIEW_HOVER_EXIT);
             break;
         }
@@ -214,7 +211,7 @@
         final AccessibilityEvent event = nodeProvider.createAccessibilityEvent(key, eventType);
 
         // Propagates the event up the view hierarchy.
-        ViewParentCompatUtils.requestSendAccessibilityEvent(mView.getParent(), mView, event);
+        mView.getParent().requestSendAccessibilityEvent(mView, event);
     }
 
     private class KeyboardFlickGestureDetector extends FlickGestureDetector {
diff --git a/java/src/com/android/inputmethod/accessibility/FlickGestureDetector.java b/java/src/com/android/inputmethod/accessibility/FlickGestureDetector.java
index eaa4ddf..e8ec376 100644
--- a/java/src/com/android/inputmethod/accessibility/FlickGestureDetector.java
+++ b/java/src/com/android/inputmethod/accessibility/FlickGestureDetector.java
@@ -18,11 +18,9 @@
 
 import android.content.Context;
 import android.os.Message;
-import android.support.v4.view.MotionEventCompat;
 import android.view.MotionEvent;
 import android.view.ViewConfiguration;
 
-import com.android.inputmethod.compat.MotionEventCompatUtils;
 import com.android.inputmethod.keyboard.PointerTracker;
 import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
 
@@ -32,10 +30,10 @@
  * A flick gesture is defined as a stream of hover events with the following
  * properties:
  * <ul>
- *   <li>Begins with a {@link MotionEventCompatUtils#ACTION_HOVER_ENTER} event
- *   <li>Contains any number of {@link MotionEventCompat#ACTION_HOVER_MOVE}
+ *   <li>Begins with a {@link MotionEvent#ACTION_HOVER_ENTER} event
+ *   <li>Contains any number of {@link MotionEvent#ACTION_HOVER_MOVE}
  *       events
- *   <li>Ends with a {@link MotionEventCompatUtils#ACTION_HOVER_EXIT} event
+ *   <li>Ends with a {@link MotionEvent#ACTION_HOVER_EXIT} event
  *   <li>Maximum duration of 250 milliseconds
  *   <li>Minimum distance between enter and exit points must be at least equal to
  *       scaled double tap slop (see
@@ -113,7 +111,7 @@
     public boolean onHoverEvent(MotionEvent event, AccessibleKeyboardViewProxy view,
             PointerTracker tracker) {
         // Always cache and consume the first hover event.
-        if (event.getAction() == MotionEventCompatUtils.ACTION_HOVER_ENTER) {
+        if (event.getAction() == MotionEvent.ACTION_HOVER_ENTER) {
             mCachedView = view;
             mCachedTracker = tracker;
             mCachedHoverEnter = MotionEvent.obtain(event);
@@ -129,10 +127,10 @@
         final float distanceSquare = calculateDistanceSquare(mCachedHoverEnter, event);
 
         switch (event.getAction()) {
-        case MotionEventCompat.ACTION_HOVER_MOVE:
+        case MotionEvent.ACTION_HOVER_MOVE:
             // Consume all valid move events before timeout.
             return true;
-        case MotionEventCompatUtils.ACTION_HOVER_EXIT:
+        case MotionEvent.ACTION_HOVER_EXIT:
             // Ignore exit events outside the flick radius.
             if (distanceSquare < mFlickRadiusSquare) {
                 clearFlick(true);
@@ -171,10 +169,8 @@
      * Computes the direction of a flick gesture and forwards it to
      * {@link #onFlick(MotionEvent, MotionEvent, int)} for handling.
      *
-     * @param e1 The {@link MotionEventCompatUtils#ACTION_HOVER_ENTER} event
-     *            where the flick started.
-     * @param e2 The {@link MotionEventCompatUtils#ACTION_HOVER_EXIT} event
-     *            where the flick ended.
+     * @param e1 The {@link MotionEvent#ACTION_HOVER_ENTER} event where the flick started.
+     * @param e2 The {@link MotionEvent#ACTION_HOVER_EXIT} event where the flick ended.
      * @return {@code true} if the flick event was handled.
      */
     private boolean dispatchFlick(MotionEvent e1, MotionEvent e2) {
diff --git a/java/src/com/android/inputmethod/compat/AccessibilityManagerCompatUtils.java b/java/src/com/android/inputmethod/compat/AccessibilityManagerCompatUtils.java
deleted file mode 100644
index 41b6a07..0000000
--- a/java/src/com/android/inputmethod/compat/AccessibilityManagerCompatUtils.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.compat;
-
-import android.view.accessibility.AccessibilityManager;
-
-import java.lang.reflect.Method;
-
-public class AccessibilityManagerCompatUtils {
-    private static final Method METHOD_isTouchExplorationEnabled = CompatUtils.getMethod(
-            AccessibilityManager.class, "isTouchExplorationEnabled");
-
-    private AccessibilityManagerCompatUtils() {
-        // This class is non-instantiable.
-    }
-
-    public static boolean isTouchExplorationEnabled(AccessibilityManager receiver) {
-        return (Boolean) CompatUtils.invoke(receiver, false, METHOD_isTouchExplorationEnabled);
-    }
-}
diff --git a/java/src/com/android/inputmethod/compat/MotionEventCompatUtils.java b/java/src/com/android/inputmethod/compat/MotionEventCompatUtils.java
deleted file mode 100644
index 9a52301..0000000
--- a/java/src/com/android/inputmethod/compat/MotionEventCompatUtils.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2011 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.compat;
-
-public class MotionEventCompatUtils {
-    // TODO: Remove after these are added to MotionEventCompat.
-    public static final int ACTION_HOVER_ENTER = 0x9;
-    public static final int ACTION_HOVER_EXIT = 0xA;
-}
diff --git a/java/src/com/android/inputmethod/compat/ViewParentCompatUtils.java b/java/src/com/android/inputmethod/compat/ViewParentCompatUtils.java
deleted file mode 100644
index d19bc3a..0000000
--- a/java/src/com/android/inputmethod/compat/ViewParentCompatUtils.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2012 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.inputmethod.compat;
-
-import android.view.View;
-import android.view.ViewParent;
-import android.view.accessibility.AccessibilityEvent;
-
-import java.lang.reflect.Method;
-
-public class ViewParentCompatUtils {
-    private static final Method METHOD_requestSendAccessibilityEvent = CompatUtils.getMethod(
-            ViewParent.class, "requestSendAccessibilityEvent", View.class,
-            AccessibilityEvent.class);
-
-    /**
-     * Called by a child to request from its parent to send an {@link AccessibilityEvent}.
-     * The child has already populated a record for itself in the event and is delegating
-     * to its parent to send the event. The parent can optionally add a record for itself.
-     * <p>
-     * Note: An accessibility event is fired by an individual view which populates the
-     *       event with a record for its state and requests from its parent to perform
-     *       the sending. The parent can optionally add a record for itself before
-     *       dispatching the request to its parent. A parent can also choose not to
-     *       respect the request for sending the event. The accessibility event is sent
-     *       by the topmost view in the view tree.</p>
-     *
-     * @param child The child which requests sending the event.
-     * @param event The event to be sent.
-     * @return True if the event was sent.
-     */
-    public static boolean requestSendAccessibilityEvent(
-            ViewParent receiver, View child, AccessibilityEvent event) {
-        return (Boolean) CompatUtils.invoke(
-                receiver, false, METHOD_requestSendAccessibilityEvent, child, event);
-    }
-}
diff --git a/java/src/com/android/inputmethod/keyboard/KeyboardView.java b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
index c1d11a0..b51dbb9 100644
--- a/java/src/com/android/inputmethod/keyboard/KeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/KeyboardView.java
@@ -37,7 +37,6 @@
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
-import com.android.inputmethod.compat.FrameLayoutCompatUtils;
 import com.android.inputmethod.latin.LatinImeLogger;
 import com.android.inputmethod.latin.R;
 import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
@@ -853,7 +852,7 @@
             windowContentView.addView(mPreviewPlacer);
         }
         mPreviewPlacer.addView(
-                keyPreview, FrameLayoutCompatUtils.newLayoutParam(mPreviewPlacer, 0, 0));
+                keyPreview, ViewLayoutUtils.newLayoutParam(mPreviewPlacer, 0, 0));
     }
 
     private void showKey(PointerTracker tracker) {
@@ -919,7 +918,7 @@
         previewText.getBackground().setState(
                 key.mMoreKeys != null ? LONG_PRESSABLE_STATE_SET : EMPTY_STATE_SET);
         previewText.setTextColor(params.mPreviewTextColor);
-        FrameLayoutCompatUtils.placeViewAt(
+        ViewLayoutUtils.placeViewAt(
                 previewText, previewX, previewY, previewWidth, previewHeight);
         previewText.setVisibility(VISIBLE);
     }
diff --git a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
index 62bcf6c..e2af971 100644
--- a/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
+++ b/java/src/com/android/inputmethod/keyboard/LatinKeyboardView.java
@@ -828,15 +828,13 @@
     }
 
     /**
-     * Receives hover events from the input framework. This method overrides
-     * View.dispatchHoverEvent(MotionEvent) on SDK version ICS or higher. On
-     * lower SDK versions, this method is never called.
+     * Receives hover events from the input framework.
      *
      * @param event The motion event to be dispatched.
      * @return {@code true} if the event was handled by the view, {@code false}
      *         otherwise
      */
-    //Should not annotate @override
+    @Override
     public boolean dispatchHoverEvent(MotionEvent event) {
         if (AccessibilityUtils.getInstance().isTouchExplorationEnabled()) {
             final PointerTracker tracker = PointerTracker.getPointerTracker(0, this);
diff --git a/java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java b/java/src/com/android/inputmethod/keyboard/ViewLayoutUtils.java
similarity index 73%
rename from java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java
rename to java/src/com/android/inputmethod/keyboard/ViewLayoutUtils.java
index 523bf7d..ee50470 100644
--- a/java/src/com/android/inputmethod/compat/FrameLayoutCompatUtils.java
+++ b/java/src/com/android/inputmethod/keyboard/ViewLayoutUtils.java
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package com.android.inputmethod.compat;
+package com.android.inputmethod.keyboard;
 
 import android.view.View;
 import android.view.ViewGroup;
@@ -22,20 +22,9 @@
 import android.widget.FrameLayout;
 import android.widget.RelativeLayout;
 
-public class FrameLayoutCompatUtils {
-    private static final boolean NEEDS_FRAME_LAYOUT_HACK = (
-            android.os.Build.VERSION.SDK_INT < 11 /* Honeycomb */);
-
-    public static ViewGroup getPlacer(ViewGroup container) {
-        if (NEEDS_FRAME_LAYOUT_HACK) {
-            // Insert RelativeLayout to be able to setMargin because pre-Honeycomb FrameLayout
-            // could not handle setMargin properly.
-            final ViewGroup placer = new RelativeLayout(container.getContext());
-            container.addView(placer);
-            return placer;
-        } else {
-            return container;
-        }
+public class ViewLayoutUtils {
+    private ViewLayoutUtils() {
+        // This utility class is not publicly instantiable.
     }
 
     public static MarginLayoutParams newLayoutParam(ViewGroup placer, int width, int height) {
diff --git a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
index ca25354..1ad37b9 100644
--- a/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
+++ b/java/src/com/android/inputmethod/latin/suggestions/SuggestionsView.java
@@ -52,11 +52,11 @@
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 
-import com.android.inputmethod.compat.FrameLayoutCompatUtils;
 import com.android.inputmethod.keyboard.KeyboardActionListener;
 import com.android.inputmethod.keyboard.KeyboardView;
 import com.android.inputmethod.keyboard.MoreKeysPanel;
 import com.android.inputmethod.keyboard.PointerTracker;
+import com.android.inputmethod.keyboard.ViewLayoutUtils;
 import com.android.inputmethod.latin.LatinImeLogger;
 import com.android.inputmethod.latin.R;
 import com.android.inputmethod.latin.StaticInnerHandlerWrapper;
@@ -416,7 +416,7 @@
                                 ViewGroup.LayoutParams.WRAP_CONTENT);
                         final int infoWidth = info.getMeasuredWidth();
                         final int y = info.getMeasuredHeight();
-                        FrameLayoutCompatUtils.placeViewAt(
+                        ViewLayoutUtils.placeViewAt(
                                 info, x - infoWidth, y, infoWidth, info.getMeasuredHeight());
                     }
                 }
