am 256243dd
: Merge "[SD5] Remove useless args"
* commit '256243dd03869dcd1b6844dcc83406aa9adba08e': [SD5] Remove useless args
This commit is contained in:
commit
fdc63036be
2 changed files with 3 additions and 18 deletions
|
@ -619,28 +619,14 @@ public final class RichInputConnection {
|
||||||
return new PrevWordsInfo(prevWordsInfo);
|
return new PrevWordsInfo(prevWordsInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param sortedSeparators a sorted array of code points which may separate words
|
|
||||||
* @return the word that surrounds the cursor, including up to one trailing
|
|
||||||
* separator. For example, if the field contains "he|llo world", where |
|
|
||||||
* represents the cursor, then "hello " will be returned.
|
|
||||||
*/
|
|
||||||
public CharSequence getWordAtCursor(final int[] sortedSeparators) {
|
|
||||||
// getWordRangeAtCursor returns null if the connection is null
|
|
||||||
final TextRange r = getWordRangeAtCursor(sortedSeparators, 0);
|
|
||||||
return (r == null) ? null : r.mWord;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the text surrounding the cursor.
|
* Returns the text surrounding the cursor.
|
||||||
*
|
*
|
||||||
* @param sortedSeparators a sorted array of code points that split words.
|
* @param sortedSeparators a sorted array of code points that split words.
|
||||||
* @param additionalPrecedingWordsCount the number of words before the current word that should
|
|
||||||
* be included in the returned range
|
|
||||||
* @return a range containing the text surrounding the cursor
|
* @return a range containing the text surrounding the cursor
|
||||||
*/
|
*/
|
||||||
public TextRange getWordRangeAtCursor(final int[] sortedSeparators,
|
public TextRange getWordRangeAtCursor(final int[] sortedSeparators) {
|
||||||
final int additionalPrecedingWordsCount) {
|
final int additionalPrecedingWordsCount = 0;
|
||||||
mIC = mParent.getCurrentInputConnection();
|
mIC = mParent.getCurrentInputConnection();
|
||||||
if (mIC == null) {
|
if (mIC == null) {
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -1288,8 +1288,7 @@ public final class InputLogic {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final TextRange range = mConnection.getWordRangeAtCursor(
|
final TextRange range = mConnection.getWordRangeAtCursor(
|
||||||
settingsValues.mSpacingAndPunctuations.mSortedWordSeparators,
|
settingsValues.mSpacingAndPunctuations.mSortedWordSeparators);
|
||||||
0 /* additionalPrecedingWordsCount */);
|
|
||||||
if (null == range) return; // Happens if we don't have an input connection at all
|
if (null == range) return; // Happens if we don't have an input connection at all
|
||||||
if (range.length() <= 0) return; // Race condition. No text to resume on, so bail out.
|
if (range.length() <= 0) return; // Race condition. No text to resume on, so bail out.
|
||||||
// If for some strange reason (editor bug or so) we measure the text before the cursor as
|
// If for some strange reason (editor bug or so) we measure the text before the cursor as
|
||||||
|
|
Loading…
Reference in a new issue