From 471a38d440a00b2e3f1c8a880774b6ad31c2e369 Mon Sep 17 00:00:00 2001 From: tedchoc Date: Fri, 26 Jun 2015 12:06:19 -0700 Subject: [PATCH] Change UrlBar#isInBatchEditMode to something that does not conflict with TextView. BUG= Review URL: https://codereview.chromium.org/1221433003 Cr-Commit-Position: refs/heads/master@{#336435} --- .../src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java | 2 +- .../android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java index 65f204b1c01f..7fdc1864bc3e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java @@ -1763,7 +1763,7 @@ public class LocationBarLayout extends FrameLayout implements OnClickListener, Editable text = mUrlBar.getText(); return mUrlBar.isCursorAtEndOfTypedText() - && !mUrlBar.isInBatchEditMode() + && !mUrlBar.isHandlingBatchInput() && BaseInputConnection.getComposingSpanEnd(text) == BaseInputConnection.getComposingSpanStart(text); } diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java index 6696bc54eb4f..7d344a5b06c8 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java @@ -277,7 +277,9 @@ public class UrlBar extends VerticallyFixedEditText { * @return Whether the URL is currently in batch edit mode triggered by an IME. No external * text changes should be triggered while this is true. */ - public boolean isInBatchEditMode() { + // isInBatchEditMode is a package protected method on TextView, so we intentionally chose + // a different name. + public boolean isHandlingBatchInput() { return mInBatchEditMode; } -- 2.11.4.GIT