diff options
author | 2014-09-08 09:25:18 +0000 | |
---|---|---|
committer | 2014-09-08 09:25:18 +0000 | |
commit | 42ddc2127deb117a0bb2b7a7797cb8c9ba335f5a (patch) | |
tree | 902130f39ef3db6b14535b34cdc2f42c4fa38919 /java/src/com/android/inputmethod/compat | |
parent | c3fac52dd51ba70db83d96b2d421bd440683d9bc (diff) | |
parent | f930ce12618f715ab01b75ad80eb1ac68be6ea58 (diff) | |
download | latinime-42ddc2127deb117a0bb2b7a7797cb8c9ba335f5a.tar.gz latinime-42ddc2127deb117a0bb2b7a7797cb8c9ba335f5a.tar.xz latinime-42ddc2127deb117a0bb2b7a7797cb8c9ba335f5a.zip |
am f930ce12: am 1caa0b71: Merge "Follow up API signature changes of CursorAnchorInfo" into lmp-dev
* commit 'f930ce12618f715ab01b75ad80eb1ac68be6ea58':
Follow up API signature changes of CursorAnchorInfo
Diffstat (limited to 'java/src/com/android/inputmethod/compat')
-rw-r--r-- | java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java b/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java index 3a86ccbda..8a2818508 100644 --- a/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java +++ b/java/src/com/android/inputmethod/compat/CursorAnchorInfoCompatWrapper.java @@ -34,10 +34,15 @@ public final class CursorAnchorInfoCompatWrapper { */ 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 @@ public final class CursorAnchorInfoCompatWrapper { 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 @@ public final class CursorAnchorInfoCompatWrapper { 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() { |