Home
last modified time | relevance | path

Searched refs:Token (Results 1 – 25 of 38) 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.kt22 import com.android.quicksearchbox.util.LevenshteinDistance.Token
37 val queryTokens: Array<Token?> = tokenize(mQuery) in formatSuggestion()
38 val suggestionTokens: Array<Token?> = tokenize(suggestion) in formatSuggestion()
48 val t: Token? = suggestionTokens[i] in formatSuggestion()
74 fun findMatches(source: Array<Token?>?, target: Array<Token?>): IntArray { in findMatches()
91 fun tokenize(seq: String?): Array<Token?> { in tokenize()
96 val tokens: Array<Token?> = arrayOfNulls<Token>(len) in tokenize()
108 tokens[tokenCount++] = Token(chars, start, end) in tokenize()
112 val ret: Array<Token?> = arrayOfNulls<Token>(tokenCount) in tokenize()
/packages/modules/Bluetooth/system/gd/rust/topshim/macros/src/
Dlib.rs8 use syn::{parse_macro_input, Block, Ident, Path, Stmt, Token, Type};
22 input.parse::<Token![,]>()?; in parse()
26 input.parse::<Token![->]>()?; in parse()
32 while input.peek(Token![,]) { in parse()
34 input.parse::<Token![,]>()?; in parse()
47 if input.peek(Token![->]) { in parse()
49 input.parse::<Token![->]>()?; in parse()
55 if input.peek(Token![_]) { in parse()
56 input.parse::<Token![_]>()?; in parse()
/packages/apps/QuickSearchBox/tests/src/com/android/quicksearchbox/util/
DLevenshteinDistanceTest.java24 import com.android.quicksearchbox.util.LevenshteinDistance.Token;
40 Token[] sourceTokens = makeTokens(source); in verifyTargetOperations()
41 Token[] targetTokens = makeTokens(target); in verifyTargetOperations()
60 private Token[] makeTokens(String[] strings) { in makeTokens()
61 Token[] tokens = new Token[strings.length]; in makeTokens()
64 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/apps/QuickSearchBox/src/com/android/quicksearchbox/util/
DLevenshteinDistance.kt27 class LevenshteinDistance(source: Array<Token?>?, target: Array<Token?>?) {
28 private val mSource: Array<Token?>?
29 private val mTarget: Array<Token?>?
103 class Token(private val mContainer: CharArray, val mStart: Int, val mEnd: Int) : CharSequence { class
114 fun prefixOf(that: Token?): Boolean { in prefixOf()
/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);
/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;
DCanonicalBuffer.cpp60 Buffer::Buffer(std::shared_ptr<ManagedBuffer> buffer, std::unique_ptr<BufferTracker::Token> token) in Buffer()
/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/apps/Car/SystemUI/src/com/android/systemui/wm/
DMDSystemBarsController.java167 @Nullable ImeTracker.Token statsToken) { in showInsets()
173 @Nullable ImeTracker.Token statsToken) { in hideInsets()
DDisplaySystemBarsController.java187 @Nullable ImeTracker.Token statsToken) { in hideInsets()
195 @Nullable ImeTracker.Token statsToken) { in showInsets()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/audio_util/
DPlayerSettingsManager.java53 MediaSessionCompat.Token.fromToken(wrapper.getSessionToken())); in PlayerSettingsManager()
79 MediaSessionCompat.Token.fromToken( in activePlayerChanged()
/packages/modules/Bluetooth/android/app/src/com/android/bluetooth/audio_util/mockable/
DMediaController.java53 MediaController(Context context, MediaSession.Token token) { in MediaController()
127 public MediaSession.Token getSessionToken() { in getSessionToken()
DMediaControllerFactory.java38 static MediaController make(Context context, MediaSession.Token token) { in make()
DMediaBrowser.java98 public MediaSession.Token getSessionToken() { in getSessionToken()
/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()
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/TvSystemUI/src/com/android/systemui/tv/media/
DTvMediaOutputDialogManager.kt64 token: MediaSession.Token?, in createAndShow()
/packages/modules/NeuralNetworks/driver/sample_hidl/
DSampleDriver.h42 std::unique_ptr<HalBufferTracker::Token> token) in SampleBuffer()
54 const std::unique_ptr<HalBufferTracker::Token> kToken;
/packages/modules/NeuralNetworks/driver/sample_aidl/
DSampleDriverAidl.h40 std::unique_ptr<AidlBufferTracker::Token> token) in SampleBuffer()
51 const std::unique_ptr<AidlBufferTracker::Token> kToken;
/packages/apps/Settings/tests/robotests/src/com/android/settings/media/
DMediaOutputIndicatorSliceTest.java108 private MediaSession.Token mToken;
121 mToken = new MediaSession.Token(Process.myUid(), null); in setUp()

12