Home
last modified time | relevance | path

Searched refs:Token (Results 1 – 25 of 35) sorted by relevance

12

/packages/providers/ContactsProvider/src/com/android/providers/contacts/
DHanziToPinyin.java40 public static class Token { class in HanziToPinyin
50 public Token() { in Token() method in HanziToPinyin.Token
53 public Token(int type, String source, String target) { in Token() method in HanziToPinyin.Token
98 private void tokenize(char character, Token token) { in tokenize()
103 token.type = Token.LATIN; in tokenize()
110 token.type = Token.LATIN; in tokenize()
116 token.type = Token.PINYIN; in tokenize()
120 token.type = Token.UNKNOWN; in tokenize()
137 public ArrayList<Token> getTokens(final String input) { in getTokens()
138 ArrayList<Token> tokens = new ArrayList<Token>(); in getTokens()
[all …]
DContactLocaleUtils.java29 import com.android.providers.contacts.HanziToPinyin.Token;
472 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(name); in getPinyinNameLookupKeys()
481 final Token token = tokens.get(i); in getPinyinNameLookupKeys()
482 if (Token.UNKNOWN == token.type) { in getPinyinNameLookupKeys()
485 if (Token.PINYIN == token.type) { in getPinyinNameLookupKeys()
488 } else if (Token.LATIN == token.type) { in getPinyinNameLookupKeys()
/packages/providers/ContactsProvider/tests/src/com/android/providers/contacts/
DHanziToPinyinTest.java23 import com.android.providers.contacts.HanziToPinyin.Token;
43 ArrayList<Token> tokens = HanziToPinyin.getInstance().getTokens(hanziString); 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()
70 assertEquals(tokens.get(0).type, Token.PINYIN); in testGetToken()
75 assertEquals(tokens.get(0).type, Token.PINYIN); in testGetToken()
76 assertEquals(tokens.get(1).type, Token.PINYIN); in testGetToken()
82 assertEquals(tokens.get(0).type, Token.LATIN); in testGetToken()
86 assertEquals(tokens.get(0).type, Token.UNKNOWN); in testGetToken()
[all …]
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/
DLevenshteinSuggestionFormatter.java20 import com.android.quicksearchbox.util.LevenshteinDistance.Token;
43 final Token[] queryTokens = tokenize(query); in formatSuggestion()
44 final Token[] suggestionTokens = tokenize(suggestion); in formatSuggestion()
55 final Token t = suggestionTokens[i]; in formatSuggestion()
82 int[] findMatches(Token[] source, Token[] target) { in findMatches()
99 Token[] tokenize(final String seq) { in tokenize()
104 Token[] tokens = new Token[len]; in tokenize()
116 tokens[tokenCount++] = new Token(chars, start, end); in tokenize()
120 Token[] ret = new Token[tokenCount]; in tokenize()
/packages/apps/QuickSearchBox/src/com/android/quicksearchbox/util/
DLevenshteinDistance.java33 private final Token[] mSource;
34 private final Token[] mTarget;
38 public LevenshteinDistance(Token[] source, Token[] target) { in LevenshteinDistance()
65 final Token[] src = mSource; in calculate()
66 final Token[] trg = mTarget; in calculate()
72 Token sourceToken = src[s-1]; in calculate()
74 Token targetToken = trg[t-1]; in calculate()
149 public static final class Token implements CharSequence { class in LevenshteinDistance
154 public Token(char[] container, int start, int end) { in Token() method in LevenshteinDistance.Token
170 public boolean prefixOf(final Token that) { in prefixOf()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/
DLevenshteinDistanceTest.java20 import com.android.quicksearchbox.util.LevenshteinDistance.Token;
39 Token[] sourceTokens = makeTokens(source); in verifyTargetOperations()
40 Token[] targetTokens = makeTokens(target); in verifyTargetOperations()
59 private Token[] makeTokens(String[] strings) { in makeTokens()
60 Token[] tokens = new Token[strings.length]; in makeTokens()
63 tokens[i] = new Token(str.toCharArray(), 0, str.length()); in makeTokens()
/packages/modules/NeuralNetworks/shim_and_sl/include/
DShimBufferTracker.h46 class Token {
47 DISALLOW_COPY_AND_ASSIGN(Token);
50 Token(uint32_t token, std::shared_ptr<ShimBufferTracker> tracker) in Token() function
52 ~Token() { kBufferTracker->free(kToken); } in ~Token()
69 std::unique_ptr<Token> add(std::shared_ptr<::android::nn::sl_wrapper::Memory> buffer);
/packages/modules/NeuralNetworks/common/include/
DHalBufferTracker.h81 class Token {
82 DISALLOW_COPY_AND_ASSIGN(Token);
85 Token(uint32_t token, std::shared_ptr<HalBufferTracker> tracker) in Token() function
87 ~Token() { kHalBufferTracker->free(kToken); } in ~Token()
104 std::unique_ptr<Token> add(std::shared_ptr<HalManagedBuffer> buffer);
DBufferTracker.h81 class Token {
82 DISALLOW_COPY_AND_ASSIGN(Token);
85 Token(Request::MemoryDomainToken token, std::shared_ptr<BufferTracker> tracker) in Token() function
87 ~Token() { kBufferTracker->free(kToken); } in ~Token()
102 std::unique_ptr<Token> add(std::shared_ptr<ManagedBuffer> buffer);
DAidlBufferTracker.h81 class Token {
82 DISALLOW_COPY_AND_ASSIGN(Token);
85 Token(uint32_t token, std::shared_ptr<AidlBufferTracker> tracker) in Token() function
87 ~Token() { kBufferTracker->free(kToken); } in ~Token()
104 std::unique_ptr<Token> add(std::shared_ptr<AidlManagedBuffer> buffer);
/packages/apps/Test/connectivity/sl4n/rapidjson/include/rapidjson/
Dpointer.h89 struct Token { struct
155 …GenericPointer(const Token* tokens, size_t tokenCount) : allocator_(), ownAllocator_(), nameBuffer… in GenericPointer()
201 GenericPointer Append(const Token& token, Allocator* allocator = 0) const {
220 Token token = { name, length, kPointerInvalidIndex };
260 Token token = { (Ch*)buffer, length, index };
267 Token token = { name, length, index };
306 const Token* GetTokens() const { return tokens_; } in GetTokens()
391 for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) {
460 for (const Token *t = tokens_; t != tokens_ + tokenCount_; ++t) { in Get()
688 const Token* last = tokens_ + (tokenCount_ - 1); in Erase()
[all …]
Dreader.h1028 enum Token { enum
1047 RAPIDJSON_FORCEINLINE Token Tokenize(Ch c) { in Tokenize()
1069 return (Token)tokenMap[(unsigned char)c]; in Tokenize()
1074 RAPIDJSON_FORCEINLINE IterativeParsingState Predict(IterativeParsingState state, Token token) { in Predict()
1241 …RAPIDJSON_FORCEINLINE IterativeParsingState Transit(IterativeParsingState src, Token token, Iterat… in Transit()
1409 Token t = Tokenize(is.Peek()); in IterativeParse()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/
DLevenshteinFormatterTest.java20 import com.android.quicksearchbox.util.LevenshteinDistance.Token;
44 Token[] tokens = mFormatter.tokenize(input); in verifyTokenizeResult()
94 Token[] sourceTokens = mFormatter.tokenize(source); in verifyFindMatches()
95 Token[] targetTokens = mFormatter.tokenize(target); in verifyFindMatches()
113 Token srcToken = sourceTokens[sourceIdx]; in verifyFindMatches()
114 Token trgToken = targetTokens[i]; in verifyFindMatches()
/packages/modules/NeuralNetworks/driver/sample/
DCanonicalBuffer.h32 Buffer(std::shared_ptr<ManagedBuffer> buffer, std::unique_ptr<BufferTracker::Token> token);
42 const std::unique_ptr<BufferTracker::Token> kToken;
DSampleDriver.h42 std::unique_ptr<HalBufferTracker::Token> token) in SampleBuffer()
54 const std::unique_ptr<HalBufferTracker::Token> kToken;
/packages/modules/NeuralNetworks/shim_and_sl/
DShimBufferTracker.cpp34 std::unique_ptr<ShimBufferTracker::Token> ShimBufferTracker::add( in add()
49 return std::make_unique<Token>(token, shared_from_this()); in add()
/packages/services/Car/service/src/com/android/car/
DCarMediaService.java48 import android.media.session.MediaSession.Token;
646 private Map<Token, MediaControllerCallback> mCallbacks = new HashMap<>();
657 Map<MediaSession.Token, MediaControllerCallback> updatedCallbacks = in registerCallbacks()
661 MediaSession.Token token = controller.getSessionToken(); in registerCallbacks()
671 for (MediaSession.Token token : mCallbacks.keySet()) { in registerCallbacks()
694 for (Map.Entry<Token, MediaControllerCallback> entry : mCallbacks.entrySet()) { in unregisterCallbacks()
/packages/apps/Bluetooth/src/com/android/bluetooth/audio_util/mockable/
DMediaController.java53 MediaController(Context context, MediaSession.Token token) { in MediaController()
151 public MediaSession.Token getSessionToken() { in getSessionToken()
DMediaControllerFactory.java38 static MediaController make(Context context, MediaSession.Token token) { in make()
DMediaBrowser.java115 public MediaSession.Token getSessionToken() { in getSessionToken()
/packages/modules/NeuralNetworks/driver/sample_aidl/
DSampleDriver.h40 std::unique_ptr<AidlBufferTracker::Token> token) in SampleBuffer()
51 const std::unique_ptr<AidlBufferTracker::Token> kToken;
/packages/modules/NeuralNetworks/common/
DHalBufferTracker.cpp191 std::unique_ptr<HalBufferTracker::Token> HalBufferTracker::add( in add()
207 return std::make_unique<Token>(token, shared_from_this()); in add()
DAidlBufferTracker.cpp191 std::unique_ptr<AidlBufferTracker::Token> AidlBufferTracker::add( in add()
207 return std::make_unique<Token>(token, shared_from_this()); in add()
DBufferTracker.cpp199 std::unique_ptr<BufferTracker::Token> BufferTracker::add(std::shared_ptr<ManagedBuffer> buffer) { in add()
215 return std::make_unique<Token>(token, shared_from_this()); in add()
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/
DMediaOutputIndicatorSliceTest.java101 private MediaSession.Token mToken;
114 mToken = new MediaSession.Token(Process.myUid(), null); in setUp()

12