/frameworks/base/core/tests/coretests/src/android/os/ |
D | PatternMatcherTest.java | 33 PatternMatcher matcher = new PatternMatcher(".", PatternMatcher.PATTERN_ADVANCED_GLOB); in testAdvancedPatternMatchesAnyToken() local 34 assertMatches("a", matcher); in testAdvancedPatternMatchesAnyToken() 35 assertMatches("b", matcher); in testAdvancedPatternMatchesAnyToken() 36 assertNotMatches("", matcher); in testAdvancedPatternMatchesAnyToken() 41 PatternMatcher matcher = new PatternMatcher("[a]", PatternMatcher.PATTERN_ADVANCED_GLOB); in testAdvancedPatternMatchesSetToken() local 42 assertMatches("a", matcher); in testAdvancedPatternMatchesSetToken() 43 assertNotMatches("b", matcher); in testAdvancedPatternMatchesSetToken() 45 matcher = new PatternMatcher("[.*+{}\\]\\\\[]", PatternMatcher.PATTERN_ADVANCED_GLOB); in testAdvancedPatternMatchesSetToken() 46 assertMatches(".", matcher); in testAdvancedPatternMatchesSetToken() 47 assertMatches("*", matcher); in testAdvancedPatternMatchesSetToken() [all …]
|
D | BytesMatcherTest.java | 37 BytesMatcher matcher = BytesMatcher.decode(""); in testEmpty() local 38 assertFalse(matcher.test(hexStringToByteArray("cafe"))); in testEmpty() 39 assertFalse(matcher.test(hexStringToByteArray(""))); in testEmpty() 44 BytesMatcher matcher = BytesMatcher.decode("+cafe"); in testExact() local 45 assertTrue(matcher.test(hexStringToByteArray("cafe"))); in testExact() 46 assertFalse(matcher.test(hexStringToByteArray("beef"))); in testExact() 47 assertFalse(matcher.test(hexStringToByteArray("ca"))); in testExact() 48 assertFalse(matcher.test(hexStringToByteArray("cafe00"))); in testExact() 53 BytesMatcher matcher = BytesMatcher.decode("+cafe/ff00"); in testMask() local 54 assertTrue(matcher.test(hexStringToByteArray("cafe"))); in testMask() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/ |
D | UriMatcherTest.java | 48 UriMatcher matcher = new UriMatcher(ROOT); in testContentUris() local 49 matcher.addURI("people", null, PEOPLE); in testContentUris() 50 matcher.addURI("people", "#", PEOPLE_ID); in testContentUris() 51 matcher.addURI("people", "#/phones", PEOPLE_PHONES); in testContentUris() 52 matcher.addURI("people", "#/phones/blah", PEOPLE_PHONES_ID); in testContentUris() 53 matcher.addURI("people", "#/phones/#", PEOPLE_PHONES_ID); in testContentUris() 54 matcher.addURI("people", "#/addresses", PEOPLE_ADDRESSES); in testContentUris() 55 matcher.addURI("people", "#/addresses/#", PEOPLE_ADDRESSES_ID); in testContentUris() 56 matcher.addURI("people", "#/contact-methods", PEOPLE_CONTACTMETH); in testContentUris() 57 matcher.addURI("people", "#/contact-methods/#", PEOPLE_CONTACTMETH_ID); in testContentUris() [all …]
|
/frameworks/base/core/tests/coretests/src/android/util/ |
D | PatternsTest.java | 34 t = Patterns.TOP_LEVEL_DOMAIN.matcher("com").matches(); in testTldPattern() 38 t = Patterns.TOP_LEVEL_DOMAIN.matcher("me").matches(); in testTldPattern() 42 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xn--0zwm56d").matches(); in testTldPattern() 46 t = Patterns.TOP_LEVEL_DOMAIN.matcher("\uD55C\uAD6D").matches(); in testTldPattern() 49 t = Patterns.TOP_LEVEL_DOMAIN.matcher("mem").matches(); in testTldPattern() 52 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xn").matches(); in testTldPattern() 55 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xer").matches(); in testTldPattern() 64 assertTrue("Should match 'com'", pattern.matcher("com").matches()); in testIanaTopLevelDomains_matchesValidTld() 70 assertTrue("Should match 'me'", pattern.matcher("me").matches()); in testIanaTopLevelDomains_matchesValidNewTld() 76 assertTrue("Should match Punycode TLD", pattern.matcher("xn--qxam").matches()); in testIanaTopLevelDomains_matchesPunycodeTld() [all …]
|
/frameworks/base/media/mca/filterfw/java/android/filterfw/io/ |
D | PatternScanner.java | 51 Matcher matcher = pattern.matcher(mInput); in tryEat() local 52 matcher.region(mOffset, mInput.length()); in tryEat() 56 if (matcher.lookingAt()) { in tryEat() 57 updateLineCount(mOffset, matcher.end()); in tryEat() 58 mOffset = matcher.end(); in tryEat() 59 result = mInput.substring(matcher.start(), matcher.end()); in tryEat() 85 Matcher matcher = pattern.matcher(mInput); in peek() local 86 matcher.region(mOffset, mInput.length()); in peek() 89 return matcher.lookingAt(); in peek() 93 Matcher matcher = pattern.matcher(mInput); in skip() local [all …]
|
/frameworks/base/core/tests/bluetoothtests/src/android/bluetooth/le/ |
D | ScanRecordTest.java | 50 final Predicate<byte[]> matcher = (v) -> { in testMatchesAnyField_Eddystone_Parser() local 55 .matchesAnyField(matcher); in testMatchesAnyField_Eddystone_Parser() 67 final BytesMatcher matcher = BytesMatcher.decode("⊆0016AAFE/00FFFFFF"); in testMatchesAnyField_Eddystone() local 68 assertMatchesAnyField(RECORD_URL, matcher); in testMatchesAnyField_Eddystone() 69 assertMatchesAnyField(RECORD_UUID, matcher); in testMatchesAnyField_Eddystone() 70 assertMatchesAnyField(RECORD_TLM, matcher); in testMatchesAnyField_Eddystone() 71 assertNotMatchesAnyField(RECORD_IBEACON, matcher); in testMatchesAnyField_Eddystone() 77 final Predicate<byte[]> matcher = (v) -> { in testMatchesAnyField_iBeacon_Parser() local 82 .matchesAnyField(matcher); in testMatchesAnyField_iBeacon_Parser() 93 final BytesMatcher matcher = BytesMatcher.decode("⊆00FF4C0002/00FFFFFFFF"); in testMatchesAnyField_iBeacon() local [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/utils/ |
D | GestureLogParser.java | 53 Matcher matcher = p.matcher(line); in getMotionEventFromLogLine() local 54 if (matcher.find()) { in getMotionEventFromLogLine() 55 actionIndex = Integer.decode(matcher.group(2)); in getMotionEventFromLogLine() 75 final Matcher matcher = p.matcher(eventText); in findInt() local 76 matcher.find(); in findInt() 77 return Integer.decode(matcher.group(1)); in findInt() 82 final Matcher matcher = p.matcher(eventText); in findFloat() local 83 matcher.find(); in findFloat() 84 return Float.parseFloat(matcher.group(1)); in findFloat() 89 final Matcher matcher = p.matcher(eventText); in findString() local [all …]
|
/frameworks/base/core/java/android/webkit/ |
D | FindAddress.java | 270 Matcher suffixMatcher = sSuffixedNumberRe.matcher(houseNumber); in checkHouseNumber() 301 Matcher matcher = sHouseNumberRe.matcher(content).region(offset, content.length()); in matchHouseNumber() 302 if (matcher.lookingAt()) { in matchHouseNumber() 303 MatchResult matchResult = matcher.toMatchResult(); in matchHouseNumber() 320 Matcher stateMatcher = sStateRe.matcher(content).region(offset, content.length()); in matchState() 340 return sZipCodeRe.matcher(zipCode).matches() in isValidZipCode() 351 return sLocationNameRe.matcher(location).matches(); in isValidLocationName() 373 Matcher matcher = sWordRe.matcher(content); in attemptMatch() local 375 for (; it < content.length(); lastWord = matcher.group(0), it = matcher.end()) { in attemptMatch() 376 if (!matcher.find(it)) { in attemptMatch() [all …]
|
/frameworks/native/include/android/ |
D | font_matcher.h | 144 void AFontMatcher_destroy(AFontMatcher* _Nonnull matcher) __INTRODUCED_IN(29); 159 AFontMatcher* _Nonnull matcher, 175 AFontMatcher* _Nonnull matcher, 190 AFontMatcher* _Nonnull matcher, 212 const AFontMatcher* _Nonnull matcher,
|
/frameworks/base/core/tests/coretests/src/android/widget/espresso/ |
D | DragHandleUtils.java | 21 import static androidx.test.espresso.matcher.RootMatchers.isPlatformPopup; 22 import static androidx.test.espresso.matcher.RootMatchers.withDecorView; 23 import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant; 24 import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom; 25 import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; 26 import static androidx.test.espresso.matcher.ViewMatchers.withId;
|
D | ContextMenuUtils.java | 22 import static androidx.test.espresso.matcher.RootMatchers.withDecorView; 23 import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant; 24 import static androidx.test.espresso.matcher.ViewMatchers.hasFocus; 25 import static androidx.test.espresso.matcher.ViewMatchers.isAssignableFrom; 26 import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; 27 import static androidx.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast; 28 import static androidx.test.espresso.matcher.ViewMatchers.isEnabled; 29 import static androidx.test.espresso.matcher.ViewMatchers.withText; 40 import androidx.test.espresso.matcher.ViewMatchers;
|
D | SuggestionsPopupwindowUtils.java | 21 import static androidx.test.espresso.matcher.RootMatchers.withDecorView; 22 import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant; 23 import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; 24 import static androidx.test.espresso.matcher.ViewMatchers.withId; 25 import static androidx.test.espresso.matcher.ViewMatchers.withText; 51 private static ViewInteraction onSuggestionsPopupItem(Matcher<View> matcher) { in onSuggestionsPopupItem() argument 53 return onView(matcher).inRoot(withDecorView(hasDescendant(withId(id)))); in onSuggestionsPopupItem()
|
D | FloatingToolbarEspressoUtils.java | 22 import static androidx.test.espresso.matcher.RootMatchers.isPlatformPopup; 23 import static androidx.test.espresso.matcher.RootMatchers.withDecorView; 24 import static androidx.test.espresso.matcher.ViewMatchers.hasDescendant; 25 import static androidx.test.espresso.matcher.ViewMatchers.isDisplayed; 26 import static androidx.test.espresso.matcher.ViewMatchers.isRoot; 27 import static androidx.test.espresso.matcher.ViewMatchers.withId; 28 import static androidx.test.espresso.matcher.ViewMatchers.withTagValue; 29 import static androidx.test.espresso.matcher.ViewMatchers.withText; 75 public static ViewInteraction onFloatingToolBarItem(Matcher<View> matcher) { in onFloatingToolBarItem() argument 76 return onView(matcher) in onFloatingToolBarItem()
|
/frameworks/base/core/java/android/os/ |
D | BytesMatcher.java | 243 public static @NonNull String encode(@NonNull BytesMatcher matcher) { in encode() argument 245 final int size = matcher.mRules.size(); in encode() 247 final Rule rule = matcher.mRules.get(i); in encode() 270 final BytesMatcher matcher = new BytesMatcher(); in decode() local 271 if (TextUtils.isEmpty(value)) return matcher; in decode() 295 matcher.addExactAcceptRule(ruleValue, ruleMask); in decode() 298 matcher.addExactRejectRule(ruleValue, ruleMask); in decode() 301 matcher.addPrefixAcceptRule(ruleValue, ruleMask); in decode() 304 matcher.addPrefixRejectRule(ruleValue, ruleMask); in decode() 313 return matcher; in decode()
|
/frameworks/opt/telephony/src/java/com/android/internal/telephony/ |
D | MissedIncomingCallSmsFilter.java | 175 Matcher matcher = pattern.matcher(message.getMessageBody()); in processSms() local 177 if (matcher.find()) { in processSms() 179 month = matcher.group(SMS_MONTH_TAG); in processSms() 180 day = matcher.group(SMS_DAY_TAG); in processSms() 181 hour = matcher.group(SMS_HOUR_TAG); in processSms() 182 minute = matcher.group(SMS_MINUTE_TAG); in processSms() 197 year = matcher.group(SMS_YEAR_TAG); in processSms() 217 callerId = matcher.group(SMS_CALLER_ID_TAG); in processSms()
|
/frameworks/base/services/accessibility/java/com/android/server/accessibility/magnification/ |
D | GesturesObserver.java | 101 final GestureMatcher matcher = mGestureMatchers.get(i); in onMotionEvent() local 102 matcher.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent() 103 if (matcher.getState() == GestureMatcher.STATE_GESTURE_COMPLETED) { in onMotionEvent() 118 for (GestureMatcher matcher : mGestureMatchers) { in clear() 119 matcher.clear(); in clear()
|
/frameworks/base/services/core/java/com/android/server/timezonedetector/location/ |
D | TestCommand.java | 72 Matcher matcher = SHELL_ARG_PATTERN.matcher(argKeyAndValue); in createFromShellCommandArgs() local 73 if (!matcher.matches()) { in createFromShellCommandArgs() 77 String key = matcher.group(1); in createFromShellCommandArgs() 78 String type = matcher.group(2); in createFromShellCommandArgs() 79 String encodedValue = matcher.group(3); in createFromShellCommandArgs()
|
/frameworks/base/core/java/android/util/ |
D | Patterns.java | 476 public static final String concatGroups(Matcher matcher) { in concatGroups() argument 478 final int numGroups = matcher.groupCount(); in concatGroups() 481 String s = matcher.group(i); in concatGroups() 501 public static final String digitsAndPlusOnly(Matcher matcher) { in digitsAndPlusOnly() argument 503 String matchingRegion = matcher.group(); in digitsAndPlusOnly()
|
/frameworks/base/tests/ManagedProfileLifecycleStressTest/src/com/android/test/stress/ |
D | ManagedProfileLifecycleStressTest.java | 125 final Matcher matcher = CREATE_USER_OUTPUT_REGEX.matcher(output.trim()); in createManagedProfile() local 126 if (!matcher.matches() || matcher.groupCount() != 1) { in createManagedProfile() 129 return Integer.parseInt(matcher.group(1)); in createManagedProfile()
|
/frameworks/base/services/core/java/com/android/server/pm/ |
D | DynamicCodeLoggingService.java | 237 Matcher matcher = EXECUTE_NATIVE_AUDIT_PATTERN.matcher(""); in processAuditEvents() local 264 matcher.reset(message); in processAuditEvents() 265 if (!matcher.matches()) { in processAuditEvents() 268 String path = matcher.group(1); in processAuditEvents() 272 path = unhex(matcher.group(2)); in processAuditEvents()
|
/frameworks/base/services/core/java/com/android/server/stats/pull/ |
D | IonMemoryUtil.java | 69 final Matcher matcher = ION_HEAP_SIZE_IN_BYTES.matcher(contents); in parseIonHeapSizeFromDebugfs() local 71 return matcher.find() ? Long.parseLong(matcher.group(1)) : 0; in parseIonHeapSizeFromDebugfs() 98 final Matcher m = PROCESS_ION_HEAP_SIZE_IN_BYTES.matcher(contents); in parseProcessIonHeapSizesFromDebugfs()
|
/frameworks/base/services/core/java/com/android/server/ |
D | BootReceiver.java | 266 if (registerPattern.matcher(line).find()) return null; in stripSensitiveData() 268 Matcher cm = corruptionPattern.matcher(line); in stripSensitiveData() 331 Matcher bm = bugPattern.matcher(line); in processDmesg() 342 Matcher rm = reportPattern.matcher(line); in processDmesg() 613 Matcher matcher = pattern.matcher(line); in addFsckErrorsToDropBoxAndLogFsStat() local 614 if (matcher.find()) { in addFsckErrorsToDropBoxAndLogFsStat() 615 handleFsckFsStat(matcher, lines, lastFsStatLineNumber, lineNumber); in addFsckErrorsToDropBoxAndLogFsStat() 787 Matcher matcher = pattern.matcher(lines); in logFsShutdownTime() local 788 if (matcher.find()) { in logFsShutdownTime() 791 Integer.parseInt(matcher.group(1))); in logFsShutdownTime() [all …]
|
/frameworks/base/core/java/android/service/autofill/ |
D | TextValueSanitizer.java | 81 final Matcher matcher = mRegex.matcher(text); in sanitize() local 82 if (!matcher.matches()) { in sanitize() 87 final CharSequence sanitized = matcher.replaceAll(mSubst); in sanitize()
|
/frameworks/base/test-runner/src/android/test/ |
D | MoreAsserts.java | 253 Matcher matcher = getMatcher(expectedRegex, actual); in assertMatchesRegex() local 254 if (!matcher.matches()) { in assertMatchesRegex() 257 return matcher; in assertMatchesRegex() 281 Matcher matcher = getMatcher(expectedRegex, actual); in assertContainsRegex() local 282 if (!matcher.find()) { in assertContainsRegex() 285 return matcher; in assertContainsRegex() 305 Matcher matcher = getMatcher(expectedRegex, actual); in assertNotMatchesRegex() local 306 if (matcher.matches()) { in assertNotMatchesRegex() 328 Matcher matcher = getMatcher(expectedRegex, actual); in assertNotContainsRegex() local 329 if (matcher.find()) { in assertNotContainsRegex() [all …]
|
/frameworks/base/native/android/ |
D | system_fonts.cpp | 295 void AFontMatcher_destroy(AFontMatcher* matcher) { in AFontMatcher_destroy() argument 296 delete matcher; in AFontMatcher_destroy() 300 AFontMatcher* _Nonnull matcher, in AFontMatcher_setStyle() argument 303 matcher->mFontStyle = minikin::FontStyle( in AFontMatcher_setStyle() 308 AFontMatcher* _Nonnull matcher, in AFontMatcher_setLocales() argument 310 matcher->mLocaleListId = minikin::registerLocaleList(languageTags); in AFontMatcher_setLocales() 313 void AFontMatcher_setFamilyVariant(AFontMatcher* _Nonnull matcher, uint32_t familyVariant) { in AFontMatcher_setFamilyVariant() argument 314 matcher->mFamilyVariant = familyVariant; in AFontMatcher_setFamilyVariant() 318 const AFontMatcher* _Nonnull matcher, in AFontMatcher_match() argument 327 matcher->mFontStyle, in AFontMatcher_match() [all …]
|