/frameworks/base/core/tests/coretests/src/android/util/ |
D | PatternsTest.java | 42 t = Patterns.TOP_LEVEL_DOMAIN.matcher("com").matches(); in testTldPattern() 46 t = Patterns.TOP_LEVEL_DOMAIN.matcher("me").matches(); in testTldPattern() 50 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xn--0zwm56d").matches(); in testTldPattern() 54 t = Patterns.TOP_LEVEL_DOMAIN.matcher("\uD55C\uAD6D").matches(); in testTldPattern() 57 t = Patterns.TOP_LEVEL_DOMAIN.matcher("mem").matches(); in testTldPattern() 60 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xn").matches(); in testTldPattern() 63 t = Patterns.TOP_LEVEL_DOMAIN.matcher("xer").matches(); in testTldPattern() 73 assertTrue("Should match 'com'", pattern.matcher("com").matches()); in testIanaTopLevelDomains_matchesValidTld() 80 assertTrue("Should match 'me'", pattern.matcher("me").matches()); in testIanaTopLevelDomains_matchesValidNewTld() 87 assertTrue("Should match Punycode TLD", pattern.matcher("xn--qxam").matches()); in testIanaTopLevelDomains_matchesPunycodeTld() [all …]
|
/frameworks/base/core/tests/coretests/src/android/content/integrity/ |
D | CompoundFormulaTest.java | 61 assertThat(e.getMessage()).matches("Connector AND must have at least 2 formulas"); in testValidateAuxiliaryFormula_binaryConnectors() 73 assertThat(e.getMessage()).matches("Connector NOT must have 1 formula only"); in testValidateAuxiliaryFormula_unaryConnectors() 97 assertThat(e.getMessage()).matches("Unknown connector: -1"); in testInvalidCompoundFormula_invalidConnector() 105 assertThat(ATOMIC_FORMULA_1.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_notFalse_true() 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() [all …]
|
D | AtomicFormulaTest.java | 102 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() 255 assertThat(stringAtomicFormula.matches(appInstallMetadata)).isTrue(); in testFormulaMatches_string_packageNameFormula_true() 267 assertThat(stringAtomicFormula.matches(appInstallMetadata)).isFalse(); in testFormulaMatches_string_packageNameFormula_false() [all …]
|
D | InstallerAllowedByManifestFormulaTest.java | 48 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()
|
/frameworks/base/errorprone/java/com/google/errorprone/bugpatterns/android/ |
D | UnattributedNoteOpCallChecker.java | 101 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() 109 || UNATTRIBUTED_NOTEOPNOTHROW_CALL_2.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() 122 if (UNATTRIBUTED_STARTOPNOTHROW_CALL_1.matches(tree, state) in matchMethodInvocation() [all …]
|
D | EfficientParcelableChecker.java | 76 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()
|
D | EfficientXmlChecker.java | 173 public boolean matches(ExpressionTree tree, VisitorState state) { 174 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)) { 211 public boolean matches(ExpressionTree tree, VisitorState 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() [all …]
|
D | TargetSdkChecker.java | 79 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()
|
D | ContextUserIdChecker.java | 78 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()
|
/frameworks/base/tools/hoststubgen/hoststubgen/test/com/android/hoststubgen/utils/ |
D | ClassFilterTest.kt | 27 assertThat(f.matches("a/b/c")).isEqualTo(true) in testDefaultTrue() 33 assertThat(f.matches("a/b/c")).isEqualTo(false) in testDefaultFalse() 46 assertThat(f.matches("a/b/c")).isEqualTo(true) in testComplex1() 49 assertThat(f.matches("a/b/d")).isEqualTo(false) in testComplex1() 50 assertThat(f.matches("x")).isEqualTo(true) in testComplex1() 55 assertThat(f.matches("x")).isEqualTo(true) in testComplex1() 67 assertThat(f.matches("a/b/c")).isEqualTo(true) in testComplex2() 68 assertThat(f.matches("a/x")).isEqualTo(false) in testComplex2() 69 assertThat(f.matches("d/e/f")).isEqualTo(false) in testComplex2() 70 assertThat(f.matches("d/e/f/g")).isEqualTo(true) in testComplex2() [all …]
|
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/bluetooth/ |
D | BluetoothDeviceFilter.java | 39 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 …]
|
/frameworks/base/services/tests/selinux/src/com/android/server/selinux/ |
D | SelinuxAuditLogsBuilderTest.java | 68 assertThat(mScontextMatcher.reset("u:r:" + TEST_DOMAIN + ":s0").matches()).isTrue(); in testMatcher_scontext() 72 assertThat(mScontextMatcher.reset("u:r:" + TEST_DOMAIN + ":s0:c123,c456").matches()) in testMatcher_scontext() 78 assertThat(mScontextMatcher.reset("u:r:wrong_domain:s0").matches()).isFalse(); in testMatcher_scontext() 79 assertThat(mScontextMatcher.reset("u:object_r:" + TEST_DOMAIN + ":s0").matches()).isFalse(); in testMatcher_scontext() 80 assertThat(mScontextMatcher.reset("u:r:" + TEST_DOMAIN + ":s0:p123").matches()).isFalse(); in testMatcher_scontext() 85 assertThat(mTcontextMatcher.reset("u:object_r:target_type:s0").matches()).isTrue(); in testMatcher_tcontext() 89 assertThat(mTcontextMatcher.reset("u:object_r:target_type2:s0:c666").matches()).isTrue(); in testMatcher_tcontext() 93 assertThat(mTcontextMatcher.reset("u:r:target_type:s0").matches()).isFalse(); in testMatcher_tcontext() 94 assertThat(mTcontextMatcher.reset("u:r:" + TEST_DOMAIN + ":s0:x456").matches()).isFalse(); in testMatcher_tcontext() 99 assertThat(mPathMatcher.reset("\"/data\"").matches()).isTrue(); in testMatcher_path() [all …]
|
/frameworks/base/core/tests/coretests/src/android/database/ |
D | process_newdb_perf_test_logs.py | 39 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)))
|
/frameworks/base/cmds/incident_helper/tests/ |
D | PsParser_test.cpp | 216 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 …]
|
/frameworks/base/services/tests/uiservicestests/src/com/android/server/slice/ |
D | PackageMatchingCacheTest.java | 48 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()
|
/frameworks/av/media/libmedia/ |
D | CharacterEncodingDetector.cpp | 141 int32_t matches; in detectAndConvert() local 142 const UCharsetMatch** ucma = ucsdet_detectAll(csd, &matches, &status); in detectAndConvert() 144 ucma, matches, &goodmatch, &highest); in detectAndConvert() 170 ucma = ucsdet_detectAll(csd, &matches, &status); in detectAndConvert() 172 ucma, matches, &goodmatch, &highest); in detectAndConvert() 214 int32_t matches; in detectAndConvert() local 218 const UCharsetMatch** ucma = ucsdet_detectAll(csd, &matches, &status); in detectAndConvert() 220 ucma, matches, &goodmatchSingle, &highestSingle); in detectAndConvert() 329 Vector<const UCharsetMatch*> matches; in getPreferred() local 337 matches.push_back(ucma[i]); in getPreferred() [all …]
|
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/controls/ui/ |
D | SelectionItemTest.kt | 30 selectionItem.matches( in testMatchBadComponentName_false() 37 assertThat(selectionItem.matches(SelectedItem.PanelItem("name", ComponentName("", "")))) in testMatchBadComponentName_false() 54 assertThat(selectionItem.matches(SelectedItem.PanelItem("name", componentName))).isTrue() in testMatchSameComponentName_panelSelected_true() 70 assertThat(selectionItem.matches(SelectedItem.PanelItem("name", componentName))).isTrue() in testMatchSameComponentName_panelSelection_true() 90 assertThat(selectionItem.matches(structureItem)).isTrue() in testMatchSameComponentSameStructure_true() 110 assertThat(selectionItem.matches(structureItem)).isFalse() in testMatchSameComponentDifferentStructure_false()
|
/frameworks/ex/camera2/utils/tests/src/com/android/ex/camera2/utils/ |
D | Camera2UtilsTest.java | 241 assertTrue(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, null)); in requestSettingsSetMatchesPrimitives() 242 assertFalse(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, false)); in requestSettingsSetMatchesPrimitives() 243 assertFalse(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, true)); in requestSettingsSetMatchesPrimitives() 246 assertTrue(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, null)); in requestSettingsSetMatchesPrimitives() 247 assertFalse(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, false)); in requestSettingsSetMatchesPrimitives() 248 assertFalse(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, true)); in requestSettingsSetMatchesPrimitives() 251 assertFalse(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, null)); in requestSettingsSetMatchesPrimitives() 252 assertTrue(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, false)); in requestSettingsSetMatchesPrimitives() 253 assertFalse(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, true)); in requestSettingsSetMatchesPrimitives() 256 assertFalse(setUp.matches(CaptureRequest.CONTROL_AE_LOCK, null)); in requestSettingsSetMatchesPrimitives() [all …]
|
/frameworks/base/packages/SystemUI/compose/scene/src/com/android/compose/animation/scene/ |
D | ElementMatcher.kt | 22 fun matches(key: ElementKey, scene: SceneKey): Boolean in matches() method 33 override fun matches(key: ElementKey, scene: SceneKey): Boolean { in matches() method 34 return scene == matcherScene && delegate.matches(key, scene) in matches()
|
/frameworks/base/core/java/android/service/autofill/ |
D | FieldClassification.java | 40 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()
|
/frameworks/base/core/tests/coretests/src/com/android/internal/app/ |
D | ChooserActivityWorkProfileTest.java | 24 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 …]
|
/frameworks/base/core/tests/mockingcoretests/src/android/util/ |
D | TimingsTraceLogTest.java | 28 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()
|
/frameworks/base/core/java/android/companion/ |
D | DeviceFilter.java | 50 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()
|
/frameworks/base/services/usb/java/com/android/server/usb/ |
D | UsbProfileGroupSettingsManager.java | 725 if (deviceFilters.get(i).matches(device)) { in packageMatchesLocked() 738 if (accessoryFilters.get(i).matches(accessory)) { in packageMatchesLocked() 788 private ArrayList<ResolveInfo> preferHighPriority(@NonNull ArrayList<ResolveInfo> matches) { in preferHighPriority() argument 794 int numMatches = matches.size(); in preferHighPriority() 796 ResolveInfo match = matches.get(matchNum); in preferHighPriority() 867 ArrayList<ResolveInfo> matches = new ArrayList<>( in removeForwardIntentIfNotNeeded() local 873 matches.add(rawMatch); in removeForwardIntentIfNotNeeded() 876 return matches; in removeForwardIntentIfNotNeeded() 884 ArrayList<ResolveInfo> matches = new ArrayList<>(); in getDeviceMatchesLocked() local 890 matches.add(resolveInfo); in getDeviceMatchesLocked() [all …]
|
/frameworks/base/services/tests/servicestests/src/com/android/server/devicepolicy/ |
D | MockUtils.java | 45 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()
|