diff options
author | 2014-07-19 13:33:42 +0900 | |
---|---|---|
committer | 2014-07-20 20:56:52 +0900 | |
commit | 3f513f107ef0754da2b1c704167325151ce9b7ea (patch) | |
tree | a66ed2db2714eecd44cf3f9bad2d0f59b2e9e763 /java/src/com/android/inputmethod/compat | |
parent | 6b14bbf125f2957ffb3ab5072eb9376981af9a17 (diff) | |
download | latinime-3f513f107ef0754da2b1c704167325151ce9b7ea.tar.gz latinime-3f513f107ef0754da2b1c704167325151ce9b7ea.tar.xz latinime-3f513f107ef0754da2b1c704167325151ce9b7ea.zip |
Enable InputMethodService#onUpdateCursor behind the flag
With this CL, InputMethodService#onUpdateCursor and
InputMethodService#onUpdateCursorAnchorInfo can be enabled
on L when ENABLE_CURSOR_ANCHOR_INFO_CALLBACK and
ENABLE_CURSOR_RECT_CALLBACK are specified, respectively.
BUG: 16382260
Change-Id: I29924128f6bd2f08cbd91cc4e82c9c4a6ecce3ff
Diffstat (limited to 'java/src/com/android/inputmethod/compat')
-rw-r--r-- | java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java index cbae6952c..48047ddbf 100644 --- a/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java +++ b/java/src/com/android/inputmethod/compat/InputMethodServiceCompatUtils.java @@ -17,7 +17,6 @@ package com.android.inputmethod.compat; import android.inputmethodservice.InputMethodService; -import com.android.inputmethod.latin.define.ProductionFlags; import java.lang.reflect.Method; @@ -35,30 +34,4 @@ public final class InputMethodServiceCompatUtils { return (Boolean)CompatUtils.invoke(ims, false /* defaultValue */, METHOD_enableHardwareAcceleration); } - - public static void setCursorAnchorMonitorMode(final InputMethodService ims, final int mode) { - if (ProductionFlags.USES_CURSOR_ANCHOR_MONITOR) { - ExperimentalAPIUtils.setCursorAnchorMonitorMode(ims, mode); - } - } - - /* - * For unreleased APIs. ProGuard will strip this class entirely, unless used explicitly. - */ - private static final class ExperimentalAPIUtils { - // Note that {@link InputMethodManager#setCursorAnchorMonitorMode} is not yet available as - // an official API as of API level 19 (Build.VERSION_CODES.KITKAT). - private static final Method METHOD_setCursorAnchorMonitorMode = CompatUtils.getMethod( - InputMethodService.class, "setCursorAnchorMonitorMode", int.class); - - private ExperimentalAPIUtils() { - // This utility class is not publicly instantiable. - } - - public static void setCursorAnchorMonitorMode(final InputMethodService ims, - final int mode) { - CompatUtils.invoke(ims, null /* defaultValue */, - METHOD_setCursorAnchorMonitorMode, mode); - } - } } |