Home
last modified time | relevance | path

Searched refs:tokens (Results 1 – 25 of 41) sorted by relevance

12

/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DNameSplitter.java321 public int tokenize(String[] tokens, String fullName) { in tokenize() argument
335 tokens[count++] = tokenizer.mTokens[i]; in tokenize()
395 NameTokenizer tokens = new NameTokenizer(fullName); in splitWesternName() local
396 parsePrefix(name, tokens); in splitWesternName()
400 if (tokens.mEndPointer > 2) { in splitWesternName()
401 parseSuffix(name, tokens); in splitWesternName()
404 if (name.prefix == null && tokens.mEndPointer - tokens.mStartPointer == 1) { in splitWesternName()
405 name.givenNames = tokens.mTokens[tokens.mStartPointer]; in splitWesternName()
407 parseLastName(name, tokens); in splitWesternName()
408 parseMiddleName(name, tokens); in splitWesternName()
[all …]
DHanziToPinyin.java138 ArrayList<Token> tokens = new ArrayList<Token>(); in getTokens() local
141 return tokens; in getTokens()
157 addToken(sb, tokens, tokenType); in getTokens()
163 addToken(sb, tokens, tokenType); in getTokens()
165 tokens.add(token); in getTokens()
169 addToken(sb, tokens, tokenType); in getTokens()
177 addToken(sb, tokens, tokenType); in getTokens()
179 return tokens; in getTokens()
183 final StringBuilder sb, final ArrayList<Token> tokens, final int tokenType) { in addToken() argument
185 tokens.add(new Token(tokenType, str, str)); in addToken()
DProfileAwareUriMatcher.java75 String[] tokens = PATH_SPLIT_PATTERN.split(newPath); in addURI() local
77 if (tokens != null) { in addURI()
83 for (int i = 0; i < tokens.length; i++) { in addURI()
84 String token = tokens[i]; in addURI()
DContactLocaleUtils.java472 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(name); in getPinyinNameLookupKeys() local
473 final int tokenCount = tokens.size(); in getPinyinNameLookupKeys()
481 final Token token = tokens.get(i); in getPinyinNameLookupKeys()
/packages/apps/DocumentsUI/src/com/android/documentsui/queries/
DCommandInterceptor.java73 String[] tokens = query.substring(COMMAND_PREFIX.length()).split("\\s+"); in accept() local
75 if (command.accept(tokens)) { in accept()
84 private boolean quickViewer(String[] tokens) { in quickViewer() argument
85 if ("qv".equals(tokens[0])) { in quickViewer()
86 if (tokens.length == 2 && !TextUtils.isEmpty(tokens[1])) { in quickViewer()
87 DebugFlags.setQuickViewer(tokens[1]); in quickViewer()
88 Log.i(TAG, "Set quick viewer to: " + tokens[1]); in quickViewer()
91 Log.w(TAG, "Invalid command structure: " + TextUtils.join(" ", tokens)); in quickViewer()
93 } else if ("deqv".equals(tokens[0])) { in quickViewer()
101 private boolean gestureScale(String[] tokens) { in gestureScale() argument
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DHanziToPinyinTest.java43 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(hanziString); in test() local
44 assertEquals(tokens.size(), 1); in test()
45 final String newString = tokens.get(0).target; in test()
49 tokens.get(0).type, Token.UNKNOWN); in test()
56 tokens.get(0).type, Token.PINYIN); in test()
68 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(ONE_HANZI); in testGetToken() local
69 assertEquals(tokens.size(), 1); in testGetToken()
70 assertEquals(tokens.get(0).type, Token.PINYIN); in testGetToken()
71 assertTrue(tokens.get(0).target.equalsIgnoreCase("DU")); in testGetToken()
73 tokens = HanziToPinyin.getInstance().getTokens(TWO_HANZI); in testGetToken()
[all …]
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/sqlite/
DSqlCheckerTest.java29 final ArrayList<String> tokens = new ArrayList<>(); in getTokens() local
31 SqlChecker.findTokens(sql, SqlChecker.OPTION_NONE, token -> tokens.add(token)); in getTokens()
33 return tokens; in getTokens()
163 private SqlChecker getChecker(String... tokens) { in getChecker() argument
164 return new SqlChecker(Arrays.asList(tokens)); in getChecker()
167 private void checkEnsureNoInvalidTokens(boolean ok, String sql, String... tokens) { in checkEnsureNoInvalidTokens() argument
169 getChecker(tokens).ensureNoInvalidTokens(sql); in checkEnsureNoInvalidTokens()
172 getChecker(tokens).ensureNoInvalidTokens(sql); in checkEnsureNoInvalidTokens()
203 private void checkEnsureSingleTokenOnly(boolean ok, String sql, String... tokens) { in checkEnsureSingleTokenOnly() argument
205 getChecker(tokens).ensureSingleTokenOnly(sql); in checkEnsureSingleTokenOnly()
[all …]
/packages/apps/TV/tuner/src/com/android/tv/tuner/setup/
DChannelScanFileParser.java53 String[] tokens = line.split("\\s+"); in parseScanFile() local
54 if (tokens.length != 3 && tokens.length != 4) { in parseScanFile()
59 tokens[0], in parseScanFile()
60 Integer.parseInt(tokens[1]), in parseScanFile()
61 tokens[2], in parseScanFile()
62 tokens.length == 4 ? Integer.parseInt(tokens[3]) : null)); in parseScanFile()
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/
DAddress.java127 final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(rawAddress); in getEmailAddress() local
128 if (tokens.length > 0) { in getEmailAddress()
129 final String tokenizedName = tokens[0].getName(); in getEmailAddress()
131 address = Html.fromHtml(tokens[0].getAddress()).toString(); in getEmailAddress()
193 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(addressList); in isAllValid() local
194 for (int i = 0, length = tokens.length; i < length; ++i) { in isAllValid()
195 Rfc822Token token = tokens[i]; in isAllValid()
216 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(addressList); in parse() local
218 for (int i = 0, length = tokens.length; i < length; ++i) { in parse()
219 Rfc822Token token = tokens[i]; in parse()
/packages/apps/Bluetooth/src/com/android/bluetooth/map/
DBluetoothMapContent.java833 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(toAddress); in getRecipientNameEmail() local
834 if (tokens.length != 0) { in getRecipientNameEmail()
836 Log.d(TAG, "toName count= " + tokens.length); in getRecipientNameEmail()
840 while (i < tokens.length) { in getRecipientNameEmail()
842 Log.d(TAG, "ToName = " + tokens[i].toString()); in getRecipientNameEmail()
844 String name = tokens[i].getName(); in getRecipientNameEmail()
859 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(ccAddress); in getRecipientNameEmail() local
860 if (tokens.length != 0) { in getRecipientNameEmail()
862 Log.d(TAG, "ccName count= " + tokens.length); in getRecipientNameEmail()
866 while (i < tokens.length) { in getRecipientNameEmail()
[all …]
DBluetoothMapbMessageMime.java592 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(headerValue); in parseMimeHeaders() local
593 mFrom = new ArrayList<Rfc822Token>(Arrays.asList(tokens)); in parseMimeHeaders()
596 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(headerValue); in parseMimeHeaders() local
597 mTo = new ArrayList<Rfc822Token>(Arrays.asList(tokens)); in parseMimeHeaders()
600 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(headerValue); in parseMimeHeaders() local
601 mCc = new ArrayList<Rfc822Token>(Arrays.asList(tokens)); in parseMimeHeaders()
604 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(headerValue); in parseMimeHeaders() local
605 mBcc = new ArrayList<Rfc822Token>(Arrays.asList(tokens)); in parseMimeHeaders()
608 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(headerValue); in parseMimeHeaders() local
609 mReplyTo = new ArrayList<Rfc822Token>(Arrays.asList(tokens)); in parseMimeHeaders()
/packages/providers/TvProvider/tests/src/com/android/providers/tv/util/
DSqliteTokenFinderTest.java35 List<Pair<Integer, String>> tokens = new ArrayList<>(); in getTokens() local
39 tokens.add(pair); in getTokens()
42 return tokens; in getTokens()
45 private void checkTokens(String sql, Pair<Integer, String>... tokens) { in checkTokens() argument
46 final List<Pair<Integer, String>> expected = Arrays.asList(tokens); in checkTokens()
51 private void checkTokensRegular(String sql, @Nullable String tokens) { in checkTokensRegular() argument
54 if (tokens != null) { in checkTokensRegular()
55 for (String token : tokens.split(" ")) { in checkTokensRegular()
/packages/inputmethods/LatinIME/tools/dicttool/compat/android/text/
DTextUtils.java70 public static String join(CharSequence delimiter, Object[] tokens) { in join() argument
73 for (Object token: tokens) { in join()
89 public static String join(CharSequence delimiter, Iterable<?> tokens) { in join() argument
92 for (Object token: tokens) { in join()
/packages/services/Car/car-usb-handler/src/android/car/usb/handler/
DAoapInterface.java155 String[] tokens = idPair.split(":"); in isDeviceBlacklisted() local
156 if (tokens.length == 2) { in isDeviceBlacklisted()
158 sBlacklistedVidPidPairs.add(Pair.create(Integer.parseInt(tokens[0], 16), in isDeviceBlacklisted()
159 Integer.parseInt(tokens[1], 16))); in isDeviceBlacklisted()
/packages/apps/Dialer/java/com/android/voicemail/impl/mail/internet/
DMimeMessage.java503 final String[] tokens = header.split(":", 2); in setExtendedHeaders() local
504 if (tokens.length != 2) { in setExtendedHeaders()
507 extendedHeader.setHeader(tokens[0].trim(), tokens[1].trim()); in setExtendedHeaders()
597 final String[] tokens = rawField.getRaw().toString().split(":", 2); in field() local
598 ((Part) stack.peek()).addHeader(tokens[0], tokens[1].trim()); in field()
/packages/apps/Launcher3/tests/src/com/android/launcher3/ui/
DWorkTabTest.java43 String[] tokens = output.split("\\s+"); in createWorkProfile() local
44 mProfileUserId = Integer.parseInt(tokens[tokens.length - 1]); in createWorkProfile()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DWordInputEventForPersonalization.java58 final List<String> tokens, final int timestamp, in createInputEventFrom() argument
61 final int N = tokens.size(); in createInputEventFrom()
64 final String tempWord = tokens.get(i); in createInputEventFrom()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/
DLevenshteinDistanceTest.java60 Token[] tokens = new Token[strings.length]; in makeTokens() local
63 tokens[i] = new Token(str.toCharArray(), 0, str.length()); in makeTokens()
65 return tokens; in makeTokens()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DLevenshteinSuggestionFormatter.java104 Token[] tokens = new Token[len]; in tokenize() local
116 tokens[tokenCount++] = new Token(chars, start, end); in tokenize()
121 System.arraycopy(tokens, 0, ret, 0, tokenCount); in tokenize()
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastChannelManager.java146 String[] tokens = pair.split("="); in CellBroadcastChannelRange() local
147 if (tokens.length == 2) { in CellBroadcastChannelRange()
148 String key = tokens[0].trim(); in CellBroadcastChannelRange()
149 String value = tokens[1].trim(); in CellBroadcastChannelRange()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DLevenshteinFormatterTest.java44 Token[] tokens = mFormatter.tokenize(input); in verifyTokenizeResult() local
45 assertEquals(output.length, tokens.length); in verifyTokenizeResult()
47 assertEquals(output[i], tokens[i].toString()); in verifyTokenizeResult()
/packages/apps/Bluetooth/src/com/android/bluetooth/avrcpcontroller/bip/
DBipTransformation.java65 String[] tokens = transformations.split(" "); in BipTransformation() local
66 for (String token : tokens) { in BipTransformation()
/packages/apps/Test/connectivity/sl4n/rapidjson/doc/
Dpointer.md13 A JSON Pointer is a list of zero-to-many tokens, each prefixed by `/`. Each token can be a string o…
110 `Pointer::Get()` or `GetValueByPointer()` function does not modify the DOM. If the tokens cannot ma…
112 Note that, numerical tokens can represent an array index or member name. The resolving process will…
126 …arent values if they do not exist. If the parent values do not match the tokens, they will also be…
/packages/apps/Messaging/src/com/android/messaging/ui/contact/
DContactRecipientAdapter.java348 final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(inAddresses.get(i).toLowerCase());
349 addresses.add(tokens.length > 0 ? tokens[0].getAddress() : inAddresses.get(i));
/packages/providers/CalendarProvider/tests/src/com/android/providers/calendar/
DCalendarProvider2Test.java1820 String[] tokens = new String[] {"red"}; in testConstructSearchWhere() local
1826 assertEquals(expected, mProvider.constructSearchWhere(tokens)); in testConstructSearchWhere()
1828 tokens = new String[] {}; in testConstructSearchWhere()
1830 assertEquals(expected, mProvider.constructSearchWhere(tokens)); in testConstructSearchWhere()
1832 tokens = new String[] {"red", "green"}; in testConstructSearchWhere()
1843 assertEquals(expected, mProvider.constructSearchWhere(tokens)); in testConstructSearchWhere()
1845 tokens = new String[] {"red blue", "green"}; in testConstructSearchWhere()
1856 assertEquals(expected, mProvider.constructSearchWhere(tokens)); in testConstructSearchWhere()
1861 String[] tokens = new String[] {"red"}; in testConstructSearchArgs() local
1864 assertArrayEquals(expected, mProvider.constructSearchArgs(tokens)); in testConstructSearchArgs()
[all …]

12