Searched refs:matcher (Results 1 - 25 of 220) sorted by relevance

123456789

/frameworks/base/core/tests/coretests/src/android/net/
H A DUriMatcherTest.java45 UriMatcher matcher = new UriMatcher(ROOT);
46 matcher.addURI("people", null, PEOPLE);
47 matcher.addURI("people", "#", PEOPLE_ID);
48 matcher.addURI("people", "#/phones", PEOPLE_PHONES);
49 matcher.addURI("people", "#/phones/blah", PEOPLE_PHONES_ID);
50 matcher.addURI("people", "#/phones/#", PEOPLE_PHONES_ID);
51 matcher.addURI("people", "#/addresses", PEOPLE_ADDRESSES);
52 matcher.addURI("people", "#/addresses/#", PEOPLE_ADDRESSES_ID);
53 matcher.addURI("people", "#/contact-methods", PEOPLE_CONTACTMETH);
54 matcher
106 checkAll(UriMatcher matcher) argument
133 check(String uri, int expected, UriMatcher matcher) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/os/
H A DPatternMatcherTest.java15 PatternMatcher matcher = new PatternMatcher(".", PatternMatcher.PATTERN_ADVANCED_GLOB);
16 assertMatches("a", matcher);
17 assertMatches("b", matcher);
18 assertNotMatches("", matcher);
23 PatternMatcher matcher = new PatternMatcher("[a]", PatternMatcher.PATTERN_ADVANCED_GLOB);
24 assertMatches("a", matcher);
25 assertNotMatches("b", matcher);
27 matcher = new PatternMatcher("[.*+{}\\]\\\\[]", PatternMatcher.PATTERN_ADVANCED_GLOB);
28 assertMatches(".", matcher);
29 assertMatches("*", matcher);
215 assertMatches(String string, PatternMatcher matcher) argument
220 assertNotMatches(String string, PatternMatcher matcher) argument
[all...]
/frameworks/base/cmds/statsd/tests/metrics/
H A Dmetrics_test_helper.cpp33 void buildSimpleAtomFieldMatcher(const int tagId, FieldMatcher* matcher) { argument
34 matcher->set_field(tagId);
37 void buildSimpleAtomFieldMatcher(const int tagId, const int fieldNum, FieldMatcher* matcher) { argument
38 matcher->set_field(tagId);
39 matcher->add_child()->set_field(fieldNum);
/frameworks/support/jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/transform/proguard/patterns/
H A DReplacersRunner.kt36 val matcher = replacer.pattern.matcher(processedInput)
38 while (matcher.find()) {
39 if (lastSeenChar < matcher.start()) {
40 sb.append(processedInput, lastSeenChar, matcher.start())
43 val result = replacer.runReplacements(matcher)
45 lastSeenChar = matcher.end()
H A DGroupsReplacer.kt33 * Takes the given [matcher] and replace its matched groups using mapping functions given in
36 fun runReplacements(matcher: Matcher): List<String> {
37 val start = matcher.group(0)
46 val groupVal = matcher.group(i + 1) ?: continue
47 val localStart = matcher.start(i + 1) - matcher.start()
48 val localEnd = matcher.end(i + 1) - matcher.start()
/frameworks/base/media/mca/filterfw/java/android/filterfw/io/
H A DPatternScanner.java50 // Create the matcher
51 Matcher matcher = pattern.matcher(mInput);
52 matcher.region(mOffset, mInput.length());
56 if (matcher.lookingAt()) {
57 updateLineCount(mOffset, matcher.end());
58 mOffset = matcher.end();
59 result = mInput.substring(matcher.start(), matcher.end());
84 // Create the matcher
[all...]
/frameworks/support/navigation/common/src/main/java/androidx/navigation/
H A DNavDeepLink.java43 if (!SCHEME_PATTERN.matcher(uri).find()) {
47 Matcher matcher = fillInPattern.matcher(uri);
48 while (matcher.find()) {
49 String argName = matcher.group(1);
51 matcher.appendReplacement(uriRegex, "");
54 matcher.appendTail(uriRegex);
59 return mPattern.matcher(deepLink.toString()).matches();
64 Matcher matcher = mPattern.matcher(deepLin
[all...]
/frameworks/support/app-toolkit/buildSrc/src/main/kotlin/androidx/build/
H A DVersion.kt65 val matcher = VERSION_REGEX.matcher(versionString)
66 if (!matcher.matches()) {
69 return matcher
77 val matcher = VERSION_FILE_REGEX.matcher(file.name)
78 return if (matcher.matches()) Version(matcher.group(1)) else null
85 val matcher = VERSION_REGEX.matcher(versionStrin
[all...]
/frameworks/support/buildSrc/src/main/kotlin/androidx/build/
H A DVersion.kt65 val matcher = VERSION_REGEX.matcher(versionString)
66 if (!matcher.matches()) {
69 return matcher
77 val matcher = VERSION_FILE_REGEX.matcher(file.name)
78 return if (matcher.matches()) Version(matcher.group(1)) else null
85 val matcher = VERSION_REGEX.matcher(versionStrin
[all...]
/frameworks/base/core/tests/coretests/src/android/util/
H A DPatternsTest.java33 t = Patterns.TOP_LEVEL_DOMAIN.matcher("com").matches();
37 t = Patterns.TOP_LEVEL_DOMAIN.matcher("me").matches();
41 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xn--0zwm56d").matches();
45 t = Patterns.TOP_LEVEL_DOMAIN.matcher("\uD55C\uAD6D").matches();
48 t = Patterns.TOP_LEVEL_DOMAIN.matcher("mem").matches();
51 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xn").matches();
54 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xer").matches();
63 assertTrue("Should match 'com'", pattern.matcher("com").matches());
69 assertTrue("Should match 'me'", pattern.matcher("me").matches());
75 assertTrue("Should match Punycode TLD", pattern.matcher("x
[all...]
/frameworks/support/wear/src/androidTest/java/androidx/wear/widget/util/
H A DMoreViewAssertions.java19 import static android.support.test.espresso.matcher.ViewMatchers.assertThat;
34 public static ViewAssertion left(final Matcher<Integer> matcher) { argument
38 assertThat("View left: " + HumanReadables.describe(view), view.getLeft(), matcher);
43 public static ViewAssertion approximateTop(final Matcher<Double> matcher) { argument
48 matcher);
53 public static ViewAssertion top(final Matcher<Integer> matcher) { argument
57 assertThat("View top: " + HumanReadables.describe(view), view.getTop(), matcher);
62 public static ViewAssertion right(final Matcher<Integer> matcher) { argument
67 matcher);
72 public static ViewAssertion bottom(final Matcher<Integer> matcher) { argument
82 approximateBottom(final Matcher<Double> matcher) argument
99 screenLeft(final Matcher<Integer> matcher) argument
117 screenTop(final Matcher<Integer> matcher) argument
136 screenRight(final Matcher<Integer> matcher) argument
155 screenBottom(final Matcher<Integer> matcher) argument
[all...]
/frameworks/support/compat/src/androidTest/java/androidx/core/util/
H A DPatternsCompatTest.java39 assertTrue("Should match 'com'", pattern.matcher("com").matches());
45 assertTrue("Should match 'me'", pattern.matcher("me").matches());
51 assertTrue("Should match Punycode TLD", pattern.matcher("xn--qxam").matches());
57 assertTrue("Should match IRI TLD", pattern.matcher("\uD55C\uAD6D").matches());
63 assertFalse("Should not match 'mem'", pattern.matcher("mem").matches());
69 assertFalse("Should not match invalid Punycode TLD", pattern.matcher("xn").matches());
78 PatternsCompat.WEB_URL.matcher(url).matches());
85 PatternsCompat.WEB_URL.matcher(url).matches());
92 PatternsCompat.WEB_URL.matcher(url).matches());
99 PatternsCompat.WEB_URL.matcher(ur
[all...]
/frameworks/base/cmds/statsd/src/
H A DFieldValue.cpp43 bool Field::matches(const Matcher& matcher) const {
44 if (mTag != matcher.mMatcher.getTag()) {
47 if ((mField & matcher.mMask) == matcher.mMatcher.getField()) {
51 if (matcher.hasAllPositionMatcher() &&
52 (mField & (matcher.mMask & kClearAllPositionMatcherMask)) == matcher.mMatcher.getField()) {
59 void translateFieldMatcher(int tag, const FieldMatcher& matcher, int depth, int* pos, int* mask, argument
66 pos[depth] = matcher.field();
69 if (matcher
107 translateFieldMatcher(const FieldMatcher& matcher, std::vector<Matcher>* output) argument
228 HasPositionANY(const FieldMatcher& matcher) argument
240 HasPositionALL(const FieldMatcher& matcher) argument
[all...]
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
H A DDragHandleUtils.java21 import static android.support.test.espresso.matcher.RootMatchers.isPlatformPopup;
22 import static android.support.test.espresso.matcher.RootMatchers.withDecorView;
23 import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
24 import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom;
25 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
26 import static android.support.test.espresso.matcher.ViewMatchers.withId;
H A DSuggestionsPopupwindowUtils.java21 import static android.support.test.espresso.matcher.RootMatchers.withDecorView;
22 import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
23 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
24 import static android.support.test.espresso.matcher.ViewMatchers.withId;
25 import static android.support.test.espresso.matcher.ViewMatchers.withText;
48 private static ViewInteraction onSuggestionsPopupItem(Matcher<View> matcher) { argument
49 return onView(matcher).inRoot(withDecorView(hasDescendant(withId(id))));
H A DContextMenuUtils.java22 import static android.support.test.espresso.matcher.RootMatchers.withDecorView;
23 import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
24 import static android.support.test.espresso.matcher.ViewMatchers.hasFocus;
25 import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom;
26 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
27 import static android.support.test.espresso.matcher.ViewMatchers.isDisplayingAtLeast;
28 import static android.support.test.espresso.matcher.ViewMatchers.isEnabled;
29 import static android.support.test.espresso.matcher.ViewMatchers.withText;
37 import android.support.test.espresso.matcher.ViewMatchers;
/frameworks/base/core/java/android/webkit/
H A DFindAddress.java270 Matcher suffixMatcher = sSuffixedNumberRe.matcher(houseNumber);
301 Matcher matcher = sHouseNumberRe.matcher(content).region(offset, content.length());
302 if (matcher.lookingAt()) {
303 MatchResult matchResult = matcher.toMatchResult();
320 Matcher stateMatcher = sStateRe.matcher(content).region(offset, content.length());
340 return sZipCodeRe.matcher(zipCode).matches()
351 return sLocationNameRe.matcher(location).matches();
373 Matcher matcher = sWordRe.matcher(conten
[all...]
/frameworks/base/cmds/statsd/src/matchers/
H A Dmatcher_util.cpp101 bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher, argument
119 if (pos == matcher.field()) {
124 } else if (pos > matcher.field()) {
139 if (matcher.has_position()) {
145 switch (matcher.position()) {
189 ALOGE("Not supported: field matcher with ALL position.");
199 switch (matcher.value_matcher_case()) {
205 for (const auto& subMatcher : matcher.matches_tuple().field_value_matcher()) {
217 // If the field matcher ends with ANY, then we have [start, end) range > 1.
222 (values[i].mValue.int_value != 0) == matcher
[all...]
H A DCombinationLogMatchingTracker.cpp50 AtomMatcher_Combination matcher = allLogMatchers[mIndex].combination(); local
53 if (!matcher.has_operation()) {
57 mLogicalOperation = matcher.operation();
59 if (mLogicalOperation == LogicalOperation::NOT && matcher.matcher_size() != 1) {
63 for (const auto& child : matcher.matcher()) {
74 ALOGE("Circle detected in matcher config");
79 ALOGW("child matcher init failed %lld", (long long)child);
H A DSimpleLogMatchingTracker.cpp33 const SimpleAtomMatcher& matcher,
35 : LogMatchingTracker(id, index), mMatcher(matcher), mUidMap(uidMap) {
36 if (!matcher.has_atom_id()) {
39 mAtomIds.insert(matcher.atom_id());
32 SimpleLogMatchingTracker(const int64_t& id, const int index, const SimpleAtomMatcher& matcher, const UidMap& uidMap) argument
/frameworks/support/compat/src/main/java/androidx/core/text/util/
H A DFindAddress.java279 Matcher suffixMatcher = sSuffixedNumberRe.matcher(houseNumber);
311 Matcher matcher = sHouseNumberRe.matcher(content).region(offset, content.length());
312 if (matcher.lookingAt()) {
313 MatchResult matchResult = matcher.toMatchResult();
331 Matcher stateMatcher = sStateRe.matcher(content).region(offset, content.length());
351 return sZipCodeRe.matcher(zipCode).matches()
377 return sZipCodeRe.matcher(zipCode).matches();
388 return sLocationNameRe.matcher(location).matches();
410 Matcher matcher
[all...]
/frameworks/support/jetifier/jetifier/core/src/main/kotlin/com/android/tools/build/jetifier/core/rule/
H A DRewriteRule.kt71 val matcher = inputPattern.matcher(input.fullName)
72 if (!matcher.matches()) {
81 for (i in 0 until matcher.groupCount()) {
82 result = result.replace("{$i}", matcher.group(i + 1))
102 val matcher = inputPattern.matcher(type.value)
103 return matcher.matches()
/frameworks/support/jetifier/jetifier/processor/src/main/kotlin/com/android/tools/build/jetifier/processor/transform/resource/
H A DXmlResourcesTransformer.kt110 val matcher = pattern.matcher(processedInput)
112 while (matcher.find()) {
113 if (lastSeenChar < matcher.start()) {
114 sb.append(processedInput, lastSeenChar, matcher.start())
117 val toReplace = matcher.group(PATTERN_TYPE_GROUP)
118 val matched = matcher.group(0)
126 val localStart = matcher.start(PATTERN_TYPE_GROUP) - matcher.start()
127 val localEnd = matcher
[all...]
/frameworks/opt/chips/src/com/android/ex/chips/
H A DPhoneUtil.java49 Matcher match = PHONE_PATTERN.matcher(number);
/frameworks/base/core/java/android/util/
H A DPatterns.java463 * @param matcher The Matcher object from which grouped text will
469 public static final String concatGroups(Matcher matcher) { argument
471 final int numGroups = matcher.groupCount();
474 String s = matcher.group(i);
488 * @param matcher The Matcher object from which digits and plus will
494 public static final String digitsAndPlusOnly(Matcher matcher) { argument
496 String matchingRegion = matcher.group();

Completed in 515 milliseconds

123456789