Home
last modified time | relevance | path

Searched refs:tokens (Results 1 – 25 of 49) 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()
/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 Integer.parseInt(tokens[1]), in parseScanFile()
60 tokens[2], in parseScanFile() local
61 tokens.length == 4 ? Integer.parseInt(tokens[3]) : null)); in parseScanFile()
/packages/apps/UnifiedEmail/src/com/android/mail/providers/
DSuggestionsProvider.java76 String[] tokens = TextUtils.split(query, in query() local
79 if (tokens != null && tokens.length > 1) { in query()
80 query = tokens[tokens.length - 1]; in query()
84 for (int i = 0, size = tokens.length - 1; i < size; i++) { in query()
85 mFullQueryTerms.add(tokens[i]); in query()
DReplyFromAccount.java115 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(possibleCustomFrom); in matchesAccountOrCustomFrom() local
116 if (tokens != null && tokens.length > 0) { in matchesAccountOrCustomFrom()
117 String parsedFromAddress = Utils.normalizeEmailAddress(tokens[0].getAddress()); in matchesAccountOrCustomFrom()
/packages/apps/UnifiedEmail/src/com/android/emailcommon/mail/
DAddress.java137 final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(rawAddress); in getEmailAddress() local
138 if (tokens.length > 0) { in getEmailAddress()
139 final String tokenizedName = tokens[0].getName(); in getEmailAddress()
142 address = Html.fromHtml(tokens[0].getAddress()).toString(); in getEmailAddress()
205 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(addressList); in isAllValid() local
206 for (int i = 0, length = tokens.length; i < length; ++i) { in isAllValid()
207 Rfc822Token token = tokens[i]; in isAllValid()
228 Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(addressList); in parse() local
230 for (int i = 0, length = tokens.length; i < length; ++i) { in parse()
231 Rfc822Token token = tokens[i]; in parse()
/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/apps/UnifiedEmail/src/com/android/mail/utils/
DStringUtils.java15 public static String joinAndBidiFormat(String delimiter, Iterable<String> tokens) { in joinAndBidiFormat() argument
16 return joinAndBidiFormat(delimiter, tokens, BidiFormatter.getInstance()); in joinAndBidiFormat()
25 String delimiter, Iterable<String> tokens, BidiFormatter bidiFormatter) { in joinAndBidiFormat() argument
28 for (String token : tokens) { in joinAndBidiFormat()
/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/apps/UnifiedEmail/src/com/android/mail/
DEmailAddress.java82 final Rfc822Token[] tokens = Rfc822Tokenizer.tokenize(rawAddress); in getEmailAddress() local
83 if (tokens.length > 0) { in getEmailAddress()
84 final String tokenizedName = tokens[0].getName(); in getEmailAddress()
86 address = Html.fromHtml(tokens[0].getAddress()).toString(); in getEmailAddress()
/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/UnifiedEmail/src/com/android/emailcommon/internet/
DMimeMessage.java493 final String[] tokens = header.split(":", 2); in setExtendedHeaders() local
494 if (tokens.length != 2) { in setExtendedHeaders()
497 mExtendedHeader.setHeader(tokens[0].trim(), tokens[1].trim()); in setExtendedHeaders()
583 final String[] tokens = fieldData.split(":", 2); in field() local
584 ((Part)stack.peek()).addHeader(tokens[0], tokens[1].trim()); in field()
/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/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastChannelManager.java128 String[] tokens = pair.split("="); in CellBroadcastChannelRange() local
129 if (tokens.length == 2) { in CellBroadcastChannelRange()
130 String key = tokens[0].trim(); in CellBroadcastChannelRange()
131 String value = tokens[1].trim(); in CellBroadcastChannelRange()
/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()

12