diff --git a/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java b/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java
index 3a86ccb..8a28185 100644
--- a/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java
+++ b/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java
@@ -34,10 +34,15 @@
      */
     public static final int FLAG_HAS_INVISIBLE_REGION = 0x02;
 
+    /**
+     * The insertion marker or character bounds is placed at right-to-left (RTL) character.
+     */
+    public static final int FLAG_IS_RTL = 0x04;
+
     // Note that CursorAnchorInfo has been introduced in API level XX (Build.VERSION_CODE.LXX).
     private static final CompatUtils.ClassWrapper sCursorAnchorInfoClass;
-    private static final CompatUtils.ToObjectMethodWrapper<RectF> sGetCharacterRectMethod;
-    private static final CompatUtils.ToIntMethodWrapper sGetCharacterRectFlagsMethod;
+    private static final CompatUtils.ToObjectMethodWrapper<RectF> sGetCharacterBoundsMethod;
+    private static final CompatUtils.ToIntMethodWrapper sGetCharacterBoundsFlagsMethod;
     private static final CompatUtils.ToObjectMethodWrapper<CharSequence> sGetComposingTextMethod;
     private static final CompatUtils.ToIntMethodWrapper sGetComposingTextStartMethod;
     private static final CompatUtils.ToFloatMethodWrapper sGetInsertionMarkerBaselineMethod;
@@ -51,10 +56,10 @@
     static {
         sCursorAnchorInfoClass = CompatUtils.getClassWrapper(
                 "android.view.inputmethod.CursorAnchorInfo");
-        sGetCharacterRectMethod = sCursorAnchorInfoClass.getMethod(
-                "getCharacterRect", (RectF)null, int.class);
-        sGetCharacterRectFlagsMethod = sCursorAnchorInfoClass.getPrimitiveMethod(
-                "getCharacterRectFlags", 0, int.class);
+        sGetCharacterBoundsMethod = sCursorAnchorInfoClass.getMethod(
+                "getCharacterBounds", (RectF)null, int.class);
+        sGetCharacterBoundsFlagsMethod = sCursorAnchorInfoClass.getPrimitiveMethod(
+                "getCharacterBoundsFlags", 0, int.class);
         sGetComposingTextMethod = sCursorAnchorInfoClass.getMethod(
                 "getComposingText", (CharSequence)null);
         sGetComposingTextStartMethod = sCursorAnchorInfoClass.getPrimitiveMethod(
@@ -112,12 +117,12 @@
         return sGetMatrixMethod.invoke(mInstance);
     }
 
-    public RectF getCharacterRect(final int index) {
-        return sGetCharacterRectMethod.invoke(mInstance, index);
+    public RectF getCharacterBounds(final int index) {
+        return sGetCharacterBoundsMethod.invoke(mInstance, index);
     }
 
-    public int getCharacterRectFlags(final int index) {
-        return sGetCharacterRectFlagsMethod.invoke(mInstance, index);
+    public int getCharacterBoundsFlags(final int index) {
+        return sGetCharacterBoundsFlagsMethod.invoke(mInstance, index);
     }
 
     public float getInsertionMarkerBaseline() {
diff --git a/java/src/com/android/inputmethod/keyboard/TextDecorator.java b/java/src/com/android/inputmethod/keyboard/TextDecorator.java
index 9192853..cf58d6a 100644
--- a/java/src/com/android/inputmethod/keyboard/TextDecorator.java
+++ b/java/src/com/android/inputmethod/keyboard/TextDecorator.java
@@ -274,8 +274,8 @@
             }
             final int composingTextStart = info.getComposingTextStart();
             final int lastCharRectIndex = composingTextStart + composingText.length() - 1;
-            final RectF lastCharRect = info.getCharacterRect(lastCharRectIndex);
-            final int lastCharRectFlag = info.getCharacterRectFlags(lastCharRectIndex);
+            final RectF lastCharRect = info.getCharacterBounds(lastCharRectIndex);
+            final int lastCharRectFlag = info.getCharacterBoundsFlags(lastCharRectIndex);
             final boolean hasInvisibleRegionInLastCharRect =
                     (lastCharRectFlag & CursorAnchorInfoCompatWrapper.FLAG_HAS_INVISIBLE_REGION)
                             != 0;
@@ -285,7 +285,7 @@
             }
             final RectF segmentStartCharRect = new RectF(lastCharRect);
             for (int i = composingText.length() - 2; i >= 0; --i) {
-                final RectF charRect = info.getCharacterRect(composingTextStart + i);
+                final RectF charRect = info.getCharacterBounds(composingTextStart + i);
                 if (charRect == null) {
                     break;
                 }
