Home
last modified time | relevance | path

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

12345

/cts/tests/framework/base/windowmanager/jetpack/src/android/server/wm/jetpack/utils/
DVersion.java69 Matcher matcher = Pattern.compile(VERSION_PATTERN_STRING).matcher(versionString); in parse() local
70 if (!matcher.matches()) { in parse()
74 int major = Integer.parseInt(matcher.group(1)); in parse()
75 int minor = Integer.parseInt(matcher.group(2)); in parse()
76 int patch = Integer.parseInt(matcher.group(3)); in parse()
77 String description = matcher.group(4) != null ? matcher.group(4) : ""; in parse()
83 Matcher matcher = Pattern.compile(VERSION_PATTERN_STRING).matcher(versionString); in isValidVersion() local
84 return matcher.matches(); in isValidVersion()
/cts/hostsidetests/appcompat/host/lib/src/android/compat/cts/
DChange.java75 Matcher matcher = CHANGE_REGEX.matcher(line); in fromString() local
76 if (!matcher.matches()) { in fromString()
81 changeId = Long.parseLong(matcher.group("changeId")); in fromString()
85 changeName = matcher.group("changeName"); in fromString()
86 String sinceSdkAsString = matcher.group("sinceSdk"); in fromString()
94 if (matcher.group("disabled") != null) { in fromString()
97 if (matcher.group("loggingOnly") != null) { in fromString()
100 if (matcher.group("overrides") != null) { in fromString()
102 overridesStr = matcher.group("overrides"); in fromString()
104 if (matcher.group("rawOverrides") != null) { in fromString()
[all …]
/cts/hostsidetests/securitybulletin/src/android/security/cts/
DRegexUtils.java52 Matcher matcher = null; in assertFind() local
56 matcher = Pattern.compile( in assertFind()
57 pattern, Pattern.DOTALL|Pattern.MULTILINE).matcher(timedInput); in assertFind()
59 matcher = Pattern.compile(pattern).matcher(timedInput); in assertFind()
64 boolean found = matcher.find(); in assertFind()
73 String substring = input.substring(matcher.start(), matcher.end()); in assertFind()
74 String context = getInputContext(input, matcher.start(), matcher.end(), in assertFind()
DHostsideMainlineModuleDetector.java51 Matcher matcher = Pattern.compile("Play managed modules are: <(.*?)>").matcher(logcat); in getPlayManagedModules() local
52 if (matcher.find()) { in getPlayManagedModules()
53 playManagedModules = ImmutableSet.copyOf(matcher.group(1).split(",")); in getPlayManagedModules()
/cts/tools/release-parser/src/com/android/cts/releaseparser/
DAndroidManifestParser.java94 Matcher matcher; in parseElement() local
117 Matcher matcher; in parseElementItem() local
146 Matcher matcher; in parseItem() local
149 matcher = pattern_item.matcher(line); in parseItem()
150 if (matcher.find()) { in parseItem()
152 key = matcher.group(1); in parseItem()
153 value = matcher.group(2).replace("\"", ""); in parseItem()
241 Matcher matcher; in getElementName() local
244 matcher = pattern_element.matcher(line); in getElementName()
245 if (matcher.find()) { in getElementName()
[all …]
/cts/hostsidetests/car/src/android/car/cts/
DCarHostJUnit4TestCase.java209 Matcher matcher = regex.matcher(output); in executeAndParseCommand() local
210 if (!matcher.find()) { in executeAndParseCommand()
214 return resultParser.apply(matcher); in executeAndParseCommand()
223 return resultParser.apply(regex.matcher(output)); in executeAndParseCommand()
231 ArrayList<UserInfo> allUsers = executeAndParseCommand(USER_PATTERN, (matcher) -> { in onAllUsers()
233 while (matcher.find()) { in onAllUsers()
234 users.add(new UserInfo(matcher)); in onAllUsers()
293 matcher -> Integer.parseInt(matcher.group(1)), in createUser()
389 Matcher matcher = pattern.matcher(line); in removeUsers() local
390 if (!matcher.find()) continue; in removeUsers()
[all …]
/cts/hostsidetests/monkey/src/com/android/cts/monkey/
DPackageTest.java43 assertTrue("Monkey not found in: " + error, ALLOW_MONKEY.matcher(out).find()); in testSinglePackage()
44 assertFalse("Chimp found in: " + error, ALLOW_CHIMP.matcher(out).find()); in testSinglePackage()
57 assertFalse("Monkey found in: " + error, ALLOW_MONKEY.matcher(out).find()); in testSinglePackage()
58 assertTrue("Chimp not found in: " + error, ALLOW_CHIMP.matcher(out).find()); in testSinglePackage()
73 assertTrue("Monkey not found in: " + error, ALLOW_MONKEY.matcher(out).find()); in testMultiplePackages()
74 assertTrue("Chimp not found in: " + error, ALLOW_CHIMP.matcher(out).find()); in testMultiplePackages()
/cts/hostsidetests/edi/src/android/edi/cts/
DPropertyDeviceInfo.java65 Matcher matcher = pattern.matcher(line); in parseProps() local
66 if (matcher.matches()) { in parseProps()
67 String name = matcher.group(1); in parseProps()
68 String value = matcher.group(2); in parseProps()
/cts/tests/framework/base/windowmanager/src/android/server/wm/
DMultiDisplayTestBase.java245 Matcher matcher = PHYSICAL_SIZE.matcher(lines); in ReportedDisplayMetrics() local
246 assertTrue("Physical display size must be reported", matcher.find()); in ReportedDisplayMetrics()
247 log(matcher.group()); in ReportedDisplayMetrics()
249 Integer.parseInt(matcher.group(1)), Integer.parseInt(matcher.group(2))); in ReportedDisplayMetrics()
251 matcher = PHYSICAL_DENSITY.matcher(lines); in ReportedDisplayMetrics()
252 assertTrue("Physical display density must be reported", matcher.find()); in ReportedDisplayMetrics()
253 log(matcher.group()); in ReportedDisplayMetrics()
254 physicalDensity = Integer.parseInt(matcher.group(1)); in ReportedDisplayMetrics()
256 matcher = OVERRIDE_SIZE.matcher(lines); in ReportedDisplayMetrics()
257 if (matcher.find()) { in ReportedDisplayMetrics()
[all …]
/cts/hostsidetests/os/src/android/os/cts/
DPowerManagerTests.java77 assertTrue(CACHED_PATTERN.matcher(processes).find()); in testCachedProcessReleasesWakeLock()
81 WAKE_LOCK_DISABLED_PATTERN.matcher(wakelocks).find()); in testCachedProcessReleasesWakeLock()
82 assertTrue("Wake lock not acquired", WAKE_LOCK_ACQUIRED_PATTERN.matcher(wakelocks).find()); in testCachedProcessReleasesWakeLock()
90 WAKE_LOCK_ACQUIRED_PATTERN.matcher(wakelocks).find()); in testCachedProcessReleasesWakeLock()
91 assertTrue("Wake lock not disabled", WAKE_LOCK_DISABLED_PATTERN.matcher(wakelocks).find()); in testCachedProcessReleasesWakeLock()
/cts/libs/vogar-expect/src/vogar/expect/util/
DStrings.java107 Matcher matcher = XML_INVALID_CHARS.matcher(text); in xmlSanitize() local
108 while (matcher.find()) { in xmlSanitize()
109 matcher.appendReplacement(result, ""); in xmlSanitize()
110 result.append(escapeCodePoint(matcher.group())); in xmlSanitize()
112 matcher.appendTail(result); in xmlSanitize()
/cts/hostsidetests/usb/src/com/android/cts/usb/
DTestUsbTest.java153 Matcher matcher = pattern.matcher(lsusbOutput); in testUsbSerialReadOnDeviceMatches() local
155 while (matcher.find()) { in testUsbSerialReadOnDeviceMatches()
156 String currentSerial = matcher.group(1).toLowerCase(); in testUsbSerialReadOnDeviceMatches()
171 matcher = pattern.matcher(logs); in testUsbSerialReadOnDeviceMatches()
173 while (matcher.find()) { in testUsbSerialReadOnDeviceMatches()
174 String currentSerial = matcher.group(1).toLowerCase(); in testUsbSerialReadOnDeviceMatches()
/cts/hostsidetests/backup/src/android/cts/backup/
DBackupPreparer.java187 Matcher matcher = pattern.matcher(output.trim()); in enableBackup() local
188 if (matcher.find()) { in enableBackup()
189 previouslyEnabled = "enabled".equals(matcher.group(1)); in enableBackup()
202 Matcher matcher = pattern.matcher(output); in setBackupTransport() local
203 if (matcher.find()) { in setBackupTransport()
204 return matcher.group(1); in setBackupTransport()
DAutoRestoreHostSideTest.java126 Matcher matcher = pattern.matcher(output.trim()); in isAutoRestoreEnabled() local
128 assertThat(matcher.find()).isTrue(); in isAutoRestoreEnabled()
130 return "enabled".equals(matcher.group(1)); in isAutoRestoreEnabled()
/cts/tests/tests/os/src/android/os/cts/
DBuildTest.java239 assertTrue(BOARD_PATTERN.matcher(Build.BOARD).matches()); in testBuildConstants()
241 assertTrue(BRAND_PATTERN.matcher(Build.BRAND).matches()); in testBuildConstants()
243 assertTrue(DEVICE_PATTERN.matcher(Build.DEVICE).matches()); in testBuildConstants()
247 assertTrue(HARDWARE_PATTERN.matcher(Build.HARDWARE).matches()); in testBuildConstants()
251 assertTrue(ID_PATTERN.matcher(Build.ID).matches()); in testBuildConstants()
258 assertTrue(SOC_MANUFACTURER_PATTERN.matcher(Build.SOC_MANUFACTURER).matches()); in testBuildConstants()
264 assertTrue(SOC_MODEL_PATTERN.matcher(Build.SOC_MODEL).matches()); in testBuildConstants()
269 assertTrue(PRODUCT_PATTERN.matcher(Build.PRODUCT).matches()); in testBuildConstants()
271 assertTrue(SERIAL_NUMBER_PATTERN.matcher(Build.SERIAL).matches()); in testBuildConstants()
273 assertTrue(SKU_PATTERN.matcher(Build.SKU).matches()); in testBuildConstants()
[all …]
/cts/hostsidetests/statsdatom/src/android/cts/statsdatom/telephony/
DTelephonyStatsTests.java353 Matcher matcher = classNamePattern.matcher(responseLines.poll()); in getTelephonyDumpEntries() local
354 if (matcher.matches()) { in getTelephonyDumpEntries()
355 final int classIndentLevel = matcher.group(1).length(); in getTelephonyDumpEntries()
359 matcher = indentPattern.matcher(responseLines.peek()); in getTelephonyDumpEntries()
360 if (responseLines.peek().length() == 0 || !matcher.matches()) { in getTelephonyDumpEntries()
365 final int indentLevel = matcher.group(1).length(); in getTelephonyDumpEntries()
370 matcher = keyValuePattern.matcher(responseLines.poll()); in getTelephonyDumpEntries()
371 if (indentLevel == classIndentLevel + 1 && matcher.matches()) { in getTelephonyDumpEntries()
372 instanceEntries.put(matcher.group(2), matcher.group(3)); in getTelephonyDumpEntries()
/cts/hostsidetests/multiuser/src/android/host/multiuser/
DBaseMultiUserTest.java199 Matcher matcher = pattern.matcher(commandOutput); in waitForUserRemove() local
200 while(matcher.find()) { in waitForUserRemove()
201 if (Integer.parseInt(matcher.group(2)) == userId in waitForUserRemove()
202 && matcher.group(6).contains("removing")) { in waitForUserRemove()
262 Matcher matcher = PACKAGE_NAME_PATTERN.matcher(line); in errorLogsToPackageNames() local
263 if (matcher.find()) { in errorLogsToPackageNames()
264 result.add(matcher.group(1)); in errorLogsToPackageNames()
/cts/hostsidetests/dumpsys/src/android/dumpsys/cts/
DBaseDumpsysTest.java211 final Matcher matcher = Pattern.compile(pattern).matcher(output); in execCommandAndFind() local
212 assertTrue("Pattern '" + pattern + "' didn't match. Output=\n" + output, matcher.find()); in execCommandAndFind()
213 return matcher; in execCommandAndFind()
221 final Matcher matcher = execCommandAndFind(command, pattern); in execCommandAndGetFirstGroup() local
222 assertTrue("No group found for pattern '" + pattern + "'", matcher.groupCount() > 0); in execCommandAndGetFirstGroup()
223 return matcher.group(1); in execCommandAndGetFirstGroup()
DStoragedDumpsysTest.java43 Matcher matcher = pattern.matcher(log); in getCgroupFromLog() local
44 if (matcher.find()) { in getCgroupFromLog()
45 return matcher.group(1); in getCgroupFromLog()
/cts/tools/cts-media-preparer-app/src/android/mediastress/cts/preconditions/app/
DMediaPreparerAppTest.java71 Matcher matcher = pattern.matcher(resolution); in Resolution() local
72 matcher.find(); in Resolution()
73 this.width = Integer.parseInt(matcher.group(WIDTH_INDEX)); in Resolution()
74 this.height = Integer.parseInt(matcher.group(HEIGHT_INDEX)); in Resolution()
/cts/hostsidetests/appcompat/compatchanges/src/com/android/cts/appcompat/
DCompatChangesSelinuxTest.java140 Matcher matcher = PS_ENTRY_PATTERN.matcher(line); in getPackageToDomain() local
141 if (!matcher.matches()) in getPackageToDomain()
143 String label = matcher.group("label"); in getPackageToDomain()
145 String packageName = matcher.group("name"); in getPackageToDomain()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DPropertyUtil.java174 Matcher matcher = pattern.matcher(line); in getClientIds() local
175 if (matcher.find()) { in getClientIds()
176 String name = matcher.group(1); in getClientIds()
177 String value = matcher.group(2); in getClientIds()
/cts/hostsidetests/packagemanager/stats/src/com/android/cts/packagemanager/stats/host/
DPackageManagerStatsTestsBase.java83 final Matcher matcher = pattern.matcher(uidLine); in getAppUid() local
84 if (matcher.find()) { in getAppUid()
85 return Integer.parseInt(matcher.group(1)); in getAppUid()
/cts/hostsidetests/incident/src/com/android/server/cts/
DProtoDumpTestCase.java186 final Matcher matcher = Pattern.compile(pattern, patternFlags).matcher(output); in execCommandAndFind() local
187 assertTrue("Pattern '" + pattern + "' didn't match. Output=\n" + output, matcher.find()); in execCommandAndFind()
188 return matcher; in execCommandAndFind()
204 final Matcher matcher = execCommandAndFind(command, pattern); in execCommandAndGetFirstGroup() local
205 assertTrue("No group found for pattern '" + pattern + "'", matcher.groupCount() > 0); in execCommandAndGetFirstGroup()
206 return matcher.group(1); in execCommandAndGetFirstGroup()
DPackageIncidentTest.java55 final Matcher matcher = in testPackageServiceDump() local
60 final int uid = Integer.parseInt(matcher.group(1)); in testPackageServiceDump()
61 final int versionCode = Integer.parseInt(matcher.group(2)); in testPackageServiceDump()
62 final String versionString = matcher.group(3).trim(); in testPackageServiceDump()

12345