Home
last modified time | relevance | path

Searched refs:matches (Results 1 – 25 of 284) sorted by relevance

12345678910>>...12

/aosp14/frameworks/base/core/tests/coretests/src/android/util/
H A DPatternsTest.java103 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesValidUrlWithSchemeAndHostname()
110 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesValidUrlWithSchemeHostnameAndNewTld()
117 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesValidUrlWithHostnameAndNewTld()
124 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesChinesePunycodeUrlWithProtocol()
131 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesChinesePunycodeUrlWithoutProtocol()
138 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesArabicPunycodeUrlWithProtocol()
145 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesArabicPunycodeUrlWithoutProtocol()
152 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesUrlWithUnicodeDomainNameWithProtocol()
159 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesUrlWithUnicodeDomainNameWithoutProtocol()
166 Patterns.WEB_URL.matcher(url).matches()); in testWebUrl_matchesUrlWithUnicodeTld()
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/content/integrity/
H A DCompoundFormulaTest.java97 assertThat(e.getMessage()).matches("Unknown connector: -1"); in testInvalidCompoundFormula_invalidConnector()
109 assertThat(compoundFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_notFalse_true()
117 assertThat(ATOMIC_FORMULA_1.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_notTrue_false()
121 assertThat(compoundFormula.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_notTrue_false()
132 assertThat(ATOMIC_FORMULA_1.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_trueAndTrue_true()
133 assertThat(ATOMIC_FORMULA_1.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_trueAndTrue_true()
135 assertThat(compoundFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_trueAndTrue_true()
146 assertThat(ATOMIC_FORMULA_1.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_trueAndFalse_false()
187 assertThat(compoundFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_trueOrTrue_true()
200 assertThat(compoundFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_trueOrFalse_true()
[all …]
H A DAtomicFormulaTest.java102 assertThat(stringAtomicFormula.getValue()).matches(appCert); in testValidAtomicFormula_stringValue_appCertificateIsNotAutoHashed()
113 assertThat(stringAtomicFormula.getValue()).matches(appCert); in testValidAtomicFormula_stringValue_appCertificateLineageIsNotAutoHashed()
126 assertThat(stringAtomicFormula.getValue()).matches(installerCert); in testValidAtomicFormula_stringValue_installerCertificateIsNotAutoHashed()
159 assertThat(e.getMessage()).matches( in testInvalidAtomicFormula_stringValue()
171 assertThat(e.getMessage()).matches( in testInvalidAtomicFormula_longValue()
181 assertThat(e.getMessage()).matches( in testInvalidAtomicFormula_boolValue()
231 assertThat(e.getMessage()).matches("Unknown key: -1"); in testInvalidAtomicFormula_invalidKey()
243 assertThat(e.getMessage()).matches("Unknown operator: -1"); in testInvalidAtomicFormula_invalidOperator()
431 assertThat(longAtomicFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_long_eq_true()
527 assertThat(boolFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_bool_true()
[all …]
H A DInstallerAllowedByManifestFormulaTest.java48 assertThat(FORMULA.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_installerAndCertBothInManifest()
61 assertThat(FORMULA.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_installerAndCertDoesNotMatchInManifest()
74 assertThat(FORMULA.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_installerNotInManifest()
87 assertThat(FORMULA.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_certificateDoesNotMatchManifest()
97 assertThat(FORMULA.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_emptyManifest()
110 assertThat(FORMULA.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_certificateNotSpecifiedInManifest()
/aosp14/frameworks/base/errorprone/java/com/google/errorprone/bugpatterns/android/
H A DUnattributedNoteOpCallChecker.java101 if (UNATTRIBUTED_NOTEOP_CALL_1.matches(tree, state) in matchMethodInvocation()
102 || UNATTRIBUTED_NOTEOP_CALL_2.matches(tree, state) in matchMethodInvocation()
103 || UNATTRIBUTED_NOTEOP_CALL_3.matches(tree, state)) { in matchMethodInvocation()
108 if (UNATTRIBUTED_NOTEOPNOTHROW_CALL_1.matches(tree, state) in matchMethodInvocation()
114 if (UNATTRIBUTED_STARTOP_CALL_1.matches(tree, state) in matchMethodInvocation()
115 || UNATTRIBUTED_STARTOP_CALL_2.matches(tree, state) in matchMethodInvocation()
116 || UNATTRIBUTED_STARTOP_CALL_3.matches(tree, state) in matchMethodInvocation()
117 || UNATTRIBUTED_STARTOP_CALL_4.matches(tree, state)) { in matchMethodInvocation()
129 if (UNATTRIBUTED_NOTEPROXYOP_CALL_1.matches(tree, state) in matchMethodInvocation()
141 if (UNATTRIBUTED_FINISHOP_CALL_1.matches(tree, state) in matchMethodInvocation()
[all …]
H A DEfficientParcelableChecker.java76 if (INSIDE_WRITE_TO_PARCEL.matches(tree, state)) { in matchMethodInvocation()
77 if (WRITE_STRING.matches(tree, state)) { in matchMethodInvocation()
83 if (WRITE_STRING_ARRAY.matches(tree, state)) { in matchMethodInvocation()
90 if (WRITE_VALUE.matches(tree, state)) { in matchMethodInvocation()
97 if (WRITE_PARCELABLE.matches(tree, state)) { in matchMethodInvocation()
104 if (WRITE_LIST.matches(tree, state)) { in matchMethodInvocation()
110 if (WRITE_PARCELABLE_LIST.matches(tree, state)) { in matchMethodInvocation()
116 if (WRITE_PARCELABLE_ARRAY.matches(tree, state)) { in matchMethodInvocation()
H A DEfficientXmlChecker.java174 if (PRIMITIVE_TO_STRING.matches(tree, state)) {
182 } else if (VALUE_OF_PRIMITIVE.matches(tree, state)) {
184 } else if (VALUE_OF_OBJECT.matches(tree, state)) {
194 } else if (BOOLEAN_STRING_LITERAL.matches(tree, state)) {
196 } else if (BYTES_TO_STRING.matches(tree, state)) {
212 if (PRIMITIVE_PARSE.matches(tree, state)) {
220 } else if (BYTES_FROM_STRING.matches(tree, state)) {
229 if (WRITE_ATTRIBUTE.matches(tree, state)) { in matchMethodInvocation()
274 } else if (READ_ATTRIBUTE.matches(tree, state)) { in matchMethodInvocation()
316 } else if (XML_FACTORY.matches(tree, state)) { in matchMethodInvocation()
[all …]
H A DTargetSdkChecker.java79 if (INVALID_OLD_BEHAVIOR.matches(tree, state)) { in matchBinary()
85 if (INVALID_NEW_BEHAVIOR.matches(tree, state)) { in matchBinary()
98 public boolean matches(BinaryTree tree, VisitorState state) { in binaryTreeExact()
99 return left.matches(tree.getLeftOperand(), state) in binaryTreeExact()
100 && right.matches(tree.getRightOperand(), state); in binaryTreeExact()
H A DContextUserIdChecker.java78 public boolean matches(ExpressionTree tree, VisitorState state) {
88 if (INSIDE_MANAGER.matches(tree, state) in matchMethodInvocation()
89 && BINDER_CALL.matches(tree, state)) { in matchMethodInvocation()
95 !GET_USER_ID_CALL.matches(arg, state) && in matchMethodInvocation()
96 !USER_ID_FIELD.matches(arg, state)) { in matchMethodInvocation()
H A DEfficientStringsChecker.java112 if (FORMAT_CALL.matches(tree, state)) { in matchMethodInvocation()
133 } else if (PRECONDITIONS_CALL.matches(tree, state) in matchMethodInvocation()
134 || OBJECTS_CALL.matches(tree, state)) { in matchMethodInvocation()
138 if (PLUS_DYNAMIC_VALUE.matches(arg, state)) { in matchMethodInvocation()
146 } else if (APPEND_CALL.matches(tree, state)) { in matchMethodInvocation()
148 if (PLUS_DYNAMIC_VALUE.matches(arg, state)) { in matchMethodInvocation()
160 if (IS_STRING_BUFFER.matches(tree, state)) { in matchNewClass()
/aosp14/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/
H A DBluetoothDeviceFilter.java39 boolean matches(BluetoothDevice device); in matches() method
82 public boolean matches(BluetoothDevice device) { in matches() method in BluetoothDeviceFilter.AllFilter
89 public boolean matches(BluetoothDevice device) { in matches() method in BluetoothDeviceFilter.BondedDeviceFilter
96 public boolean matches(BluetoothDevice device) { in matches() method in BluetoothDeviceFilter.UnbondedDeviceFilter
103 abstract boolean matches(ParcelUuid[] uuids, BluetoothClass btClass); in matches() method in BluetoothDeviceFilter.ClassUuidFilter
105 public boolean matches(BluetoothDevice device) { in matches() method in BluetoothDeviceFilter.ClassUuidFilter
106 return matches(device.getUuids(), device.getBluetoothClass()); in matches()
113 boolean matches(ParcelUuid[] uuids, BluetoothClass btClass) { in matches() method in BluetoothDeviceFilter.AudioFilter
134 boolean matches(ParcelUuid[] uuids, BluetoothClass btClass) { in matches() method in BluetoothDeviceFilter.TransferFilter
148 boolean matches(ParcelUuid[] uuids, BluetoothClass btClass) { in matches() method in BluetoothDeviceFilter.PanuFilter
[all …]
/aosp14/frameworks/base/core/tests/coretests/src/android/database/
H A Dprocess_newdb_perf_test_logs.py39 matches = re.search(regex, line)
40 if matches:
41 test_name = matches.group(1)
42 duration = int(matches.group(2))
60 matches = re.search(regex, line)
61 if matches:
62 max_write_bytes = max(max_write_bytes, int(matches.group(1)))
/aosp14/frameworks/base/cmds/incident_helper/tests/
H A DPsParser_test.cpp216 bool matches = true; in TEST_F() local
220 matches = false; in TEST_F()
229 matches = false; in TEST_F()
233 matches = false; in TEST_F()
237 matches = false; in TEST_F()
241 matches = false; in TEST_F()
245 matches = false; in TEST_F()
249 matches = false; in TEST_F()
253 matches = false; in TEST_F()
257 matches = false; in TEST_F()
[all …]
/aosp14/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/
H A DPackageMatchingCacheTest.java48 cache.matches(null); in testNulls()
52 cache.matches(""); in testNulls()
60 assertTrue(cache.matches("ret.pkg")); in testCaching()
61 assertTrue(cache.matches("ret.pkg")); in testCaching()
62 assertTrue(cache.matches("ret.pkg")); in testCaching()
70 assertTrue(cache.matches("ret.pkg")); in testGetOnFailure()
73 assertTrue(cache.matches("other.pkg")); in testGetOnFailure()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/ui/
H A DSelectionItemTest.kt30 selectionItem.matches(
37 assertThat(selectionItem.matches(SelectedItem.PanelItem("name", ComponentName("", ""))))
54 assertThat(selectionItem.matches(SelectedItem.PanelItem("name", componentName))).isTrue()
70 assertThat(selectionItem.matches(SelectedItem.PanelItem("name", componentName))).isTrue()
90 assertThat(selectionItem.matches(structureItem)).isTrue()
110 assertThat(selectionItem.matches(structureItem)).isFalse()
/aosp14/frameworks/base/core/tests/coretests/src/com/android/internal/app/
H A DChooserActivityWorkProfileTest.java24 import static androidx.test.espresso.assertion.ViewAssertions.matches;
303 .check(matches(isDisplayed())); in assertCantAccessWorkAppsBlockerDisplayed()
305 .check(matches(isDisplayed())); in assertCantAccessWorkAppsBlockerDisplayed()
310 .check(matches(isDisplayed())); in assertCantAccessPersonalAppsBlockerDisplayed()
312 .check(matches(isDisplayed())); in assertCantAccessPersonalAppsBlockerDisplayed()
317 .check(matches(isDisplayed())); in assertCantShareWorkAppsBlockerDisplayed()
319 .check(matches(isDisplayed())); in assertCantShareWorkAppsBlockerDisplayed()
324 .check(matches(isDisplayed())); in assertCantSharePersonalAppsBlockerDisplayed()
326 .check(matches(isDisplayed())); in assertCantSharePersonalAppsBlockerDisplayed()
332 .check(matches(not(isDisplayed()))); in assertNoBlockerDisplayed()
[all …]
/aosp14/frameworks/base/core/java/android/service/autofill/
H A DFieldClassification.java40 public FieldClassification(@NonNull ArrayList<Match> matches) { in FieldClassification() argument
41 mMatches = Objects.requireNonNull(matches); in FieldClassification()
81 final ArrayList<Match> matches = new ArrayList<>(); in readFromParcel() local
83 matches.add(i, Match.readFromParcel(parcel)); in readFromParcel()
86 return new FieldClassification(matches); in readFromParcel()
/aosp14/frameworks/base/services/usb/java/com/android/server/usb/
H A DUsbProfileGroupSettingsManager.java774 int numMatches = matches.size(); in preferHighPriority()
853 matches.add(rawMatch); in removeForwardIntentIfNotNeeded()
856 return matches; in removeForwardIntentIfNotNeeded()
870 matches.add(resolveInfo); in getDeviceMatchesLocked()
885 matches.add(resolveInfo); in getAccessoryMatchesLocked()
902 final ArrayList<ResolveInfo> matches; in resolveActivity() local
966 final ArrayList<ResolveInfo> matches; in accessoryAttached() local
1004 matches.remove(i); in resolveActivity()
1010 if (matches.size() == 0) { in resolveActivity()
1043 if (matches.size() == 1) { in resolveActivity()
[all …]
/aosp14/frameworks/base/core/tests/mockingcoretests/src/android/util/
H A DTimingsTraceLogTest.java28 import static org.mockito.Matchers.matches;
137 verify((MockedVoidMethod) () -> Slog.v(eq(TAG), matches("test took to complete: \\dms"))); in testOneLevel()
152 verify((MockedVoidMethod) () -> Slog.v(eq(TAG), matches("L2 took to complete: \\d+ms"))); in testMultipleLevels()
153 verify((MockedVoidMethod) () -> Slog.v(eq(TAG), matches("L1 took to complete: \\d+ms"))); in testMultipleLevels()
173 verify((MockedVoidMethod) () -> Slog.v(eq(TAG), matches("L2 took to complete: \\d+ms"))); in testTooManyLevels()
174 verify((MockedVoidMethod) () -> Slog.v(eq(TAG), matches("L1 took to complete: \\d+ms"))); in testTooManyLevels()
175 verify((MockedVoidMethod) () -> Slog.v(eq(TAG), matches("L3 took to complete: \\d+ms")), in testTooManyLevels()
/aosp14/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/
H A DMockUtils.java45 public boolean matches(Object item) { in checkUserHandle()
61 public boolean matches(Object item) { in checkIntentComponent()
77 public boolean matches(Object item) { in checkIntentAction()
93 public boolean matches(Object item) { in checkIntent()
122 public boolean matches(Object item) { in createUserRestrictionsBundleMatcher()
151 public boolean matches(Object item) { in createUserRestrictionsSetMatcher()
169 public boolean matches(Object item) { in checkApps()
/aosp14/frameworks/base/telephony/java/android/telephony/
H A DPhoneNumberRange.java75 if (!Pattern.matches("[0-9]*", countryCode)) { in PhoneNumberRange()
78 if (!Pattern.matches("[0-9]*", prefix)) { in PhoneNumberRange()
138 if (!Pattern.matches("[0-9]*", lowerBound)) { in validateLowerAndUpperBounds()
141 if (!Pattern.matches("[0-9]*", upperBound)) { in validateLowerAndUpperBounds()
154 public boolean matches(@NonNull String number) { in matches() method in PhoneNumberRange
/aosp14/frameworks/base/core/java/android/companion/
H A DDeviceFilter.java50 boolean matches(D device); in matches() method
64 static <D extends Parcelable> boolean matches(@Nullable DeviceFilter<D> filter, D device) { in matches() method
65 return filter == null || filter.matches(device); in matches()
/aosp14/frameworks/base/core/tests/coretests/src/android/widget/espresso/
H A DContextMenuUtils.java21 import static androidx.test.espresso.assertion.ViewAssertions.matches;
66 onContextMenu().check(matches(isDisplayed())); in assertContextMenuIsDisplayed()
93 onContextMenu().check(matches( in asssertContextMenuContainsItemWithEnabledState()
141 onContextMenu().check(matches(new TypeSafeMatcher<View>() { in assertContextMenuAlignment()
174 onContextMenu().check(matches( in isMenuItemClickable()
H A DSuggestionsPopupwindowUtils.java20 import static androidx.test.espresso.assertion.ViewAssertions.matches;
62 onSuggestionsPopup().check(matches(isDisplayed())); in assertSuggestionsPopupIsDisplayed()
72 onSuggestionsPopup().check(matches(isDisplayed())); in assertSuggestionsPopupIsNotDisplayed()
86 onSuggestionsPopupItem(withText(itemLabel)).check(matches(isDisplayed())); in assertSuggestionsPopupContainsItem()
/aosp14/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bouncer/ui/viewmodel/
H A DPinInputViewModelTest.kt62 assertThat(result).matches("C0")
68 assertThat(subject.append(2)).matches("C12")
74 assertThat(subject.append(5)).matches("C34C5")
80 assertThat(subject.deleteLast()).matches("C1")
98 assertThat(subject.clearAll()).matches("C12C")
110 assertThat(subject.clearAll()).matches("C12C34C")
252 fun matches(mnemonics: String) { regex

12345678910>>...12