Home
last modified time | relevance | path

Searched refs:pattern (Results 1 – 25 of 108) sorted by relevance

12345

/packages/apps/Contacts/src/com/android/contacts/datepicker/
DICU.java9 public static char[] getDateFormatOrder(String pattern) { in getDateFormatOrder() argument
16 for (int i = 0; i < pattern.length(); ++i) { in getDateFormatOrder()
17 char ch = pattern.charAt(i); in getDateFormatOrder()
33 + ch + "' in " + pattern); in getDateFormatOrder()
35 if (i < pattern.length() - 1 && pattern.charAt(i + 1) == '\'') { in getDateFormatOrder()
38 i = pattern.indexOf('\'', i + 1); in getDateFormatOrder()
40 throw new IllegalArgumentException("Bad quoting in " + pattern); in getDateFormatOrder()
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/security/
DInitialLockSetupServiceTest.java133 byte[] pattern = new byte[LockPatternUtils.MIN_LOCK_PATTERN_SIZE - 1]; in testCheckValidLockPattern_tooShort()
134 for (int i = 0; i < pattern.length; i++) { in testCheckValidLockPattern_tooShort()
135 pattern[i] = (byte) i; in testCheckValidLockPattern_tooShort()
137 int result = service.checkValidLock(LockTypes.PATTERN, pattern); in testCheckValidLockPattern_tooShort()
146 byte[] pattern = new byte[LockPatternUtils.MIN_LOCK_PATTERN_SIZE + 1]; in testCheckValidLockPattern_longEnough()
147 for (int i = 0; i < pattern.length; i++) { in testCheckValidLockPattern_longEnough()
148 pattern[i] = (byte) i; in testCheckValidLockPattern_longEnough()
150 int result = service.checkValidLock(LockTypes.PATTERN, pattern); in testCheckValidLockPattern_longEnough()
201 List<LockPatternView.Cell> pattern = new ArrayList<>(); in testSetLockPattern_setsDevicePattern() local
202 pattern.add(LockPatternView.Cell.of(0, 0)); in testSetLockPattern_setsDevicePattern()
[all …]
/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/helpers/
DStringHelper.java51 @Nullable String pattern, @Nullable String input, boolean matchOnNullInput) { in doesInputMatchWildcardPattern()
52 if (matchOnNullInput && (pattern != null && pattern.equals("*"))) { in doesInputMatchWildcardPattern()
55 if (pattern == null || input == null) { in doesInputMatchWildcardPattern()
65 String[] patternSubstrings = pattern.split("\\*", -1); in doesInputMatchWildcardPattern()
/packages/modules/NetworkStack/common/captiveportal/src/android/net/captiveportal/
DCaptivePortalProbeSpec.java85 private static Pattern parsePatternIfNonEmpty(@Nullable String pattern, int pos) in parsePatternIfNonEmpty() argument
87 if (TextUtils.isEmpty(pattern)) { in parsePatternIfNonEmpty()
91 return Pattern.compile(pattern); in parsePatternIfNonEmpty()
94 String.format("Invalid status pattern [%s]: %s", pattern, e), in parsePatternIfNonEmpty()
196 private static boolean safeMatch(@Nullable String value, @Nullable Pattern pattern) { in safeMatch() argument
198 return pattern == null || TextUtils.isEmpty(value) || pattern.matcher(value).matches(); in safeMatch()
/packages/modules/StatsD/statsd/src/utils/
DRegex.cpp35 unique_ptr<Regex> Regex::create(const string& pattern) { in create() argument
37 int status = regcomp(&impl, pattern.c_str(), REG_EXTENDED); in create()
47 ALOGE("regex_error: %s, pattern: %s", errBuf, pattern.c_str()); in create()
51 ALOGE("regex_error: subexpressions are not allowed, pattern: %s", pattern.c_str()); in create()
/packages/apps/Car/Settings/src/com/android/car/settings/security/
DChooseLockPatternFragment.java94 public void onPatternDetected(List<LockPatternView.Cell> pattern) {
98 handlePatternEntered(pattern);
102 handleConfirmPattern(pattern);
111 public void onPatternCellAdded(List<Cell> pattern) {
114 private void handleConfirmPattern(List<LockPatternView.Cell> pattern) {
120 LockscreenCredential.createPattern(pattern)) {
129 private void handlePatternEntered(List<LockPatternView.Cell> pattern) {
130 if (pattern.size() < LockPatternUtils.MIN_LOCK_PATTERN_SIZE) {
133 mChosenPattern = LockscreenCredential.createPattern(pattern);
DConfirmLockPatternFragment.java158 public void onPatternCellAdded(List<LockPatternView.Cell> pattern) {
161 public void onPatternDetected(List<LockPatternView.Cell> pattern) {
175 mPattern = pattern;
176 mCheckLockWorker.checkPattern(mUserId, pattern);
DCheckLockWorker.java86 public final void checkPattern(int userId, List<LockPatternView.Cell> pattern) { in checkPattern() argument
93 try (LockscreenCredential toCheck = LockscreenCredential.createPattern(pattern)) { in checkPattern()
/packages/modules/NeuralNetworks/tools/api/
Dgenerate_api.py104 for pattern in patterns:
105 wildcard_match = re.search("^(.*)\*$", pattern)
106 lowest_version_match = re.search("^(.*)\+$", pattern)
116 "Kind \"" + pattern + "\" at " + self.context() +
119 lowest_pos = self.kinds.index(pattern[:-1])
124 if not self.kinds is None and not pattern in self.kinds:
126 print("WARNING: kind \"" + pattern + "\" at " + self.context() +
128 if pattern == self.kind:
DREADME.md191 `*` to indicate a *wildcard pattern* or `+` to indicate a *lowest version
192 pattern*. Any other pattern is a *simple pattern*. The condition is **on** in
194 * One of the simple pattern tokens equals the "kind"
195 * One of the wildcard pattern tokens less the `*` is a prefix of the "kind"
196 * One of the lowest version pattern tokens less the `+` matches the "kind" or
197 the "kind" matches any token to the right from the lowest version pattern in
213 * Ordering the possible kinds for the *lowest version pattern* (see the section
214 above for the explanation of the pattern).
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastAlertDialog.java392 public void start(View layout, int[] pattern) { in start() argument
393 if (layout == null || pattern == null || pattern.length == 0) { in start()
405 mHighlightColor = pattern[0]; in start()
407 if (pattern.length > 1) { in start()
408 if (pattern[1] < 0 || pattern[1] > PULSATION_MAX_DURATION_MSEC) { in start()
409 Log.wtf(TAG, "Invalid pulsation duration: " + pattern[1]); in start()
411 mDuration = pattern[1]; in start()
416 if (pattern.length > 2) { in start()
417 if (pattern[2] < 0 || pattern[2] > PULSATION_MAX_ON_OFF_DURATION_MSEC) { in start()
418 Log.wtf(TAG, "Invalid pulsation on interval: " + pattern[2]); in start()
[all …]
/packages/modules/SdkExtensions/derive_classpath/
Dderive_classpath.cpp123 const std::string& pattern) { in GlobClasspathFragments() argument
125 const int ret = glob((glob_pattern_prefix + pattern).c_str(), GLOB_MARK, nullptr, &glob_result); in GlobClasspathFragments()
128 LOG(ERROR) << "Failed to glob " << glob_pattern_prefix + pattern; in GlobClasspathFragments()
213 for (const auto& pattern : glob_patterns) { in ParseFragments() local
214 if (!GlobClasspathFragments(&fragments, args.glob_pattern_prefix, pattern)) { in ParseFragments()
/packages/apps/Settings/src/com/android/settings/password/
DConfirmLockPattern.java496 public void onPatternCellAdded(List<Cell> pattern) {
500 public void onPatternDetected(List<LockPatternView.Cell> pattern) {
507 final LockscreenCredential credential = LockscreenCredential.createPattern(pattern);
542 private void startVerifyPattern(final LockscreenCredential pattern,
565 mLockPatternUtils, pattern, localUserId, flags,
568 mLockPatternUtils, pattern, localUserId, flags,
572 private void startCheckPattern(final LockscreenCredential pattern,
574 if (pattern.size() < LockPatternUtils.MIN_PATTERN_REGISTER_FAIL) {
583 pattern,
591 pattern);
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/system/
DResetNetworkItemsPreferenceControllerTest.java141 private void assertContainsString(CharSequence source, String pattern) { in assertContainsString() argument
144 assertThat(sourceString.contains(pattern)).isTrue(); in assertContainsString()
147 private void assertDoesNotContainsString(CharSequence source, String pattern) { in assertDoesNotContainsString() argument
150 assertThat(sourceString.contains(pattern)).isFalse(); in assertDoesNotContainsString()
/packages/modules/Bluetooth/system/gd/hci/
Dmsft.cc169 MsftLeMonitorAdvConditionPattern pattern; in msft_adv_monitor_add() local
179 pattern.ad_type_ = p.ad_type; in msft_adv_monitor_add()
180 pattern.start_of_pattern_ = p.start_byte; in msft_adv_monitor_add()
181 pattern.pattern_ = p.pattern; in msft_adv_monitor_add()
182 patterns.push_back(pattern); in msft_adv_monitor_add()
/packages/modules/Bluetooth/system/gd/rust/topshim/gatt/
Dgatt_ble_scanner_shim.cc91 MsftAdvMonitorPattern ConvertAdvMonitorPattern(const RustMsftAdvMonitorPattern& pattern) { in ConvertAdvMonitorPattern() argument
93 .ad_type = pattern.ad_type, in ConvertAdvMonitorPattern()
94 .start_byte = pattern.start_byte, in ConvertAdvMonitorPattern()
95 .pattern = ConvertRustByteArray(pattern.pattern), in ConvertAdvMonitorPattern()
104 for (const auto& pattern : patterns) { in ConvertAdvMonitorPatterns() local
105 converted.push_back(ConvertAdvMonitorPattern(pattern)); in ConvertAdvMonitorPatterns()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/opp/
DBluetoothOppLauncherActivity.java354 Pattern pattern = in createFileForSharedContent() local
357 + Patterns.WEB_URL.pattern() in createFileForSharedContent()
359 + Patterns.EMAIL_ADDRESS.pattern() in createFileForSharedContent()
361 + Patterns.PHONE.pattern() in createFileForSharedContent()
364 Matcher m = pattern.matcher(text); in createFileForSharedContent()
456 Pattern pattern = PLAIN_TEXT_TO_ESCAPE; in escapeCharacterToDisplay() local
457 Matcher match = pattern.matcher(text); in escapeCharacterToDisplay()
/packages/apps/TV/common/src/com/android/tv/common/util/
DPostalCodeUtils.java107 Pattern pattern = REGION_PATTERN.get(region.toUpperCase()); in matches() local
108 return pattern == null || pattern.matcher(postcode).matches(); in matches()
/packages/apps/DeskClock/src/com/android/deskclock/
DUtils.kt391 var pattern = DateFormat.getBestDateTimePattern(Locale.getDefault(), in get12ModeFormat() variable
394 pattern = pattern.replace("a".toRegex(), "").trim { it <= ' ' } in get12ModeFormat()
398 pattern = pattern.replace(" ".toRegex(), "\u200A") in get12ModeFormat()
400 val amPmPos = pattern.indexOf('a') in get12ModeFormat()
402 return pattern in get12ModeFormat()
405 val sp: Spannable = SpannableString(pattern) in get12ModeFormat()
/packages/apps/Contacts/tests/src/com/android/contacts/model/
DRawContactDeltaListTests.java177 static void assertDiffPattern(RawContactDelta delta, CPOWrapper... pattern) { in assertDiffPattern() argument
181 assertDiffPattern(diff, pattern); in assertDiffPattern()
184 static void assertDiffPattern(RawContactDeltaList set, CPOWrapper... pattern) { in assertDiffPattern() argument
185 assertDiffPattern(set.buildDiffWrapper(), pattern); in assertDiffPattern() local
188 static void assertDiffPattern(ArrayList<CPOWrapper> diff, CPOWrapper... pattern) { in assertDiffPattern() argument
189 assertEquals("Unexpected operations", pattern.length, diff.size()); in assertDiffPattern()
192 for (int i = 0; i < pattern.length; i++) { in assertDiffPattern()
193 final CPOWrapper expected = pattern[i]; in assertDiffPattern()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DResourceUtils.java162 for (final String pattern : patterns) { in fulfillsCondition()
163 final int posEqual = pattern.indexOf('='); in fulfillsCondition()
167 final String key = pattern.substring(0, posEqual); in fulfillsCondition()
172 final String patternRegexpValue = pattern.substring(posEqual + 1); in fulfillsCondition()
/packages/modules/DnsResolver/
DDnsQueryLogTest.cpp45 static const std::regex pattern( in verifyDumpOutput() local
52 EXPECT_TRUE(std::regex_search(str, sm, pattern)); in verifyDumpOutput()
58 EXPECT_FALSE(std::regex_search(str, sm, pattern)); in verifyDumpOutput()
/packages/modules/AdServices/sdksandbox/tests/unittest/src/com/android/server/sdksandbox/helpers/
DStringHelperUnitTest.java83 String pattern, String input, boolean matchOnNullInput, boolean shouldMatch) { in verifyPatternMatch() argument
84 mExpect.that(StringHelper.doesInputMatchWildcardPattern(pattern, input, matchOnNullInput)) in verifyPatternMatch()
/packages/modules/AdServices/adservices/libraries/collectors-helper/adservices/src/com/android/adservices/helpers/
DEpochComputationHelper.java56 Pattern pattern = Pattern.compile(getTestLabel() + ": \\((.*): (\\d+)\\)"); in processInput() local
61 Matcher matcher = pattern.matcher(line); in processInput()
/packages/apps/Contacts/src/com/android/contacts/util/
DDateUtils.java204 final String pattern = ((SimpleDateFormat) SimpleDateFormat.getDateInstance( in getLocalizedDateFormatWithoutYear() local
208 final String yearPattern = pattern.contains( in getLocalizedDateFormatWithoutYear()
212 return new SimpleDateFormat(pattern.replaceAll(yearPattern, "")); in getLocalizedDateFormatWithoutYear()

12345