Home
last modified time | relevance | path

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

123456789

/packages/apps/Launcher3/tests/src/com/android/launcher3/allapps/search/
DDefaultAppSearchAlgorithmTest.java42 assertTrue(DefaultAppSearchAlgorithm.matches(getInfo("white cow"), "cow", MATCHER)); in testMatches()
43 assertTrue(DefaultAppSearchAlgorithm.matches(getInfo("whiteCow"), "cow", MATCHER)); in testMatches()
44 assertTrue(DefaultAppSearchAlgorithm.matches(getInfo("whiteCOW"), "cow", MATCHER)); in testMatches()
45 assertTrue(DefaultAppSearchAlgorithm.matches(getInfo("whitecowCOW"), "cow", MATCHER)); in testMatches()
46 assertTrue(DefaultAppSearchAlgorithm.matches(getInfo("white2cow"), "cow", MATCHER)); in testMatches()
48 assertFalse(DefaultAppSearchAlgorithm.matches(getInfo("whitecow"), "cow", MATCHER)); in testMatches()
49 assertFalse(DefaultAppSearchAlgorithm.matches(getInfo("whitEcow"), "cow", MATCHER)); in testMatches()
51 assertTrue(DefaultAppSearchAlgorithm.matches(getInfo("whitecowCow"), "cow", MATCHER)); in testMatches()
52 assertTrue(DefaultAppSearchAlgorithm.matches(getInfo("whitecow cow"), "cow", MATCHER)); in testMatches()
53 assertFalse(DefaultAppSearchAlgorithm.matches(getInfo("whitecowcow"), "cow", MATCHER)); in testMatches()
[all …]
/packages/apps/Car/libs/car-ui-lib/tests/unit/src/com/android/car/ui/recyclerview/
DCarUiListItemTest.java21 import static androidx.test.espresso.assertion.ViewAssertions.matches;
74 onView(withId(R.id.title)).check(matches(isDisplayed())); in testItemVisibility_withTitle()
75 onView(withId(R.id.body)).check(matches(not(isDisplayed()))); in testItemVisibility_withTitle()
76 onView(withId(R.id.icon_container)).check(matches(not(isDisplayed()))); in testItemVisibility_withTitle()
77 onView(withId(R.id.action_container)).check(matches(not(isDisplayed()))); in testItemVisibility_withTitle()
91 onView(withId(R.id.body)).check(matches(isDisplayed())); in testItemVisibility_withBody()
92 onView(withId(R.id.title)).check(matches(not(isDisplayed()))); in testItemVisibility_withBody()
93 onView(withId(R.id.icon_container)).check(matches(not(isDisplayed()))); in testItemVisibility_withBody()
94 onView(withId(R.id.action_container)).check(matches(not(isDisplayed()))); in testItemVisibility_withBody()
110 onView(withId(R.id.title)).check(matches(isDisplayed())); in testItemVisibility_withTitle_withBodyAndIcon()
[all …]
DCarUiRecyclerViewTest.java27 import static androidx.test.espresso.assertion.ViewAssertions.matches;
122 onView(withId(R.id.car_ui_scroll_bar)).check(matches(isDisplayed())); in testIsScrollbarPresent_scrollbarEnabled()
221 onView(withId(R.id.list)).check(matches(isDisplayed())); in testOnHeightChanged_shouldAddTheValueToInitialTopValue()
231 onView(withId(R.id.list)).check(matches(isDisplayed())); in testOnHeightChanged_shouldAddTheValueToInitialTopValue()
245 onView(withId(R.id.list)).check(matches(not(isDisplayed()))); in testVisibility_goneAtInflationWithChangeToVisible()
255 onView(withText(adapter.getItemText(0))).check(matches(isDisplayed())); in testVisibility_goneAtInflationWithChangeToVisible()
256 onView(withText(adapter.getItemText(1))).check(matches(isDisplayed())); in testVisibility_goneAtInflationWithChangeToVisible()
257 onView(withText(adapter.getItemText(2))).check(matches(isDisplayed())); in testVisibility_goneAtInflationWithChangeToVisible()
266 onView(withId(R.id.list)).check(matches(not(isDisplayed()))); in testVisibility_invisibleAtInflationWithChangeToVisible()
276 onView(withText(adapter.getItemText(0))).check(matches(isDisplayed())); in testVisibility_invisibleAtInflationWithChangeToVisible()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/notification/
DZenModeSettingsIntegrationTest.java4 import static androidx.test.espresso.assertion.ViewAssertions.matches;
40 onView(withText("Calls")).check(matches(isDisplayed())); in testZenModeSettingsPreferences()
41 onView(withText("SMS, MMS, and messaging apps")).check(matches(isDisplayed())); in testZenModeSettingsPreferences()
42 onView(withText("Restrict notifications")).check(matches(isDisplayed())); in testZenModeSettingsPreferences()
43 onView(withText("Duration")).check(matches(isDisplayed())); in testZenModeSettingsPreferences()
44 onView(withText("Schedules")).check(matches(isDisplayed())); in testZenModeSettingsPreferences()
50 onView(withText("Calls")).check(matches(isDisplayed())); in testZenModeBehaviorPreferences()
51 onView(withText("SMS, MMS, and messaging apps")).check(matches(isDisplayed())); in testZenModeBehaviorPreferences()
52 onView(withText("Restrict notifications")).check(matches(isDisplayed())); in testZenModeBehaviorPreferences()
53 onView(withText("Duration")).check(matches(isDisplayed())); in testZenModeBehaviorPreferences()
[all …]
DAppNotificationSettingsTest.java24 import static androidx.test.espresso.assertion.ViewAssertions.matches;
115 matches(isDisplayed())); in launchNotificationSetting_showGroupsWithMultipleChannels()
117 matches(isDisplayed())); in launchNotificationSetting_showGroupsWithMultipleChannels()
119 matches(isDisplayed())); in launchNotificationSetting_showGroupsWithMultipleChannels()
129 .check(matches(isDisplayed())); in launchNotificationSetting_showUngroupedChannels()
140 .check(matches(isDisplayed())); in launchNotificationSetting_showGroupsWithOneChannel()
142 .check(matches(isDisplayed())); in launchNotificationSetting_showGroupsWithOneChannel()
/packages/apps/WallpaperPicker2/tests/src/com/android/wallpaper/picker/individual/
DIndividualPickerActivityTest.java21 import static androidx.test.espresso.assertion.ViewAssertions.matches;
219 onView(withText(R.string.daily_refresh_tile_title)).check(matches(isDisplayed())); in testRotationEnabled_StaticDailyRotationTile()
220 onView(withText(R.string.daily_refresh_tile_subtitle)).check(matches(isDisplayed())); in testRotationEnabled_StaticDailyRotationTile()
241 onView(withText(R.string.daily_refresh_tile_title)).check(matches(isDisplayed())); in testRotationEnabled_RotationInitializedHomeAndLock()
242 onView(withText(R.string.home_and_lock_short_label)).check(matches(isDisplayed())); in testRotationEnabled_RotationInitializedHomeAndLock()
258 onView(withText(R.string.daily_refresh_tile_title)).check(matches(isDisplayed())); in testRotationEnabled_RotationInitializedHomeScreenOnly()
259 onView(withText(R.string.home_screen_message)).check(matches(isDisplayed())); in testRotationEnabled_RotationInitializedHomeScreenOnly()
275 onView(withText(R.string.daily_refresh_tile_title)).check(matches(isDisplayed())); in testActivityRestarted_RotationStateChanges_StartRotationTileUpdates()
276 onView(withText(R.string.home_screen_message)).check(matches(isDisplayed())); in testActivityRestarted_RotationStateChanges_StartRotationTileUpdates()
291 onView(withText(R.string.daily_refresh_tile_title)).check(matches(isDisplayed())); in testActivityRestarted_RotationStateChanges_StartRotationTileUpdates()
[all …]
/packages/services/Car/surround_view/service-impl/
DObjReader.cpp220 int matches = fscanf(file, "%d/", &vertexId[0]); in ReadObjFromFile() local
222 if (matches != 1) { in ReadObjFromFile()
230 matches = fscanf(file, "%d/%d %d/%d/%d", &textureId[0], &normalId[0], &vertexId[1], in ReadObjFromFile()
235 if (matches != 5) { in ReadObjFromFile()
236 matches = fscanf(file, "/%d %d//%d", &normalId[0], &vertexId[1], &normalId[1]); in ReadObjFromFile()
239 if (matches != 3) { in ReadObjFromFile()
260 matches = fscanf(file, " %d/%d/%d", &vertexId[2], &textureId[2], &normalId[2]); in ReadObjFromFile()
262 if (matches != 3 && matches != 0) { in ReadObjFromFile()
263 LOG(WARNING) << "Face matches, expected 3, read: " << matches; in ReadObjFromFile()
268 matches = fscanf(file, " %d//%d", &vertexId[2], &normalId[2]); in ReadObjFromFile()
[all …]
/packages/apps/Car/libs/car-ui-lib/tests/unit/src/com/android/car/ui/toolbar/
DToolbarTest.java21 import static androidx.test.espresso.assertion.ViewAssertions.matches;
70 onView(withText("Test title")).check(matches(isDisplayed())); in test_setTitle_displaysTitle()
77 onView(withText("Test subtitle")).check(matches(isDisplayed())); in test_setSubtitle_displaysSubtitle()
87 onView(withHint("Test search hint")).check(matches(isDisplayed())); in test_setSearchHint_isDisplayed()
112 onView(withDrawable(R.drawable.ic_launcher)).check(matches(isDisplayed())); in test_setLogo_displaysLogo()
205 onView(withId(R.id.car_ui_toolbar_menu_items_container)).check(matches(hasChildCount(2))); in menuItems_null_shouldRemoveExistingMenuItems()
209 onView(withId(R.id.car_ui_toolbar_menu_items_container)).check(matches(hasChildCount(0))); in menuItems_null_shouldRemoveExistingMenuItems()
220 onView(withText("Button!")).check(matches(isDisplayed())); in menuItems_setVisibility_shouldHide()
224 onView(withText("Button!")).check(matches(not(isDisplayed()))); in menuItems_setVisibility_shouldHide()
243 onView(withText("Button!")).check(matches(not(isDisplayed()))); in menuItems_searchScreen_shouldHideMenuItems()
[all …]
/packages/providers/MediaProvider/errorprone/src/com/android/providers/media/
DMimeTypeChecker.java56 if (STRING_EQUALS.matches(tree, state) || STRING_STARTS_WITH.matches(tree, state) in matchMethodInvocation()
57 || OBJECTS_EQUALS.matches(tree, state)) { in matchMethodInvocation()
58 if (MIME_WITHOUT_CASE_FOLDING.matches(tree.getMethodSelect(), state) in matchMethodInvocation()
63 if (STRING_REGION_MATCHES.matches(tree, state)) { in matchMethodInvocation()
64 if (!Matchers.booleanLiteral(true).matches(tree.getArguments().get(0), state)) { in matchMethodInvocation()
73 if (MIME_WITHOUT_CASE_FOLDING.matches(tree.getExpression(), state)) { in matchSwitch()
85 public boolean matches(ExpressionTree tree, VisitorState state) { in matches() method in MimeTypeChecker.MimeWithoutCaseFoldingMatcher
94 return matches(tree, null); in test()
/packages/apps/Launcher3/src/com/android/launcher3/util/
DItemInfoMatcher.java36 boolean matches(ItemInfo info, ComponentName cn); in matches() method
47 if (cn != null && matches(info, cn)) { in filterItemInfos()
54 if (cn != null && matches(s, cn)) { in filterItemInfos()
61 if (cn != null && matches(info, cn)) { in filterItemInfos()
73 return (info, cn) -> matches(info, cn) || matcher.matches(info, cn); in or()
80 return (info, cn) -> matches(info, cn) && matcher.matches(info, cn); in and()
88 return (info, cn) -> !matcher.matches(info, cn); in not()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/
DBluetoothDevicesGroupPreferenceControllerTest.java123 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMatch_addsToGroup()
137 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMatch_addsToPreferenceMap()
151 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMismatch_removesFromGroup()
158 when(mFilter.matches(mDevice1)).thenReturn(false); in refreshUi_filterMismatch_removesFromGroup()
168 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_filterMismatch_removesFromPreferenceMap()
175 when(mFilter.matches(mDevice1)).thenReturn(false); in refreshUi_filterMismatch_removesFromPreferenceMap()
192 when(mFilter.matches(mDevice1)).thenReturn(true); in refreshUi_devices_showsGroup()
203 when(mFilter.matches(mDevice1)).thenReturn(true); in onBluetoothStateChanged_turningOff_clearsPreferences()
217 when(mFilter.matches(mDevice1)).thenReturn(true); in onDeviceAdded_refreshesUi()
231 when(mFilter.matches(any(BluetoothDevice.class))).thenReturn(true); in onDeviceDeleted_refreshesUi()
[all …]
/packages/apps/TvSettings/Settings/tests/robotests/src/com/android/tv/settings/device/storage/
DSettingsStorageServiceTest.java88 public boolean matches(Intent argument) { in testFormatAsPublic_success_fromPrivate()
89 return super.matches(argument) in testFormatAsPublic_success_fromPrivate()
118 public boolean matches(Intent argument) { in testFormatAsPublic_success_fromNonPrivate()
119 return super.matches(argument) in testFormatAsPublic_success_fromNonPrivate()
144 public boolean matches(Intent argument) { in testFormatAsPublic_failure()
145 return super.matches(argument) in testFormatAsPublic_failure()
176 public boolean matches(Intent argument) { in testFormatAsPrivate_success()
177 return super.matches(argument) in testFormatAsPrivate_success()
203 public boolean matches(Intent argument) { in testFormatAsPrivate_failure()
204 return super.matches(argument) in testFormatAsPrivate_failure()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/provisioning/
DProvisioningActivityTest.java27 import static androidx.test.espresso.assertion.ViewAssertions.matches;
328 onView(withText(R.string.profile_owner_cancel_message)).check(matches(isDisplayed())); in testCancelProfileOwner_CompProvisioningWithoutSkipConsent()
340 onView(withText(R.string.stop_setup_reset_device_question)).check(matches(isDisplayed())); in testCancelDeviceOwner()
342 .check(matches(isDisplayed())); in testCancelDeviceOwner()
346 .check(matches(withText(R.string.device_owner_cancel_cancel))) in testCancelDeviceOwner()
356 onView(withText(R.string.stop_setup_reset_device_question)).check(matches(isDisplayed())); in testCancelDeviceOwner()
360 .check(matches(withText(R.string.reset))) in testCancelDeviceOwner()
429 .check(matches(withText(R.string.work_profile_provisioning_progress_label))); in testInitializeUi_profileOwner()
432 onView(withId(R.id.animation)).check(matches(isDisplayed())); in testInitializeUi_profileOwner()
442 matches(withText(R.string.fully_managed_device_provisioning_progress_label))); in testInitializeUi_deviceOwner()
[all …]
/packages/apps/Settings/tests/unit/src/com/android/settings/wifi/
DWifiSettingsUiTest.java20 import static androidx.test.espresso.assertion.ViewAssertions.matches;
193 matches(isDisplayed())); in shouldShowWifiPreferences()
215 withEffectiveVisibility(VISIBLE))).check(matches(isDisplayed())); in savedNetworksExist_shouldShowSavedNetworksButton()
226 matches(isDisplayed())); in onDisableWifi_seeOffMessage()
249 matches(isDisplayed())); in onConnected_shouldSeeConnectedMessage()
275 onView(withText(TEST_SSID)).check(matches(isDisplayed())); in changingSecurityStateOnApShouldNotCauseMultipleListItems()
278 onView(withText(TEST_SSID)).check(matches(isDisplayed())); in changingSecurityStateOnApShouldNotCauseMultipleListItems()
281 onView(withText(TEST_SSID)).check(matches(isDisplayed())); in changingSecurityStateOnApShouldNotCauseMultipleListItems()
328 onView(withText(resourceId(STRING, WIFI_PASSWORD))).check(matches(isDisplayed())); in wrongPasswordSavedNetwork()
329 onView(withText(resourceId(STRING, WIFI_SHOW_PASSWORD))).check(matches(isDisplayed())); in wrongPasswordSavedNetwork()
[all …]
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/terms/
DTermsActivityTest.java22 import static androidx.test.espresso.assertion.ViewAssertions.matches;
115 onView(withText(HEADER_0_TOP)).check(matches(isDisplayed())); in expanderTest()
117 onView(withText(d.mHeader)).check(matches(isDisplayed())); in expanderTest()
125 onView(withText(CONTENT_1)).check(matches(isDisplayed())); in expanderTest()
130 onView(withText(CONTENT_3)).check(matches(isDisplayed())); in expanderTest()
139 onView(withText(CONTENT_1)).check(matches(isDisplayed())); in expanderTest()
143 onView(withId(R.id.disclaimer_content)).check(matches(withText("item1\nitem2\n"))); in expanderTest()
152 matches(not(isDisplayed())); in isNotDisplayed()
/packages/apps/Dialer/java/com/android/dialer/searchfragment/
DREADME.md53 * Initial match (957 matches [W]illiam [J]ohn [S]mith)
54 * Number + name match (1800946 matches [1800-Win]-A-Prize)
56 * Simple number match (510333 matches [510-333]-7596)
57 * Country-code agnostic matching for E164 normalized numbers (9177 matches
59 * Country-code agnostic matching (510333 matches 1-[510-333]-7596)
60 * Area-code agnostic matching (333 matches 510-[333]-7596)
62 * Simple name match (564 matches [Joh]n)
/packages/apps/Contacts/src/com/android/contacts/quickcontact/
DResolveCache.java135 final List<ResolveInfo> matches = mPackageManager.queryIntentActivities(intent, in getEntry() local
140 final int size = matches.size(); in getEntry()
142 bestResolve = matches.get(0); in getEntry()
144 bestResolve = getBestResolve(intent, matches); in getEntry()
168 protected ResolveInfo getBestResolve(Intent intent, List<ResolveInfo> matches) { in getBestResolve() argument
182 for (ResolveInfo info : matches) { in getBestResolve()
193 return firstSystem != null ? firstSystem : matches.get(0); in getBestResolve()
/packages/apps/ThemePicker/tests/src/com/android/customization/picker/
DCustomizationPickerActivityTest.java8 import static androidx.test.espresso.assertion.ViewAssertions.matches;
83 onView(withId(R.id.nav_theme)).check(matches(isCompletelyDisplayed())); in launchActivity_themeManagerIsAvailable_NavBarShowsStyleAndWallpaperItem()
84 onView(withId(R.id.nav_wallpaper)).check(matches(isCompletelyDisplayed())); in launchActivity_themeManagerIsAvailable_NavBarShowsStyleAndWallpaperItem()
95 onView(withId(R.id.nav_theme)).check(matches(isSelected())); in launchActivity_navigateToTheStyleTabByDefault()
118 onView(withId(R.id.nav_theme)).check(matches(isSelected())); in clickStyleButton_showsThemeFragment()
129 onView(withId(R.id.nav_wallpaper)).check(matches(isSelected())); in clickWallpaperButton_showsCategoryFragment()
139 onView(withId(R.id.nav_wallpaper)).check(matches(isSelected())); in launchActivity_withExtraWallpaperFocus_navigateToTheWallpaperTab()
/packages/providers/ContactsProvider/src/com/android/providers/contacts/aggregation/util/
DRawContactMatcher.java310 final List<MatchScore> matches = new ArrayList<>(); in pickBestMatches() local
318 matches.add(score); in pickBestMatches()
325 matches.add(score); in pickBestMatches()
328 return matches; in pickBestMatches()
336 List<MatchScore> matches = mScoreList.subList(0, mScoreCount); in pickBestMatches() local
337 Collections.sort(matches); in pickBestMatches()
340 MatchScore matchScore = matches.get(i); in pickBestMatches()
348 return matches.subList(0, count); in pickBestMatches()
/packages/apps/Launcher3/tests/src/com/android/launcher3/util/rule/
DFailureInvestigator.java31 private static boolean matches(String regex, CharSequence string) { in matches() method in FailureInvestigator
90 if (matches("java\\.lang\\.AssertionError\\: http\\:\\/\\/go\\/tapl \\: want to get " in getBugForFailure()
109 if (matches("android\\:\\:uirenderer\\:\\:renderthread\\:\\:EglManager\\:\\:swapBuffers", in getBugForFailure()
115 if (matches(exceptionMatch.exceptionPattern, exception)) { in getBugForFailure()
117 if (matches(logcatMatch.logcatPattern, logSinceBoot)) { in getBugForFailure()
/packages/apps/TV/tuner/tests/robotests/javatests/com/android/tv/tuner/util/
DPostalCodeUtilsTest.java52 assertThat(PostalCodeUtils.matches(postcode, Locale.US.getCountry())).isTrue(); in validPostcodesUs()
59 assertThat(PostalCodeUtils.matches(postcode, Locale.UK.getCountry())).isTrue(); in validPostcodesGb()
66 assertThat(PostalCodeUtils.matches(postcode, Locale.US.getCountry())).isFalse(); in invalidPostcodesUs()
73 assertThat(PostalCodeUtils.matches(postcode, Locale.UK.getCountry())).isFalse(); in invalidPostcodesGb()
81 assertThat(PostalCodeUtils.matches(postcode, Locale.ROOT.getCountry())).isTrue(); in unsupportedRegion()
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DBluetoothUnbondedDevicesPreferenceController.java85 public boolean matches(BluetoothDevice device) { in matches() method in BluetoothUnbondedDevicesPreferenceController.UnbondedDeviceTypeFilter
89 boolean matches = device.getBondState() != BluetoothDevice.BOND_BONDED; in matches()
90 if (matches && unbondedMajorClassFilter.length > 0) { in matches()
91 matches = device.getBluetoothClass() != null in matches()
96 return matches; in matches()
/packages/apps/Contacts/tests/src/com/android/contacts/tests/
DContactsMatchers.java73 public boolean matches(Object o) { in hasCount()
89 public boolean matches(Object o) {
107 public boolean matches(Object o) {
113 if (rowMatcher.matches(cursor)) return true;
131 public boolean matches(Object o) {
/packages/apps/Car/Calendar/tests/ui/src/com/android/car/calendar/
DCarCalendarUiTest.java22 import static androidx.test.espresso.assertion.ViewAssertions.matches;
160 onView(withText(R.string.app_name)).check(matches(isDisplayed())); in calendar_titleShows()
174 onView(withText(EVENT_TITLE)).check(matches(isDisplayed())); in event_displayed()
195 onView(withText(EVENT_TITLE)).check(matches(isDisplayed())); in singleAllDayEvent_notCollapsed()
212 onView(withId(R.id.expand_collapse_icon)).check(matches(isDisplayed())); in multipleAllDayEvents_collapsed()
213 onView(withText(EVENT_TITLE)).check(matches(not(isDisplayed()))); in multipleAllDayEvents_collapsed()
232 onView(withText(EVENT_TITLE)).check(matches(isDisplayed())); in multipleAllDayEvents_expands()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/util/bluetooth/
DBluetoothNameUtils.java47 if (!matcher.matches()) { in getSetupType()
71 if (!matcher.matches()) { in getColorConfiguration()
80 if (!cm.matches()) { in getColorConfiguration()
99 return matcher.matches(); in isValidName()

123456789