Home
last modified time | relevance | path

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

1234567

/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.cpp99 bool matchesSimple(const UidMap& uidMap, const FieldValueMatcher& matcher, in matchesSimple() argument
117 if (pos == matcher.field()) { in matchesSimple()
122 } else if (pos > matcher.field()) { in matchesSimple()
137 if (matcher.has_position()) { in matchesSimple()
143 switch (matcher.position()) { in matchesSimple()
197 switch (matcher.value_matcher_case()) { in matchesSimple()
203 for (const auto& subMatcher : matcher.matches_tuple().field_value_matcher()) { in matchesSimple()
220 (values[i].mValue.int_value != 0) == matcher.eq_bool()) || in matchesSimple()
222 (values[i].mValue.long_value != 0) == matcher.eq_bool())) { in matchesSimple()
230 if (tryMatchString(uidMap, values[i], 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.cpp44 bool Field::matches(const Matcher& matcher) const { in matches()
45 if (mTag != matcher.mMatcher.getTag()) { in matches()
48 if ((mField & matcher.mMask) == matcher.mMatcher.getField()) { in matches()
52 if (matcher.hasAllPositionMatcher() && in matches()
53 (mField & (matcher.mMask & kClearAllPositionMatcherMask)) == matcher.mMatcher.getField()) { in matches()
60 void translateFieldMatcher(int tag, const FieldMatcher& matcher, int depth, int* pos, int* mask, in translateFieldMatcher() argument
67 pos[depth] = matcher.field(); in translateFieldMatcher()
70 if (matcher.has_position()) { in translateFieldMatcher()
75 switch (matcher.position()) { in translateFieldMatcher()
99 if (matcher.child_size() == 0) { in translateFieldMatcher()
[all …]
/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/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/base/cmds/statsd/tests/metrics/
Dmetrics_test_helper.cpp46 void buildSimpleAtomFieldMatcher(const int tagId, FieldMatcher* matcher) { in buildSimpleAtomFieldMatcher() argument
47 matcher->set_field(tagId); in buildSimpleAtomFieldMatcher()
50 void buildSimpleAtomFieldMatcher(const int tagId, const int fieldNum, FieldMatcher* matcher) { in buildSimpleAtomFieldMatcher() argument
51 matcher->set_field(tagId); in buildSimpleAtomFieldMatcher()
52 matcher->add_child()->set_field(fieldNum); in buildSimpleAtomFieldMatcher()
/frameworks/opt/telephony/src/java/com/android/internal/telephony/
DMissedIncomingCallSmsFilter.java175 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/tests/ManagedProfileLifecycleStressTest/src/com/android/test/stress/
DManagedProfileLifecycleStressTest.java75 final Matcher matcher = CREATE_USER_OUTPUT_REGEX.matcher(output.trim()); in createManagedProfile() local
76 if (!matcher.matches() || matcher.groupCount() != 1) { in createManagedProfile()
79 return Integer.parseInt(matcher.group(1)); in createManagedProfile()
/frameworks/base/native/android/
Dsystem_fonts.cpp230 void AFontMatcher_destroy(AFontMatcher* matcher) { in AFontMatcher_destroy() argument
231 delete matcher; in AFontMatcher_destroy()
235 AFontMatcher* _Nonnull matcher, in AFontMatcher_setStyle() argument
238 matcher->mFontStyle = minikin::FontStyle( in AFontMatcher_setStyle()
243 AFontMatcher* _Nonnull matcher, in AFontMatcher_setLocales() argument
245 matcher->mLocaleListId = minikin::registerLocaleList(languageTags); in AFontMatcher_setLocales()
248 void AFontMatcher_setFamilyVariant(AFontMatcher* _Nonnull matcher, uint32_t familyVariant) { in AFontMatcher_setFamilyVariant() argument
249 matcher->mFamilyVariant = familyVariant; in AFontMatcher_setFamilyVariant()
253 const AFontMatcher* _Nonnull matcher, in AFontMatcher_match() argument
262 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/services/core/java/com/android/server/stats/pull/
DIonMemoryUtil.java69 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/accessibility/java/com/android/server/accessibility/gestures/
DGestureManifold.java213 for (GestureMatcher matcher : mGestures) { in onMotionEvent()
214 if (matcher.getState() != GestureMatcher.STATE_GESTURE_CANCELED) { in onMotionEvent()
216 Slog.d(LOG_TAG, matcher.toString()); in onMotionEvent()
218 matcher.onMotionEvent(event, rawEvent, policyFlags); in onMotionEvent()
220 Slog.d(LOG_TAG, matcher.toString()); in onMotionEvent()
222 if (matcher.getState() == GestureMatcher.STATE_GESTURE_COMPLETED) { in onMotionEvent()
235 for (GestureMatcher matcher : mGestures) { in clear()
236 matcher.clear(); in clear()
303 for (GestureMatcher matcher : mGestures) { in onStateChanged()
304 if (matcher.getState() == GestureMatcher.STATE_GESTURE_STARTED) { in onStateChanged()
/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/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.java403 Matcher matcher = pattern.matcher(line); in addFsckErrorsToDropBoxAndLogFsStat() local
404 if (matcher.find()) { in addFsckErrorsToDropBoxAndLogFsStat()
405 handleFsckFsStat(matcher, lines, lastFsStatLineNumber, lineNumber); in addFsckErrorsToDropBoxAndLogFsStat()
577 Matcher matcher = pattern.matcher(lines); in logFsShutdownTime() local
578 if (matcher.find()) { in logFsShutdownTime()
581 Integer.parseInt(matcher.group(1))); in logFsShutdownTime()
584 Integer.parseInt(matcher.group(2))); in logFsShutdownTime()
585 Slog.i(TAG, "boot_fs_shutdown," + matcher.group(1) + "," + matcher.group(2)); in logFsShutdownTime()
629 Matcher matcher = passPattern.matcher(line); in fixFsckFsStat() local
630 if (matcher.find()) { in fixFsckFsStat()
[all …]
/frameworks/base/cmds/statsd/tests/
DLogEntryMatcher_test.cpp119 AtomMatcher matcher; in TEST() local
120 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
144 AtomMatcher matcher; in TEST() local
145 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
373 AtomMatcher matcher; in TEST() local
374 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
416 AtomMatcher matcher; in TEST() local
417 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
477 AtomMatcher matcher; in TEST() local
478 auto simpleMatcher = matcher.mutable_simple_atom_matcher(); in TEST()
[all …]

1234567