Home
last modified time | relevance | path

Searched refs:FormatUtils (Results 1 – 23 of 23) sorted by relevance

/packages/inputmethods/LatinIME/native/jni/tests/dictionary/utils/
Dformat_utils_test.cpp29 EXPECT_EQ(0x9BC13AFE, FormatUtils::MAGIC_NUMBER) << "Magic number must not be changed."; in TEST()
54 EXPECT_EQ(FormatUtils::UNKNOWN_VERSION, in TEST()
55 FormatUtils::detectFormatVersion(ReadOnlyByteArrayView())); in TEST()
59 getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_2, 0, 0); in TEST()
60 EXPECT_EQ(FormatUtils::VERSION_2, FormatUtils::detectFormatVersion( in TEST()
65 getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_402, 0, 0); in TEST()
66 EXPECT_EQ(FormatUtils::VERSION_402, FormatUtils::detectFormatVersion( in TEST()
71 getBuffer(FormatUtils::MAGIC_NUMBER, FormatUtils::VERSION_403, 0, 0); in TEST()
72 EXPECT_EQ(FormatUtils::VERSION_403, FormatUtils::detectFormatVersion( in TEST()
78 getBuffer(FormatUtils::MAGIC_NUMBER - 1, FormatUtils::VERSION_2, 0, 0); in TEST()
[all …]
/packages/apps/DocumentsUI/tests/unit/com/android/documentsui/util/
DFormatUtilsTest.java26 assertEquals("0 seconds", FormatUtils.formatDuration(0)); in testFormatDuration_seconds()
27 assertEquals("0 seconds", FormatUtils.formatDuration(1)); in testFormatDuration_seconds()
28 assertEquals("0 seconds", FormatUtils.formatDuration(499)); in testFormatDuration_seconds()
29 assertEquals("1 second", FormatUtils.formatDuration(500)); in testFormatDuration_seconds()
30 assertEquals("1 second", FormatUtils.formatDuration(1000)); in testFormatDuration_seconds()
31 assertEquals("2 seconds", FormatUtils.formatDuration(1500)); in testFormatDuration_seconds()
36 assertEquals("59 seconds", FormatUtils.formatDuration(59000)); in testFormatDuration_Minutes()
37 assertEquals("60 seconds", FormatUtils.formatDuration(59500)); in testFormatDuration_Minutes()
38 assertEquals("1 minute", FormatUtils.formatDuration(60000)); in testFormatDuration_Minutes()
39 assertEquals("1 minute", FormatUtils.formatDuration(65000)); in testFormatDuration_Minutes()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/
Ddictionary_structure_with_buffer_policy_factory.cpp59 FormatUtils::FORMAT_VERSION dictFormatVersion = FormatUtils::getFormatVersion(formatVersion); in newPolicyForOnMemoryDict()
61 case FormatUtils::VERSION_402: { in newPolicyForOnMemoryDict()
68 case FormatUtils::VERSION_4_ONLY_FOR_TESTING: in newPolicyForOnMemoryDict()
69 case FormatUtils::VERSION_403: { in newPolicyForOnMemoryDict()
85 const FormatUtils::FORMAT_VERSION formatVersion, in newPolicyForOnMemoryV4Dict()
113 const FormatUtils::FORMAT_VERSION formatVersion = FormatUtils::detectFormatVersion( in newPolicyForDirectoryDict()
116 case FormatUtils::VERSION_2: in newPolicyForDirectoryDict()
117 case FormatUtils::VERSION_201: in newPolicyForDirectoryDict()
118 case FormatUtils::VERSION_202: in newPolicyForDirectoryDict()
121 case FormatUtils::VERSION_402: { in newPolicyForDirectoryDict()
[all …]
Ddictionary_structure_with_buffer_policy_factory.h45 newPolicyForOnMemoryV4Dict(const FormatUtils::FORMAT_VERSION formatVersion,
54 const char *const headerFilePath, const FormatUtils::FORMAT_VERSION formatVersion,
/packages/inputmethods/LatinIME/native/jni/src/dictionary/header/
Dheader_policy.h35 HeaderPolicy(const uint8_t *const dictBuf, const FormatUtils::FORMAT_VERSION formatVersion) in HeaderPolicy()
60 HeaderPolicy(const FormatUtils::FORMAT_VERSION dictFormatVersion, in HeaderPolicy()
102 : mDictFormatVersion(FormatUtils::UNKNOWN_VERSION), mDictionaryFlags(0), mSize(0), in HeaderPolicy()
116 case FormatUtils::VERSION_2: in getFormatVersionNumber()
117 case FormatUtils::VERSION_201: in getFormatVersionNumber()
119 return FormatUtils::UNKNOWN_VERSION; in getFormatVersionNumber()
120 case FormatUtils::VERSION_202: in getFormatVersionNumber()
121 return FormatUtils::VERSION_202; in getFormatVersionNumber()
122 case FormatUtils::VERSION_4_ONLY_FOR_TESTING: in getFormatVersionNumber()
123 return FormatUtils::VERSION_4_ONLY_FOR_TESTING; in getFormatVersionNumber()
[all …]
Dheader_read_write_utils.cpp105 BufferWithExtendableBuffer *const buffer, const FormatUtils::FORMAT_VERSION version, in writeDictionaryVersion()
107 if (!buffer->writeUintAndAdvancePosition(FormatUtils::MAGIC_NUMBER, HEADER_MAGIC_NUMBER_SIZE, in writeDictionaryVersion()
112 case FormatUtils::VERSION_2: in writeDictionaryVersion()
113 case FormatUtils::VERSION_201: in writeDictionaryVersion()
114 case FormatUtils::VERSION_202: in writeDictionaryVersion()
117 case FormatUtils::VERSION_4_ONLY_FOR_TESTING: in writeDictionaryVersion()
118 case FormatUtils::VERSION_402: in writeDictionaryVersion()
119 case FormatUtils::VERSION_403: in writeDictionaryVersion()
Dheader_read_write_utils.h53 const FormatUtils::FORMAT_VERSION version, int *const writingPos);
/packages/apps/Contacts/tests/src/com/android/contacts/format/
DFormatUtilsTests.java30 assertEquals(2, FormatUtils.overlapPoint("abcde", "cdefg")); in testOverlapPoint()
31 assertEquals(-1, FormatUtils.overlapPoint("John Doe", "John Doe")); in testOverlapPoint()
32 assertEquals(5, FormatUtils.overlapPoint("John Doe", "Doe, John")); in testOverlapPoint()
33 assertEquals(-1, FormatUtils.overlapPoint("Mr. John Doe", "Mr. Doe, John")); in testOverlapPoint()
34 assertEquals(13, FormatUtils.overlapPoint("John Herbert Doe", "Doe, John Herbert")); in testOverlapPoint()
59 FormatUtils.copyToCharArrayBuffer(text, buffer); in checkCharArrayBufferToString()
60 assertEquals(text, FormatUtils.charArrayBufferToString(buffer)); in checkCharArrayBufferToString()
67 FormatUtils.copyToCharArrayBuffer(value, buffer); in checkCopyToCharArrayBuffer()
75 assertEquals(-1, FormatUtils.indexOfWordPrefix("test", null)); in testIndexOfWordPrefix_NullPrefix()
79 assertEquals(-1, FormatUtils.indexOfWordPrefix(null, "TE")); in testIndexOfWordPrefix_NullText()
[all …]
/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/
Dformat_utils.cpp23 const uint32_t FormatUtils::MAGIC_NUMBER = 0x9BC13AFE;
26 const size_t FormatUtils::DICTIONARY_MINIMUM_SIZE = 12;
28 /* static */ FormatUtils::FORMAT_VERSION FormatUtils::getFormatVersion(const int formatVersion) { in getFormatVersion()
46 /* static */ FormatUtils::FORMAT_VERSION FormatUtils::detectFormatVersion( in detectFormatVersion()
Ddict_file_writing_utils.cpp45 const FormatUtils::FORMAT_VERSION formatVersion = FormatUtils::getFormatVersion(dictVersion); in createEmptyDictFile()
47 case FormatUtils::VERSION_402: in createEmptyDictFile()
52 case FormatUtils::VERSION_4_ONLY_FOR_TESTING: in createEmptyDictFile()
53 case FormatUtils::VERSION_403: in createEmptyDictFile()
68 const FormatUtils::FORMAT_VERSION formatVersion) { in createEmptyV4DictFile()
Dformat_utils.h30 class FormatUtils {
54 DISALLOW_IMPLICIT_CONSTRUCTORS(FormatUtils);
Ddict_file_writing_utils.h52 const FormatUtils::FORMAT_VERSION formatVersion);
58 const FormatUtils::FORMAT_VERSION formatVersion);
/packages/apps/DocumentsUI/src/com/android/documentsui/util/
DFormatUtils.java30 public class FormatUtils { class
31 private FormatUtils() {} in FormatUtils() method in FormatUtils
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v4/
Dver4_dict_buffers.h40 const FormatUtils::FORMAT_VERSION formatVersion);
114 const FormatUtils::FORMAT_VERSION formatVersion,
Dver4_dict_buffers.cpp35 const FormatUtils::FORMAT_VERSION formatVersion) { in openVer4DictBuffers()
172 const FormatUtils::FORMAT_VERSION formatVersion, in Ver4DictBuffers()
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/backward/v402/
Dver4_dict_buffers.h49 const FormatUtils::FORMAT_VERSION formatVersion);
134 const FormatUtils::FORMAT_VERSION formatVersion);
Dver4_dict_buffers.cpp41 const FormatUtils::FORMAT_VERSION formatVersion) { in openVer4DictBuffers()
130 const FormatUtils::FORMAT_VERSION formatVersion) in Ver4DictBuffers()
/packages/apps/DocumentsUI/src/com/android/documentsui/ui/
DOperationProgressDialog.java31 import com.android.documentsui.util.FormatUtils;
74 FormatUtils.formatDuration(message.arg2))); in OperationProgressDialog()
/packages/apps/Contacts/src/com/android/contacts/format/
DTextHighlighter.java85 int index = FormatUtils.indexOfWordPrefix(text, trimmedPrefix); in applyPrefixHighlight()
DFormatUtils.java30 public class FormatUtils { class
/packages/inputmethods/LatinIME/native/jni/src/dictionary/structure/v2/
Dpatricia_trie_policy.h47 FormatUtils::detectFormatVersion(mMmappedBuffer->getReadOnlyByteArrayView())), in PatriciaTriePolicy()
/packages/apps/DocumentsUI/src/com/android/documentsui/services/
DCopyJob.java87 import com.android.documentsui.util.FormatUtils;
149 FormatUtils.formatDuration(remainingTime))); in getProgressNotification()
/packages/apps/Contacts/
Dproguard.flags32 -keep class com.android.contacts.format.FormatUtils { *; }