diff options
author | 2012-03-31 18:32:48 +0900 | |
---|---|---|
committer | 2012-03-31 19:04:38 +0900 | |
commit | 96fdc4dd8426a078500ce1d8a104bde7201bf9b5 (patch) | |
tree | 714282160aefe2f5c08548075826689b9a928c52 /java/src/com/android/inputmethod/latin/EditingUtils.java | |
parent | 697033f93f50fb9641faa0e82d2e4e2b834a03bf (diff) | |
download | latinime-96fdc4dd8426a078500ce1d8a104bde7201bf9b5.tar.gz latinime-96fdc4dd8426a078500ce1d8a104bde7201bf9b5.tar.xz latinime-96fdc4dd8426a078500ce1d8a104bde7201bf9b5.zip |
Remove InputConnectionCompatUtils
Also, small cleanup in proguard.flags
bug: 6129704
Change-Id: If4cc694dbe74b26b1d0da301bbc321ee7afc0211
Diffstat (limited to 'java/src/com/android/inputmethod/latin/EditingUtils.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/EditingUtils.java | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/latin/EditingUtils.java b/java/src/com/android/inputmethod/latin/EditingUtils.java index 1e8ad1840..b3f613bae 100644 --- a/java/src/com/android/inputmethod/latin/EditingUtils.java +++ b/java/src/com/android/inputmethod/latin/EditingUtils.java @@ -1,12 +1,12 @@ /* * Copyright (C) 2009 The Android Open Source Project - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -16,8 +16,6 @@ package com.android.inputmethod.latin; -import com.android.inputmethod.compat.InputConnectionCompatUtils; - import android.text.TextUtils; import android.view.inputmethod.ExtractedText; import android.view.inputmethod.ExtractedTextRequest; @@ -246,7 +244,7 @@ public class EditingUtils { if (selStart == selEnd) { // There is just a cursor, so get the word at the cursor // getWordRangeAtCursor returns null if the connection is null - EditingUtils.Range range = getWordRangeAtCursor(ic, wordSeparators); + final EditingUtils.Range range = getWordRangeAtCursor(ic, wordSeparators); if (range != null && !TextUtils.isEmpty(range.mWord)) { return new SelectedWord(selStart - range.mCharsBefore, selEnd + range.mCharsAfter, range.mWord); @@ -254,20 +252,19 @@ public class EditingUtils { } else { if (null == ic) return null; // Is the previous character empty or a word separator? If not, return null. - CharSequence charsBefore = ic.getTextBeforeCursor(1, 0); + final CharSequence charsBefore = ic.getTextBeforeCursor(1, 0); if (!isWordBoundary(charsBefore, wordSeparators)) { return null; } // Is the next character empty or a word separator? If not, return null. - CharSequence charsAfter = ic.getTextAfterCursor(1, 0); + final CharSequence charsAfter = ic.getTextAfterCursor(1, 0); if (!isWordBoundary(charsAfter, wordSeparators)) { return null; } // Extract the selection alone - CharSequence touching = InputConnectionCompatUtils.getSelectedText( - ic, selStart, selEnd); + final CharSequence touching = ic.getSelectedText(0); if (TextUtils.isEmpty(touching)) return null; // Is any part of the selection a separator? If so, return null. final int length = touching.length(); |