Home
last modified time | relevance | path

Searched refs:matcher (Results 1 – 25 of 139) sorted by relevance

123456

/frameworks/base/core/tests/coretests/src/android/os/
DPatternMatcherTest.java33 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 …]
/frameworks/base/core/tests/coretests/src/android/content/
DUriMatcherTest.java48 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/
DPatternsTest.java34 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/
DPatternScanner.java51 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/cmds/statsd/src/matchers/
Dmatcher_util.cpp100 bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher, in matchesSimple() argument
118 if (pos == matcher.field()) { in matchesSimple()
123 } else if (pos > matcher.field()) { in matchesSimple()
138 if (matcher.has_position()) { in matchesSimple()
144 switch (matcher.position()) { in matchesSimple()
198 switch (matcher.value_matcher_case()) { in matchesSimple()
204 for (const auto& subMatcher : matcher.matches_tuple().field_value_matcher()) { in matchesSimple()
221 (values[i].mValue.int_value != 0) == matcher.eq_bool()) || in matchesSimple()
223 (values[i].mValue.long_value != 0) == matcher.eq_bool())) { in matchesSimple()
232 matcher.eq_string())) { in matchesSimple()
[all …]
DCombinationLogMatchingTracker.cpp48 AtomMatcher_Combination matcher = allLogMatchers[mIndex].combination(); in init() local
51 if (!matcher.has_operation()) { in init()
55 mLogicalOperation = matcher.operation(); in init()
57 if (mLogicalOperation == LogicalOperation::NOT && matcher.matcher_size() != 1) { in init()
61 for (const auto& child : matcher.matcher()) { in init()
DSimpleLogMatchingTracker.cpp31 const SimpleAtomMatcher& matcher, in SimpleLogMatchingTracker() argument
33 : LogMatchingTracker(id, index), mMatcher(matcher), mUidMap(uidMap) { in SimpleLogMatchingTracker()
34 if (!matcher.has_atom_id()) { in SimpleLogMatchingTracker()
37 mAtomIds.insert(matcher.atom_id()); in SimpleLogMatchingTracker()
/frameworks/base/core/java/android/webkit/
DFindAddress.java270 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/base/cmds/statsd/src/
DFieldValue.cpp45 bool Field::matches(const Matcher& matcher) const { in matches()
46 if (mTag != matcher.mMatcher.getTag()) { in matches()
49 if ((mField & matcher.mMask) == matcher.mMatcher.getField()) { in matches()
53 if (matcher.hasAllPositionMatcher() && in matches()
54 (mField & (matcher.mMask & kClearAllPositionMatcherMask)) == matcher.mMatcher.getField()) { in matches()
61 void translateFieldMatcher(int tag, const FieldMatcher& matcher, int depth, int* pos, int* mask, in translateFieldMatcher() argument
68 pos[depth] = matcher.field(); in translateFieldMatcher()
71 if (matcher.has_position()) { in translateFieldMatcher()
76 switch (matcher.position()) { in translateFieldMatcher()
100 if (matcher.child_size() == 0) { in translateFieldMatcher()
[all …]
/frameworks/base/cmds/statsd/tests/metrics/
Dmetrics_test_helper.cpp33 void buildSimpleAtomFieldMatcher(const int tagId, FieldMatcher* matcher) { in buildSimpleAtomFieldMatcher() argument
34 matcher->set_field(tagId); in buildSimpleAtomFieldMatcher()
37 void buildSimpleAtomFieldMatcher(const int tagId, const int fieldNum, FieldMatcher* matcher) { in buildSimpleAtomFieldMatcher() argument
38 matcher->set_field(tagId); in buildSimpleAtomFieldMatcher()
39 matcher->add_child()->set_field(fieldNum); in buildSimpleAtomFieldMatcher()
/frameworks/base/core/tests/coretests/src/android/widget/espresso/
DDragHandleUtils.java21 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;
DContextMenuUtils.java22 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;
DSuggestionsPopupwindowUtils.java21 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()
DFloatingToolbarEspressoUtils.java22 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;
74 public static ViewInteraction onFloatingToolBarItem(Matcher<View> matcher) { in onFloatingToolBarItem() argument
75 return onView(matcher) in onFloatingToolBarItem()
/frameworks/native/include/android/
Dfont_matcher.h146 void AFontMatcher_destroy(AFontMatcher* _Nonnull matcher) __INTRODUCED_IN(29);
161 AFontMatcher* _Nonnull matcher,
177 AFontMatcher* _Nonnull matcher,
192 AFontMatcher* _Nonnull matcher,
214 const AFontMatcher* _Nonnull matcher,
/frameworks/base/services/core/java/com/android/server/wm/
DWindowManagerShellCommand.java233 final Matcher matcher = flattenedPattern.matcher(areaStr); in runDisplayFoldedArea() local
234 if (!matcher.matches()) { in runDisplayFoldedArea()
238 rect.set(Integer.parseInt(matcher.group(1)), Integer.parseInt(matcher.group(2)), in runDisplayFoldedArea()
239 Integer.parseInt(matcher.group(3)), Integer.parseInt(matcher.group(4))); in runDisplayFoldedArea()
255 Matcher matcher = FLATTENED_PATTERN.matcher(overscanStr); in runDisplayOverscan() local
256 if (!matcher.matches()) { in runDisplayOverscan()
260 rect.left = Integer.parseInt(matcher.group(1)); in runDisplayOverscan()
261 rect.top = Integer.parseInt(matcher.group(2)); in runDisplayOverscan()
262 rect.right = Integer.parseInt(matcher.group(3)); in runDisplayOverscan()
263 rect.bottom = Integer.parseInt(matcher.group(4)); in runDisplayOverscan()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DMissedIncomingCallSmsFilter.java171 Matcher matcher = pattern.matcher(message.getMessageBody()); in processSms() local
173 if (matcher.find()) { in processSms()
175 month = matcher.group(SMS_MONTH_TAG); in processSms()
176 day = matcher.group(SMS_DAY_TAG); in processSms()
177 hour = matcher.group(SMS_HOUR_TAG); in processSms()
178 minute = matcher.group(SMS_MINUTE_TAG); in processSms()
193 year = matcher.group(SMS_YEAR_TAG); in processSms()
213 callerId = matcher.group(SMS_CALLER_ID_TAG); in processSms()
/frameworks/base/native/android/
Dsystem_fonts.cpp219 void AFontMatcher_destroy(AFontMatcher* matcher) { in AFontMatcher_destroy() argument
220 delete matcher; in AFontMatcher_destroy()
224 AFontMatcher* _Nonnull matcher, in AFontMatcher_setStyle() argument
227 matcher->mFontStyle = minikin::FontStyle( in AFontMatcher_setStyle()
232 AFontMatcher* _Nonnull matcher, in AFontMatcher_setLocales() argument
234 matcher->mLocaleListId = minikin::registerLocaleList(languageTags); in AFontMatcher_setLocales()
237 void AFontMatcher_setFamilyVariant(AFontMatcher* _Nonnull matcher, uint32_t familyVariant) { in AFontMatcher_setFamilyVariant() argument
238 matcher->mFamilyVariant = familyVariant; in AFontMatcher_setFamilyVariant()
242 const AFontMatcher* _Nonnull matcher, in AFontMatcher_match() argument
251 matcher->mFontStyle, in AFontMatcher_match()
[all …]
/frameworks/base/core/java/android/util/
DPatterns.java469 public static final String concatGroups(Matcher matcher) { in concatGroups() argument
471 final int numGroups = matcher.groupCount(); in concatGroups()
474 String s = matcher.group(i); in concatGroups()
494 public static final String digitsAndPlusOnly(Matcher matcher) { in digitsAndPlusOnly() argument
496 String matchingRegion = matcher.group(); in digitsAndPlusOnly()
/frameworks/base/test-runner/src/android/test/
DMoreAsserts.java253 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/core/java/com/android/server/
DBootReceiver.java382 Matcher matcher = pattern.matcher(line); in addFsckErrorsToDropBoxAndLogFsStat() local
383 if (matcher.find()) { in addFsckErrorsToDropBoxAndLogFsStat()
384 handleFsckFsStat(matcher, lines, lastFsStatLineNumber, lineNumber); in addFsckErrorsToDropBoxAndLogFsStat()
534 Matcher matcher = pattern.matcher(lines); in logFsShutdownTime() local
535 if (matcher.find()) { in logFsShutdownTime()
537 Integer.parseInt(matcher.group(1))); in logFsShutdownTime()
539 Integer.parseInt(matcher.group(2))); in logFsShutdownTime()
540 Slog.i(TAG, "boot_fs_shutdown," + matcher.group(1) + "," + matcher.group(2)); in logFsShutdownTime()
583 Matcher matcher = passPattern.matcher(line); in fixFsckFsStat() local
584 if (matcher.find()) { in fixFsckFsStat()
[all …]
/frameworks/base/cmds/statsd/src/shell/
DShellSubscriber.cpp87 mPulledInfo.emplace_back(pulled.matcher(), pulled.freq_millis()); in updateConfig()
88 VLOG("adding matcher for pulled atom %d", pulled.matcher().atom_id()); in updateConfig()
100 const SimpleAtomMatcher& matcher) { in writeToOutputLocked() argument
106 if (matchesSimple(*mUidMap, matcher, *event)) { in writeToOutputLocked()
204 for (const auto& matcher : mPushedMatchers) { in onLogEvent() local
205 if (matchesSimple(*mUidMap, matcher, event)) { in onLogEvent()
/frameworks/base/core/java/android/service/autofill/
DTextValueSanitizer.java81 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/cmds/statsd/tests/
DLogEntryMatcher_test.cpp42 AtomMatcher matcher; in TEST() local
43 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
82 AtomMatcher matcher; in TEST() local
83 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
334 AtomMatcher matcher; in TEST() local
335 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
413 AtomMatcher matcher; in TEST() local
414 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
461 AtomMatcher matcher; in TEST() local
462 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
[all …]
/frameworks/base/media/java/android/media/
DTtmlRenderer.java131 Matcher matcher = CLOCK_TIME.matcher(time); in parseTimeExpression() local
132 if (matcher.matches()) { in parseTimeExpression()
133 String hours = matcher.group(1); in parseTimeExpression()
135 String minutes = matcher.group(2); in parseTimeExpression()
137 String seconds = matcher.group(3); in parseTimeExpression()
139 String fraction = matcher.group(4); in parseTimeExpression()
141 String frames = matcher.group(5); in parseTimeExpression()
143 String subframes = matcher.group(6); in parseTimeExpression()
149 matcher = OFFSET_TIME.matcher(time); in parseTimeExpression()
150 if (matcher.matches()) { in parseTimeExpression()
[all …]

123456