Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java

Issue 1589953005: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed #36. Added ImeLollipopTest for IMMEDIATE case. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser.input; 5 package org.chromium.content.browser.input;
6 6
7 import android.content.res.Configuration; 7 import android.content.res.Configuration;
8 import android.os.Build;
8 import android.os.ResultReceiver; 9 import android.os.ResultReceiver;
9 import android.os.SystemClock; 10 import android.os.SystemClock;
10 import android.text.SpannableString; 11 import android.text.SpannableString;
11 import android.text.TextUtils; 12 import android.text.TextUtils;
12 import android.text.style.BackgroundColorSpan; 13 import android.text.style.BackgroundColorSpan;
13 import android.text.style.CharacterStyle; 14 import android.text.style.CharacterStyle;
14 import android.text.style.UnderlineSpan; 15 import android.text.style.UnderlineSpan;
15 import android.view.KeyCharacterMap; 16 import android.view.KeyCharacterMap;
16 import android.view.KeyEvent; 17 import android.view.KeyEvent;
17 import android.view.View; 18 import android.view.View;
18 import android.view.inputmethod.BaseInputConnection; 19 import android.view.inputmethod.BaseInputConnection;
19 import android.view.inputmethod.EditorInfo; 20 import android.view.inputmethod.EditorInfo;
20 21
21 import org.chromium.base.CommandLine; 22 import org.chromium.base.CommandLine;
22 import org.chromium.base.Log; 23 import org.chromium.base.Log;
23 import org.chromium.base.VisibleForTesting; 24 import org.chromium.base.VisibleForTesting;
24 import org.chromium.base.annotations.CalledByNative; 25 import org.chromium.base.annotations.CalledByNative;
25 import org.chromium.base.annotations.JNINamespace; 26 import org.chromium.base.annotations.JNINamespace;
26 import org.chromium.blink_public.web.WebInputEventModifier; 27 import org.chromium.blink_public.web.WebInputEventModifier;
27 import org.chromium.blink_public.web.WebInputEventType; 28 import org.chromium.blink_public.web.WebInputEventType;
29 import org.chromium.content.browser.RenderCoordinates;
28 import org.chromium.content.common.ContentSwitches; 30 import org.chromium.content.common.ContentSwitches;
29 import org.chromium.ui.base.ime.TextInputType; 31 import org.chromium.ui.base.ime.TextInputType;
30 import org.chromium.ui.picker.InputDialogContainer; 32 import org.chromium.ui.picker.InputDialogContainer;
31 33
32 /** 34 /**
33 * Adapts and plumbs android IME service onto the chrome text input API. 35 * Adapts and plumbs android IME service onto the chrome text input API.
34 * ImeAdapter provides an interface in both ways native <-> java: 36 * ImeAdapter provides an interface in both ways native <-> java:
35 * 1. InputConnectionAdapter notifies native code of text composition state and 37 * 1. InputConnectionAdapter notifies native code of text composition state and
36 * dispatch key events from java -> WebKit. 38 * dispatch key events from java -> WebKit.
37 * 2. Native ImeAdapter notifies java side to clear composition text. 39 * 2. Native ImeAdapter notifies java side to clear composition text.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 91
90 static char[] sSingleCharArray = new char[1]; 92 static char[] sSingleCharArray = new char[1];
91 static KeyCharacterMap sKeyCharacterMap; 93 static KeyCharacterMap sKeyCharacterMap;
92 94
93 private long mNativeImeAdapterAndroid; 95 private long mNativeImeAdapterAndroid;
94 private InputMethodManagerWrapper mInputMethodManagerWrapper; 96 private InputMethodManagerWrapper mInputMethodManagerWrapper;
95 private ChromiumBaseInputConnection mInputConnection; 97 private ChromiumBaseInputConnection mInputConnection;
96 private ChromiumBaseInputConnection.Factory mInputConnectionFactory; 98 private ChromiumBaseInputConnection.Factory mInputConnectionFactory;
97 99
98 private final ImeAdapterDelegate mViewEmbedder; 100 private final ImeAdapterDelegate mViewEmbedder;
101 // This holds the information necessary for constructing CursorAnchorInfo, a nd notifies to
102 // InputMethodManager on appropriate timing, depending on how IME requested the information
103 // via InputConnection. The update request is per InputConnection, hence for each time it is
104 // re-created, the monitoring status will be reset.
105 private final CursorAnchorInfoController mCursorAnchorInfoController;
99 106
100 private int mTextInputType = TextInputType.NONE; 107 private int mTextInputType = TextInputType.NONE;
101 private int mTextInputFlags; 108 private int mTextInputFlags;
102 109
103 // Keep the current configuration to detect the change when onConfigurationC hanged() is called. 110 // Keep the current configuration to detect the change when onConfigurationC hanged() is called.
104 private Configuration mCurrentConfig; 111 private Configuration mCurrentConfig;
105 112
106 private int mLastSelectionStart; 113 private int mLastSelectionStart;
107 private int mLastSelectionEnd; 114 private int mLastSelectionEnd;
115 private String mLastText;
116 private int mLastCompositionStart;
117 private int mLastCompositionEnd;
108 118
109 /** 119 /**
110 * @param wrapper InputMethodManagerWrapper that should receive all the call directed to 120 * @param wrapper InputMethodManagerWrapper that should receive all the call directed to
111 * InputMethodManager. 121 * InputMethodManager.
112 * @param embedder The view that is used for callbacks from ImeAdapter. 122 * @param embedder The view that is used for callbacks from ImeAdapter.
113 */ 123 */
114 public ImeAdapter(InputMethodManagerWrapper wrapper, ImeAdapterDelegate embe dder) { 124 public ImeAdapter(InputMethodManagerWrapper wrapper, ImeAdapterDelegate embe dder) {
115 mInputMethodManagerWrapper = wrapper; 125 mInputMethodManagerWrapper = wrapper;
116 mViewEmbedder = embedder; 126 mViewEmbedder = embedder;
117 resetInputConnectionFactory(); 127 resetInputConnectionFactory();
118 // Deep copy newConfig so that we can notice the difference. 128 // Deep copy newConfig so that we can notice the difference.
119 mCurrentConfig = new Configuration( 129 mCurrentConfig = new Configuration(
120 mViewEmbedder.getAttachedView().getResources().getConfiguration( )); 130 mViewEmbedder.getAttachedView().getResources().getConfiguration( ));
131 // CursorAnchroInfo is supported only after L.
132 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
133 mCursorAnchorInfoController = CursorAnchorInfoController.create(wrap per,
134 new CursorAnchorInfoController.ComposingTextDelegate() {
135 @Override
136 public CharSequence getText() {
137 return mLastText;
138 }
139 @Override
140 public int getSelectionStart() {
141 return mLastSelectionStart;
142 }
143 @Override
144 public int getSelectionEnd() {
145 return mLastSelectionEnd;
146 }
147 @Override
148 public int getComposingTextStart() {
149 return mLastCompositionStart;
150 }
151 @Override
152 public int getComposingTextEnd() {
153 return mLastCompositionEnd;
154 }
155 });
156 } else {
157 mCursorAnchorInfoController = null;
158 }
121 } 159 }
122 160
123 void resetInputConnectionFactory() { 161 void resetInputConnectionFactory() {
124 if (shouldUseImeThread()) { 162 if (shouldUseImeThread()) {
125 mInputConnectionFactory = 163 mInputConnectionFactory =
126 new ThreadedInputConnectionFactory(mInputMethodManagerWrappe r); 164 new ThreadedInputConnectionFactory(mInputMethodManagerWrappe r);
127 } else { 165 } else {
128 mInputConnectionFactory = new ReplicaInputConnection.Factory(); 166 mInputConnectionFactory = new ReplicaInputConnection.Factory();
129 } 167 }
130 } 168 }
(...skipping 24 matching lines...) Expand all
155 // Even when InputConnection methods are blocked IMM can still call this. 193 // Even when InputConnection methods are blocked IMM can still call this.
156 if (mInputConnection != null) mInputConnection.unblockOnUiThread(); 194 if (mInputConnection != null) mInputConnection.unblockOnUiThread();
157 mInputConnection = null; 195 mInputConnection = null;
158 if (DEBUG_LOGS) Log.w(TAG, "onCreateInputConnection returns null."); 196 if (DEBUG_LOGS) Log.w(TAG, "onCreateInputConnection returns null.");
159 return null; 197 return null;
160 } 198 }
161 mInputConnection = mInputConnectionFactory.initializeAndGet( 199 mInputConnection = mInputConnectionFactory.initializeAndGet(
162 mViewEmbedder.getAttachedView(), this, mTextInputType, mTextInpu tFlags, 200 mViewEmbedder.getAttachedView(), this, mTextInputType, mTextInpu tFlags,
163 mLastSelectionStart, mLastSelectionEnd, outAttrs); 201 mLastSelectionStart, mLastSelectionEnd, outAttrs);
164 if (DEBUG_LOGS) Log.w(TAG, "onCreateInputConnection: " + mInputConnectio n); 202 if (DEBUG_LOGS) Log.w(TAG, "onCreateInputConnection: " + mInputConnectio n);
203 if (mCursorAnchorInfoController != null) {
204 mCursorAnchorInfoController.resetMonitoringState();
205 }
165 return mInputConnection; 206 return mInputConnection;
166 } 207 }
167 208
168 /** 209 /**
169 * Overrides the InputMethodManagerWrapper that ImeAdapter uses to make call s to 210 * Overrides the InputMethodManagerWrapper that ImeAdapter uses to make call s to
170 * InputMethodManager. 211 * InputMethodManager.
171 * @param immw InputMethodManagerWrapper that should be used to call InputMe thodManager. 212 * @param immw InputMethodManagerWrapper that should be used to call InputMe thodManager.
172 */ 213 */
173 @VisibleForTesting 214 @VisibleForTesting
174 public void setInputMethodManagerWrapperForTest(InputMethodManagerWrapper im mw) { 215 public void setInputMethodManagerWrapperForTest(InputMethodManagerWrapper im mw) {
175 mInputMethodManagerWrapper = immw; 216 mInputMethodManagerWrapper = immw;
217 if (mCursorAnchorInfoController != null) {
218 mCursorAnchorInfoController.setInputMethodManagerWrapper(immw);
Ted C 2016/03/07 21:31:45 Should this method also be called setInputMethodMa
kinaba 2016/03/10 06:24:12 Good point. It's only for testing. Done.
219 }
176 } 220 }
177 221
178 @VisibleForTesting 222 @VisibleForTesting
179 void setInputConnectionFactory(ChromiumBaseInputConnection.Factory factory) { 223 void setInputConnectionFactory(ChromiumBaseInputConnection.Factory factory) {
180 mInputConnectionFactory = factory; 224 mInputConnectionFactory = factory;
181 } 225 }
182 226
183 @VisibleForTesting 227 @VisibleForTesting
184 ChromiumBaseInputConnection.Factory getInputConnectionFactoryForTest() { 228 ChromiumBaseInputConnection.Factory getInputConnectionFactoryForTest() {
185 return mInputConnectionFactory; 229 return mInputConnectionFactory;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 * @param selectionEnd The character offset of the selection end, or the car et position if there 295 * @param selectionEnd The character offset of the selection end, or the car et position if there
252 * is no selection. 296 * is no selection.
253 * @param compositionStart The character offset of the composition start, or -1 if there is no 297 * @param compositionStart The character offset of the composition start, or -1 if there is no
254 * composition. 298 * composition.
255 * @param compositionEnd The character offset of the composition end, or -1 if there is no 299 * @param compositionEnd The character offset of the composition end, or -1 if there is no
256 * selection. 300 * selection.
257 * @param isNonImeChange True when the update was caused by non-IME (e.g. Ja vascript). 301 * @param isNonImeChange True when the update was caused by non-IME (e.g. Ja vascript).
258 */ 302 */
259 public void updateState(String text, int selectionStart, int selectionEnd, i nt compositionStart, 303 public void updateState(String text, int selectionStart, int selectionEnd, i nt compositionStart,
260 int compositionEnd, boolean isNonImeChange) { 304 int compositionEnd, boolean isNonImeChange) {
305 if (mCursorAnchorInfoController != null && (!TextUtils.equals(mLastText, text)
306 || mLastSelectionStart != selectionStart || mLastSelectionEnd != selectionEnd
307 || mLastCompositionStart != compositionStart
308 || mLastCompositionEnd != compositionEnd)) {
309 mCursorAnchorInfoController.invalidateLastCursorAnchorInfo();
310 }
311 mLastText = text;
261 mLastSelectionStart = selectionStart; 312 mLastSelectionStart = selectionStart;
262 mLastSelectionEnd = selectionEnd; 313 mLastSelectionEnd = selectionEnd;
314 mLastCompositionStart = compositionStart;
315 mLastCompositionEnd = compositionEnd;
316
263 if (mInputConnection == null) return; 317 if (mInputConnection == null) return;
264 boolean singleLine = mTextInputType != TextInputType.TEXT_AREA 318 boolean singleLine = mTextInputType != TextInputType.TEXT_AREA
265 && mTextInputType != TextInputType.CONTENT_EDITABLE; 319 && mTextInputType != TextInputType.CONTENT_EDITABLE;
266 mInputConnection.updateStateOnUiThread(text, selectionStart, selectionEn d, compositionStart, 320 mInputConnection.updateStateOnUiThread(text, selectionStart, selectionEn d, compositionStart,
267 compositionEnd, singleLine, isNonImeChange); 321 compositionEnd, singleLine, isNonImeChange);
268 } 322 }
269 323
270 /** 324 /**
271 * Attaches the imeAdapter to its native counterpart. This is needed to star t forwarding 325 * Attaches the imeAdapter to its native counterpart. This is needed to star t forwarding
272 * keyboard events to WebKit. 326 * keyboard events to WebKit.
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 */ 603 */
550 boolean setComposingRegion(int start, int end) { 604 boolean setComposingRegion(int start, int end) {
551 if (mNativeImeAdapterAndroid == 0) return false; 605 if (mNativeImeAdapterAndroid == 0) return false;
552 nativeSetComposingRegion(mNativeImeAdapterAndroid, start, end); 606 nativeSetComposingRegion(mNativeImeAdapterAndroid, start, end);
553 return true; 607 return true;
554 } 608 }
555 609
556 @CalledByNative 610 @CalledByNative
557 private void focusedNodeChanged(boolean isEditable) { 611 private void focusedNodeChanged(boolean isEditable) {
558 if (DEBUG_LOGS) Log.w(TAG, "focusedNodeChanged: isEditable [%b]", isEdit able); 612 if (DEBUG_LOGS) Log.w(TAG, "focusedNodeChanged: isEditable [%b]", isEdit able);
613
614 // Update controller before the connection is restarted.
615 if (mCursorAnchorInfoController != null) {
616 mCursorAnchorInfoController.focusedNodeChanged(isEditable);
617 }
618
559 if (mTextInputType != TextInputType.NONE && mInputConnection != null && isEditable) { 619 if (mTextInputType != TextInputType.NONE && mInputConnection != null && isEditable) {
560 restartInput(); 620 restartInput();
561 } 621 }
562 } 622 }
563 623
564 /** 624 /**
565 * Send a request to the native counterpart to give the latest text input st ate update. 625 * Send a request to the native counterpart to give the latest text input st ate update.
566 */ 626 */
567 boolean requestTextInputStateUpdate() { 627 boolean requestTextInputStateUpdate() {
568 if (mNativeImeAdapterAndroid == 0) return false; 628 if (mNativeImeAdapterAndroid == 0) return false;
569 // You won't get state update anyways. 629 // You won't get state update anyways.
570 if (mInputConnection == null) return false; 630 if (mInputConnection == null) return false;
571 return nativeRequestTextInputStateUpdate(mNativeImeAdapterAndroid); 631 return nativeRequestTextInputStateUpdate(mNativeImeAdapterAndroid);
572 } 632 }
573 633
634 /*
Ted C 2016/03/07 21:31:45 add another *
kinaba 2016/03/10 06:24:12 Done.
635 * Forward the cursor update request to CursorAnchorInfoController.
Ted C 2016/03/07 21:31:45 This comment describes the code not why you should
kinaba 2016/03/10 06:24:12 Done.
636 */
637 public boolean onRequestCursorUpdates(int cursorUpdateMode) {
638 if (mCursorAnchorInfoController == null) return false;
639 return mCursorAnchorInfoController.onRequestCursorUpdates(cursorUpdateMo de,
640 mViewEmbedder.getAttachedView());
641 }
642
643 /**
644 * Notify the location of composing characters to the IME if it explicitly r equested them.
Ted C 2016/03/07 21:31:45 Again this comment isn't really a good description
kinaba 2016/03/10 06:24:12 Done.
645 * @param renderCoordinates coordinate information to convert CSS (document) coordinates to
646 * View-local Physical (screen) coordinates
Ted C 2016/03/07 21:31:45 align with the start of the sentence above (coordi
kinaba 2016/03/10 06:24:12 Done.
647 * @param hasInsertionMarker Whether the insertion marker is visible or not.
648 * @param insertionMarkerHorizontal X coordinates (in view-local DIP pixels) of the insertion
649 * marker if it exists. Will be ignored otherwise.
650 * @param insertionMarkerTop Y coordinates (in view-local DIP pixels) of the top of the
651 * insertion marker if it exists. Will be ignored otherwise.
652 * @param insertionMarkerBottom Y coordinates (in view-local DIP pixels) of the bottom of
653 * the insertion marker if it exists. Will be ignored otherwise.
654 */
655 public void onUpdateFrameInfo(RenderCoordinates renderCoordinates, boolean h asInsertionMarker,
656 boolean isInsertionMarkerVisible, float insertionMarkerHorizontal,
657 float insertionMarkerTop, float insertionMarkerBottom) {
658 if (mCursorAnchorInfoController == null) return;
659 mCursorAnchorInfoController.onUpdateFrameInfo(renderCoordinates, hasInse rtionMarker,
660 isInsertionMarkerVisible, insertionMarkerHorizontal, insertionMa rkerTop,
661 insertionMarkerBottom, mViewEmbedder.getAttachedView());
662 }
663
574 @CalledByNative 664 @CalledByNative
575 private void populateUnderlinesFromSpans(CharSequence text, long underlines) { 665 private void populateUnderlinesFromSpans(CharSequence text, long underlines) {
576 if (DEBUG_LOGS) { 666 if (DEBUG_LOGS) {
577 Log.w(TAG, "populateUnderlinesFromSpans: text [%s], underlines [%d]" , text, underlines); 667 Log.w(TAG, "populateUnderlinesFromSpans: text [%s], underlines [%d]" , text, underlines);
578 } 668 }
579 if (!(text instanceof SpannableString)) return; 669 if (!(text instanceof SpannableString)) return;
580 670
581 SpannableString spannableString = ((SpannableString) text); 671 SpannableString spannableString = ((SpannableString) text);
582 CharacterStyle spans[] = 672 CharacterStyle spans[] =
583 spannableString.getSpans(0, text.length(), CharacterStyle.class) ; 673 spannableString.getSpans(0, text.length(), CharacterStyle.class) ;
584 for (CharacterStyle span : spans) { 674 for (CharacterStyle span : spans) {
585 if (span instanceof BackgroundColorSpan) { 675 if (span instanceof BackgroundColorSpan) {
586 nativeAppendBackgroundColorSpan(underlines, spannableString.getS panStart(span), 676 nativeAppendBackgroundColorSpan(underlines, spannableString.getS panStart(span),
587 spannableString.getSpanEnd(span), 677 spannableString.getSpanEnd(span),
588 ((BackgroundColorSpan) span).getBackgroundColor()); 678 ((BackgroundColorSpan) span).getBackgroundColor());
589 } else if (span instanceof UnderlineSpan) { 679 } else if (span instanceof UnderlineSpan) {
590 nativeAppendUnderlineSpan(underlines, spannableString.getSpanSta rt(span), 680 nativeAppendUnderlineSpan(underlines, spannableString.getSpanSta rt(span),
591 spannableString.getSpanEnd(span)); 681 spannableString.getSpanEnd(span));
592 } 682 }
593 } 683 }
594 } 684 }
595 685
596 @CalledByNative 686 @CalledByNative
597 private void cancelComposition() { 687 private void cancelComposition() {
598 if (DEBUG_LOGS) Log.w(TAG, "cancelComposition"); 688 if (DEBUG_LOGS) Log.w(TAG, "cancelComposition");
599 if (mInputConnection != null) restartInput(); 689 if (mInputConnection != null) restartInput();
600 } 690 }
601 691
602 @CalledByNative 692 @CalledByNative
693 private void setCharacterBounds(float[] characterBounds) {
694 if (mCursorAnchorInfoController == null) return;
695 mCursorAnchorInfoController.setCompositionCharacterBounds(characterBound s);
696 }
697
698 @CalledByNative
603 private void detach() { 699 private void detach() {
604 if (DEBUG_LOGS) Log.w(TAG, "detach"); 700 if (DEBUG_LOGS) Log.w(TAG, "detach");
605 mNativeImeAdapterAndroid = 0; 701 mNativeImeAdapterAndroid = 0;
702 if (mCursorAnchorInfoController != null) {
703 mCursorAnchorInfoController.focusedNodeChanged(false);
704 }
606 } 705 }
607 706
608 private native boolean nativeSendSyntheticKeyEvent(long nativeImeAdapterAndr oid, 707 private native boolean nativeSendSyntheticKeyEvent(long nativeImeAdapterAndr oid,
609 int eventType, long timestampMs, int keyCode, int modifiers, int uni codeChar); 708 int eventType, long timestampMs, int keyCode, int modifiers, int uni codeChar);
610 private native boolean nativeSendKeyEvent(long nativeImeAdapterAndroid, KeyE vent event, 709 private native boolean nativeSendKeyEvent(long nativeImeAdapterAndroid, KeyE vent event,
611 int action, int modifiers, long timestampMs, int keyCode, int scanCo de, 710 int action, int modifiers, long timestampMs, int keyCode, int scanCo de,
612 boolean isSystemKey, int unicodeChar); 711 boolean isSystemKey, int unicodeChar);
613 private static native void nativeAppendUnderlineSpan(long underlinePtr, int start, int end); 712 private static native void nativeAppendUnderlineSpan(long underlinePtr, int start, int end);
614 private static native void nativeAppendBackgroundColorSpan(long underlinePtr , int start, 713 private static native void nativeAppendBackgroundColorSpan(long underlinePtr , int start,
615 int end, int backgroundColor); 714 int end, int backgroundColor);
616 private native void nativeSetComposingText(long nativeImeAdapterAndroid, Cha rSequence text, 715 private native void nativeSetComposingText(long nativeImeAdapterAndroid, Cha rSequence text,
617 String textStr, int newCursorPosition); 716 String textStr, int newCursorPosition);
618 private native void nativeCommitText(long nativeImeAdapterAndroid, String te xtStr); 717 private native void nativeCommitText(long nativeImeAdapterAndroid, String te xtStr);
619 private native void nativeFinishComposingText(long nativeImeAdapterAndroid); 718 private native void nativeFinishComposingText(long nativeImeAdapterAndroid);
620 private native void nativeAttachImeAdapter(long nativeImeAdapterAndroid); 719 private native void nativeAttachImeAdapter(long nativeImeAdapterAndroid);
621 private native void nativeSetEditableSelectionOffsets(long nativeImeAdapterA ndroid, 720 private native void nativeSetEditableSelectionOffsets(long nativeImeAdapterA ndroid,
622 int start, int end); 721 int start, int end);
623 private native void nativeSetComposingRegion(long nativeImeAdapterAndroid, i nt start, int end); 722 private native void nativeSetComposingRegion(long nativeImeAdapterAndroid, i nt start, int end);
624 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid , 723 private native void nativeDeleteSurroundingText(long nativeImeAdapterAndroid ,
625 int before, int after); 724 int before, int after);
626 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid); 725 private native void nativeResetImeAdapter(long nativeImeAdapterAndroid);
627 private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapt erAndroid); 726 private native boolean nativeRequestTextInputStateUpdate(long nativeImeAdapt erAndroid);
628 } 727 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698