Searched refs:minimumLength (Results 1 – 2 of 2) sorted by relevance
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/ |
D | TextClassifierUtilsTest.java | 38 int minimumLength; in testGetSubString() local 43 minimumLength = 20; in testGetSubString() 44 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 50 minimumLength = 15; in testGetSubString() 51 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 57 minimumLength = 10; in testGetSubString() 58 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 64 minimumLength = end - start; in testGetSubString() 65 assertThat(TextClassifier.Utils.getSubString(text, start, end, minimumLength)) in testGetSubString() 69 minimumLength = text.length() + 1; in testGetSubString() [all …]
|
/frameworks/base/core/java/android/view/textclassifier/ |
D | TextClassifier.java | 685 String text, int start, int end, int minimumLength) { in getSubString() argument 690 if (text.length() < minimumLength) { in getSubString() 695 if (length >= minimumLength) { in getSubString() 699 final int offset = (minimumLength - length) / 2; in getSubString() 700 int iterStart = Math.max(0, Math.min(start - offset, text.length() - minimumLength)); in getSubString() 701 int iterEnd = Math.min(text.length(), iterStart + minimumLength); in getSubString()
|