Home
last modified time | relevance | path

Searched refs:indexOf (Results 1 – 25 of 478) sorted by relevance

12345678910>>...20

/frameworks/base/core/tests/coretests/src/android/text/method/
DWordIteratorTest.java181 wordIterator.setCharSequence(text, text.indexOf('n'), text.length()); in testWindowWidth()
182 final int expectedWindowStart = text.indexOf('n') - 50; in testWindowWidth()
209 assertEquals(BreakIterator.DONE, wordIterator.preceding(text.indexOf('a'))); in testPreceding()
210 assertEquals(text.indexOf('a'), wordIterator.preceding(text.indexOf('c'))); in testPreceding()
211 assertEquals(text.indexOf('a'), wordIterator.preceding(text.indexOf('d'))); in testPreceding()
212 assertEquals(text.indexOf('d'), wordIterator.preceding(text.indexOf('e'))); in testPreceding()
213 assertEquals(text.indexOf('d'), wordIterator.preceding(text.indexOf('g'))); in testPreceding()
214 assertEquals(text.indexOf('g'), wordIterator.preceding(text.indexOf('h'))); in testPreceding()
215 assertEquals(text.indexOf('g'), wordIterator.preceding(text.indexOf('j'))); in testPreceding()
216 assertEquals(text.indexOf('j'), wordIterator.preceding(text.indexOf('l'))); in testPreceding()
[all …]
/frameworks/base/core/tests/coretests/src/android/widget/
DTextViewActivityMouseTest.java88 mouseDragOnText(helloWorld.indexOf("llo"), helloWorld.indexOf("ld!"))); in testSelectTextByDrag()
91 onView(withId(R.id.textview)).perform(mouseClickOnTextAtIndex(helloWorld.indexOf("w"))); in testSelectTextByDrag()
101 mouseDragOnText( helloWorld.indexOf("ld!"), helloWorld.indexOf("llo"))); in testSelectTextByDrag_reverse()
115 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
128 mouseClickOnTextAtIndex(text.indexOf("."))); in testContextMenu()
132 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
144 mouseDragOnText(text.indexOf("c"), text.indexOf("h"))); in testContextMenu()
146 mouseClickOnTextAtIndex(text.indexOf("d"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
159 mouseClickOnTextAtIndex(text.indexOf("i"), MotionEvent.BUTTON_SECONDARY)); in testContextMenu()
169 onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(text.indexOf("i"))); in testContextMenu()
[all …]
DEditorCursorDragTest.java106 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("llo"), text.indexOf("!"))); in testCursorDrag_horizontal_whenTextViewContentsFitOnScreen()
111 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("!"), text.indexOf("llo"))); in testCursorDrag_horizontal_whenTextViewContentsFitOnScreen()
124 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("llo"), text.indexOf("!"))); in testCursorDrag_horizontal_whenTextViewContentsLargerThanScreen()
129 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("!"), text.indexOf("llo"))); in testCursorDrag_horizontal_whenTextViewContentsLargerThanScreen()
146 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("line1"), text.indexOf("2"))); in testCursorDrag_diagonal_whenTextViewContentsFitOnScreen()
147 onView(withId(R.id.textview)).check(hasInsertionPointerAtIndex(text.indexOf("1"))); in testCursorDrag_diagonal_whenTextViewContentsFitOnScreen()
152 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("line1"), text.indexOf("7"))); in testCursorDrag_diagonal_whenTextViewContentsFitOnScreen()
156 int index = text.indexOf("line9"); in testCursorDrag_diagonal_whenTextViewContentsFitOnScreen()
164 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("line7"), text.indexOf("1"))); in testCursorDrag_diagonal_whenTextViewContentsFitOnScreen()
182 onView(withId(R.id.textview)).perform(dragOnText(text.indexOf("line1"), text.indexOf("2"))); in testCursorDrag_diagonal_whenTextViewContentsLargerThanScreen()
[all …]
DTextViewActivityTest.java152 onView(withId(R.id.textview)).perform(clickOnTextAtIndex(helloWorld.indexOf("world"))); in testPositionCursorAtTextAtIndex()
200 longPressOnTextAtIndex(helloWorld.indexOf("Kirk"))); in testLongPressToSelect()
210 onView(withId(R.id.textview)).perform(clickOnTextAtIndex(helloWorld.indexOf("big"))); in testLongPressEmptySpace()
224 longPressAndDragOnText(helloWorld.indexOf("little"), helloWorld.indexOf(" boy!"))); in testLongPressAndDragToSelect()
247 onView(withId(R.id.textview)).perform(longPressOnTextAtIndex(text.indexOf("e"))); in testDragAndDrop()
250 longPressAndDragOnText(text.indexOf("e"), text.length())); in testDragAndDrop()
269 doubleClickOnTextAtIndex(helloWorld.indexOf("SuetYi"))); in testDoubleTapToSelect()
278 onView(withId(R.id.textview)).perform(doubleTapAndDragOnText(helloWorld.indexOf("young"), in testDoubleTapAndDragToSelect()
279 helloWorld.indexOf(" person!"))); in testDoubleTapAndDragToSelect()
289 doubleTapAndDragOnText(helloWorld.indexOf("m"), helloWorld.indexOf("a"))); in testDoubleTapAndDragToSelect_multiLine()
[all …]
DSuggestionsPopupWindowTest.java98 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testOnTextContextMenuItem()
116 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testSelectionActionMode()
118 onView(withId(R.id.textview)).perform(longPressOnTextAtIndex(text.indexOf('e'))); in testSelectionActionMode()
135 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testInsertionActionMode()
137 onView(withId(R.id.textview)).perform(clickOnTextAtIndex(text.indexOf('e'))); in testInsertionActionMode()
161 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testSuggestionItems()
199 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testMisspelled()
227 setSuggestionSpan(suggestionSpan, text.indexOf('d'), text.indexOf('f') + 1); in testEasyCorrect()
229 onView(withId(R.id.textview)).perform(clickOnTextAtIndex(text.indexOf('e'))); in testEasyCorrect()
242 onView(withId(R.id.textview)).perform(clickOnTextAtIndex(text.indexOf('e'))); in testEasyCorrect()
[all …]
/frameworks/opt/chips/tests/src/com/android/ex/chips/
DChipsTest.java190 int firstStart = mEditable.toString().indexOf(first); in testSanitizeBetween()
192 int secondStart = mEditable.toString().indexOf(second); in testSanitizeBetween()
198 assertEquals(editableString.indexOf(extra), -1); in testSanitizeBetween()
199 assertEquals(editableString.indexOf(first), firstStart); in testSanitizeBetween()
200 assertEquals(editableString.indexOf(second), secondStart - extra.length()); in testSanitizeBetween()
208 firstStart = mEditable.toString().indexOf(first); in testSanitizeBetween()
227 int firstStart = mEditable.toString().indexOf(first); in testSanitizeEnd()
229 int secondStart = mEditable.toString().indexOf(second); in testSanitizeEnd()
235 assertEquals(editableString.indexOf(extra), -1); in testSanitizeEnd()
236 assertEquals(editableString.indexOf(first), firstStart); in testSanitizeEnd()
[all …]
/frameworks/base/services/tests/wmtests/src/com/android/server/wm/
DWindowContainerTransactionTests.java106 .indexOf(desktopOrganizer.mTasks.get(i).getRootTask()) in testDesktopMode_tasksAreBroughtToFront()
107 < tda.mChildren.indexOf(desktopOrganizer.mTasks.get(i + 1).getRootTask())); in testDesktopMode_tasksAreBroughtToFront()
140 .indexOf(desktopOrganizer.mTasks.get(i).getRootTask()) in testDesktopMode_moveTaskToDesktop()
141 < tda.mChildren.indexOf(desktopOrganizer.mTasks.get(i + 1).getRootTask())); in testDesktopMode_moveTaskToDesktop()
145 .indexOf(desktopOrganizer.mTasks.get(3).getRootTask()) in testDesktopMode_moveTaskToDesktop()
146 < tda.mChildren.indexOf(task)); in testDesktopMode_moveTaskToDesktop()
188 assertTrue(tda.mChildren.indexOf(desktopOrganizer.mTasks.get(0).getRootTask()) in testDesktopMode_moveTaskToFront()
189 < tda.mChildren.indexOf(desktopOrganizer.mTasks.get(1).getRootTask())); in testDesktopMode_moveTaskToFront()
190 assertTrue(tda.mChildren.indexOf(desktopOrganizer.mTasks.get(1).getRootTask()) in testDesktopMode_moveTaskToFront()
191 < tda.mChildren.indexOf(desktopOrganizer.mTasks.get(3).getRootTask())); in testDesktopMode_moveTaskToFront()
[all …]
/frameworks/base/core/java/android/database/sqlite/
DSQLiteTokenizer.java53 return set.indexOf(ch) >= 0; in isAnyOf()
119 pos = sql.indexOf(ch, pos); in tokenize()
139 if (tokenUnquoted.indexOf(ch) >= 0) { in tokenize()
158 pos = sql.indexOf(']', pos); in tokenize()
177 pos = sql.indexOf('\n', pos); in tokenize()
188 pos = sql.indexOf("*/", pos); in tokenize()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/location/injector/
DFakeUserInfoHelper.java54 int idx = mRunningUserIds.indexOf(userId); in startUserInternal()
65 int idx = mRunningUserIds.indexOf(userId); in stopUser()
98 int idx = mVisibleUserIds.indexOf(userId); in setUserVisibleInternal()
108 int idx = mVisibleUserIds.indexOf(userId); in setUserInvisibleInternal()
140 return mVisibleUserIds.indexOf(userId) >= 0; in isVisibleUserId()
/frameworks/base/core/java/com/android/internal/util/
DRingBuffer.java83 mBuffer[indexOf(mCursor++)] = t; in append()
92 final int nextSlotIdx = indexOf(mCursor++); in getNextSlot()
106 out[outIdx--] = (T) mBuffer[indexOf(inCursor--)]; in toArray()
111 private int indexOf(long cursor) { in indexOf() method in RingBuffer
/frameworks/base/packages/SystemUI/common/src/com/android/systemui/common/buffer/
DRingBuffer.kt74 val index = indexOf(omega) in advance()
95 return buffer[indexOf(start + index)]!! in get()
115 private fun indexOf(position: Long): Int { in indexOf() method
/frameworks/layoutlib/create/src/com/android/tools/layoutlib/create/
DRenameClassAdapter.java47 int pos = mOldName.indexOf('$'); in RenameClassAdapter()
51 pos = mNewName.indexOf('$'); in RenameClassAdapter()
80 int pos = type.indexOf('$'); in renameInternalType()
/frameworks/base/core/tests/utiltests/src/android/util/
DLongArrayTest.java55 assertEquals(5, a.indexOf(20)); in testLongArray()
58 assertEquals(-1, a.indexOf(99)); in testLongArray()
71 assertEquals(2, a.indexOf(30)); in testLongArray()
DIntArrayTest.java57 assertThat(a.indexOf(20)).isEqualTo(5); in testIntArray()
61 assertThat(a.indexOf(99)).isEqualTo(-1); in testIntArray()
75 assertThat(a.indexOf(30)).isEqualTo(2); in testIntArray()
/frameworks/base/core/java/android/app/
DConfigurationChangedListenerController.java50 if (indexOf(consumer) > -1) { in addListener()
63 final int index = indexOf(consumer); in removeListener()
85 private int indexOf(Consumer<IBinder> consumer) { in indexOf() method in ConfigurationChangedListenerController
/frameworks/opt/net/voip/src/java/android/net/sip/
DSimpleSessionDescription.java68 address = (address.indexOf(':') < 0 ? "IN IP4 " : "IN IP6 ") + address; in SimpleSessionDescription()
410 int slash = parts[2].indexOf('/'); in getAddress()
420 address = (address.indexOf(':') < 0 ? "IN IP4 " : "IN IP6 ") + in setAddress()
434 int colon = encryption.indexOf(':'); in getEncryptionMethod()
446 int colon = encryption.indexOf(':'); in getEncryptionKey()
529 if (mOrder.indexOf(type) == -1) { in parse()
538 int i = line.indexOf(delimiter); in parse()
554 int i = line.indexOf(delimiter); in cut()
/frameworks/base/core/java/android/webkit/
DURLUtil.java98 if (webAddress.getHost().indexOf('.') == -1) { in guessUrl()
111 int placeHolderIndex = template.indexOf(queryPlaceHolder); in composeSearchUrl()
168 int index = url.indexOf('%'); in verifyURLEncoding()
180 index = url.indexOf('%', index + 1); in verifyURLEncoding()
305 int anchorIndex = url.indexOf('#'); in stripAnchor()
378 int queryIndex = decodedUrl.indexOf('?'); in guessFileNameRfc2616()
399 int dotIndex = filename.indexOf('.'); in guessFileNameRfc2616()
454 if (filename.indexOf('.') < 0) { in guessFileNameRfc6266()
/frameworks/base/core/tests/coretests/src/android/view/textclassifier/
DTextClassifierUtilsTest.java41 start = text.indexOf("任侠団体"); in testGetSubString()
55 start = text.indexOf("all"); in testGetSubString()
62 start = text.indexOf("themselves"); in testGetSubString()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/
DNotificationTargetsHelper.kt50 val indexOfParentSwipedView = visibleGroupChildren.indexOf(viewSwiped) in findRoundableTargets()
58 ?: visibleStackChildren.indexOf(notificationParent).let { in findRoundableTargets()
64 val indexOfSwipedView = visibleStackChildren.indexOf(viewSwiped) in findRoundableTargets()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DVisualVoicemailSmsParser.java62 int eventTypeEnd = smsBody.indexOf(":", prefixEnd + 1); in parse()
101 int separatorIndex = entry.indexOf("="); in parseSmsBody()
127 int eventTypeEnd = smsBody.indexOf("?"); in parseAlternativeFormat()
/frameworks/base/core/java/com/android/internal/alsa/
DLineTokenizer.java36 if (mDelimiters.indexOf(line.charAt(offset)) == -1) { in nextToken()
49 if (mDelimiters.indexOf(line.charAt(offset)) != -1) { in nextDelimiter()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/notetask/
DNoteTaskControllerTest.kt501 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
522 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
610 userTracker.set(listOf(mainUserInfo), mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
620 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
638 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
648 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
658 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
815 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
830 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
848 userTracker.set(mainAndWorkProfileUsers, mainAndWorkProfileUsers.indexOf(mainUserInfo)) in <lambda>()
[all …]
/frameworks/native/libs/binder/
DPermissionCache.cpp43 ssize_t index = mCache.indexOf(e); in check()
55 ssize_t index = mPermissionNamesPool.indexOf(permission); in cache()
66 index = mCache.indexOf(e); in cache()
/frameworks/base/packages/SystemUI/src/com/android/systemui/navigationbar/
DNavigationBarInflaterView.java360 sizeStr.substring(0, sizeStr.indexOf(WEIGHT_SUFFIX))); in applySize()
364 Float.parseFloat(sizeStr.substring(0, sizeStr.indexOf(ABSOLUTE_SUFFIX)))); in applySize()
416 int index = uri.indexOf('/'); in createView()
430 final int start = buttonSpec.indexOf(KEY_IMAGE_DELIM); in extractImage()
431 String subStr = buttonSpec.substring(start + 1, buttonSpec.indexOf(KEY_CODE_END)); in extractImage()
439 final int start = buttonSpec.indexOf(KEY_CODE_START); in extractKeycode()
440 String subStr = buttonSpec.substring(start + 1, buttonSpec.indexOf(KEY_IMAGE_DELIM)); in extractKeycode()
448 final int sizeStart = buttonSpec.indexOf(SIZE_MOD_START); in extractSize()
449 return buttonSpec.substring(sizeStart + 1, buttonSpec.indexOf(SIZE_MOD_END)); in extractSize()
456 return buttonSpec.substring(0, buttonSpec.indexOf(SIZE_MOD_START)); in extractButton()
/frameworks/base/core/tests/utiltests/src/com/android/internal/util/
DArrayUtilsTest.java65 assertEquals(0, ArrayUtils.indexOf(new Object[] { A, B, C }, A)); in testIndexOf()
66 assertEquals(1, ArrayUtils.indexOf(new Object[] { A, B, C }, B)); in testIndexOf()
67 assertEquals(2, ArrayUtils.indexOf(new Object[] { A, B, C }, C)); in testIndexOf()
68 assertEquals(-1, ArrayUtils.indexOf(new Object[] { A, B, C }, D)); in testIndexOf()
70 assertEquals(-1, ArrayUtils.indexOf(new Object[] { A, B, C }, null)); in testIndexOf()
71 assertEquals(-1, ArrayUtils.indexOf(new Object[] { }, A)); in testIndexOf()
72 assertEquals(-1, ArrayUtils.indexOf(new Object[] { }, null)); in testIndexOf()
74 assertEquals(0, ArrayUtils.indexOf(new Object[] { null, null }, null)); in testIndexOf()
75 assertEquals(1, ArrayUtils.indexOf(new Object[] { A, null, B }, null)); in testIndexOf()
76 assertEquals(2, ArrayUtils.indexOf(new Object[] { A, null, B }, B)); in testIndexOf()

12345678910>>...20