Home
last modified time | relevance | path

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

123

/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/modules/Wifi/framework/java/android/net/wifi/p2p/
DWifiP2pProvDiscEvent.java64 String[] tokens = string.split(" "); in WifiP2pProvDiscEvent() local
66 if (tokens.length < 2) { in WifiP2pProvDiscEvent()
70 if (tokens[0].endsWith("PBC-REQ")) event = PBC_REQ; in WifiP2pProvDiscEvent()
71 else if (tokens[0].endsWith("PBC-RESP")) event = PBC_RSP; in WifiP2pProvDiscEvent()
72 else if (tokens[0].endsWith("ENTER-PIN")) event = ENTER_PIN; in WifiP2pProvDiscEvent()
73 else if (tokens[0].endsWith("SHOW-PIN")) event = SHOW_PIN; in WifiP2pProvDiscEvent()
78 device.deviceAddress = tokens[1]; in WifiP2pProvDiscEvent()
81 pin = tokens[2]; in WifiP2pProvDiscEvent()
DWifiP2pGroup.java118 String[] tokens = supplicantEvent.split(" "); in WifiP2pGroup() local
120 if (tokens.length < 3) { in WifiP2pGroup()
124 if (tokens[0].startsWith("P2P-GROUP")) { in WifiP2pGroup()
125 mInterface = tokens[1]; in WifiP2pGroup()
126 mIsGroupOwner = tokens[2].equals("GO"); in WifiP2pGroup()
145 } else if (tokens[0].equals("P2P-INVITATION-RECEIVED")) { in WifiP2pGroup()
148 for (String token : tokens) { in WifiP2pGroup()
DWifiP2pConfig.java168 String[] tokens = supplicantEvent.split(" "); in WifiP2pConfig() local
170 if (tokens.length < 2 || !tokens[0].equals("P2P-GO-NEG-REQUEST")) { in WifiP2pConfig()
174 deviceAddress = tokens[1]; in WifiP2pConfig()
177 if (tokens.length > 2) { in WifiP2pConfig()
178 String[] nameVal = tokens[2].split("="); in WifiP2pConfig()
DWifiP2pDevice.java194 String[] tokens = string.split("[ \n]"); in WifiP2pDevice() local
197 if (tokens.length < 1) { in WifiP2pDevice()
201 switch (tokens.length) { in WifiP2pDevice()
247 if (tokens[0].startsWith("P2P-DEVICE-FOUND")) { in WifiP2pDevice()
/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/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/
DCarWatchdogClient.java77 String[] tokens = command.split("[ ]+"); in parseCommand() local
78 int paramCount = tokens.length; in parseCommand()
85 switch (tokens[0]) { in parseCommand()
99 notRespondAfterInSec = Integer.parseInt(tokens[1]); in parseCommand()
104 inactiveMainAfterInSec = Integer.parseInt(tokens[2]); in parseCommand()
110 switch (tokens[3]) { in parseCommand()
118 throw new IllegalArgumentException("invalid verbose value: " + tokens[3]); in parseCommand()
121 Log.i(TAG, "CarWatchdogClient command: timeout = " + tokens[0] + ", notRespondingAfter = " in parseCommand()
/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/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/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/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.java176 String[] tokens = idPair.split(":"); in isDeviceDenylisted() local
177 if (tokens.length == 2) { in isDeviceDenylisted()
179 sDenylistedVidPidPairs.add(Pair.create(Integer.parseInt(tokens[0], 16), in isDeviceDenylisted()
180 Integer.parseInt(tokens[1], 16))); in isDeviceDenylisted()
/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/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/modules/Gki/test/src/com/android/gki/tests/
DGkiInstallTest.java307 String[] tokens = line.split("\\s"); in getOverlayfsState() local
308 if (tokens.length < 2) continue; in getOverlayfsState()
309 if (!"overlay".equals(tokens[0])) continue; in getOverlayfsState()
310 Path path = Paths.get(tokens[1]); in getOverlayfsState()
/packages/apps/CellBroadcastReceiver/src/com/android/cellbroadcastreceiver/
DCellBroadcastChannelManager.java179 String[] tokens = pair.split("="); in CellBroadcastChannelRange() local
180 if (tokens.length == 2) { in CellBroadcastChannelRange()
181 String key = tokens[0].trim(); in CellBroadcastChannelRange()
182 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()

123