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

Unified Diff: content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java

Issue 755853004: Replace #updateCursor with #updateCursorAnchorInfo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comment from Aurimas. Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java b/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java
index baa952ac0999b899baf314b85f9e09aa33bdefb7..108f5ec8ac6dfb50eb625fe04ba8b80a83513d57 100644
--- a/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java
+++ b/content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java
@@ -4,10 +4,13 @@
package org.chromium.content.browser.input;
+import android.annotation.TargetApi;
import android.content.Context;
+import android.os.Build;
import android.os.IBinder;
import android.os.ResultReceiver;
import android.view.View;
+import android.view.inputmethod.CursorAnchorInfo;
import android.view.inputmethod.InputMethodManager;
/**
@@ -63,22 +66,13 @@ public class InputMethodManagerWrapper {
}
/**
- * @see android.view.inputmethod.InputMethodManager#isWatchingCursor(View)
+ * @see android.view.inputmethod.InputMethodManager#updateCursorAnchorInfo(View,
+ * CursorAnchorInfo)
*/
- @SuppressWarnings("deprecation")
- public boolean isWatchingCursor(View view) {
- // TODO(aurimas): InputMethodManager.isWatchingCursor() was deprecated in L. Fix
- // this once the final Android L SDK is released.
- return getInputMethodManager().isWatchingCursor(view);
- }
-
- /**
- * @see android.view.inputmethod.InputMethodManager#updateCursor(View, int, int, int, int)
- */
- @SuppressWarnings("deprecation")
- public void updateCursor(View view, int left, int top, int right, int bottom) {
- // TODO(aurimas): InputMethodManager.updateCursor() was deprecated in L. Fix
- // this once the final Android L SDK is released.
- getInputMethodManager().updateCursor(view, left, top, right, bottom);
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
+ public void updateCursorAnchorInfo(View view, CursorAnchorInfo cursorAnchorInfo) {
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+ getInputMethodManager().updateCursorAnchorInfo(view, cursorAnchorInfo);
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698