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/latin/define | |
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/latin/define')
-rw-r--r-- | java/src/com/android/inputmethod/latin/define/ProductionFlags.java | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/java/src/com/android/inputmethod/latin/define/ProductionFlags.java b/java/src/com/android/inputmethod/latin/define/ProductionFlags.java index 6dccd789d..d385cf840 100644 --- a/java/src/com/android/inputmethod/latin/define/ProductionFlags.java +++ b/java/src/com/android/inputmethod/latin/define/ProductionFlags.java @@ -23,15 +23,30 @@ public final class ProductionFlags { public static final boolean IS_HARDWARE_KEYBOARD_SUPPORTED = false; - // When true, enable {@link InputMethodService#onUpdateCursor} callback with - // {@link InputMethodService#setCursorAnchorMonitorMode}, which is not yet available in - // API level 19. Do not turn this on in production until the new API becomes publicly - // available. - public static final boolean USES_CURSOR_ANCHOR_MONITOR = false; + /** + * When true, enable {@link InputMethodService#onUpdateCursorAnchorInfo} callback via + * {@link InputConnection#requestCursorAnchorInfo}. This flag has no effect in API Level 20 + * and prior. In general, this callback provides more detailed positional information, + * even though an explicit support is required by the editor. + */ + public static final boolean ENABLE_CURSOR_ANCHOR_INFO_CALLBACK = false; - // Include all suggestions from all dictionaries in {@link SuggestedWords#mRawSuggestions}. + /** + * When true, enable {@link InputMethodService#onUpdateCursor} callback via + * {@link InputConnection#requestCursorAnchorInfo}. Although this callback has been available + * since API Level 3, the callback has never been used until API Level 20. Thus it may or may + * not work well as expected. Should rely on {@link InputMethodService#onUpdateCursorAnchorInfo} + * whenever possible since it is supposed to be more reliable and accurate. + */ + public static final boolean ENABLE_CURSOR_RECT_CALLBACK = false; + + /** + * Include all suggestions from all dictionaries in {@link SuggestedWords#mRawSuggestions}. + */ public static final boolean INCLUDE_RAW_SUGGESTIONS = false; - // When false, the metrics logging is not yet ready to be enabled. + /** + * When false, the metrics logging is not yet ready to be enabled. + */ public static final boolean IS_METRICS_LOGGING_SUPPORTED = false; } |