/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/ |
D | BinaryDictionaryTests.java | 69 for (final File dictFile : mDictFilesToBeDeleted) { in tearDown() 70 dictFile.delete(); in tearDown() 83 final File dictFile = createEmptyVer4DictionaryAndGetFile(formatVersion, in createEmptyDictionaryWithAttributesAndGetFile() local 85 mDictFilesToBeDeleted.add(dictFile); in createEmptyDictionaryWithAttributesAndGetFile() 86 return dictFile; in createEmptyDictionaryWithAttributesAndGetFile() 107 private static BinaryDictionary getBinaryDictionary(final File dictFile) { in getBinaryDictionary() argument 108 return new BinaryDictionary(dictFile.getAbsolutePath(), in getBinaryDictionary() 109 0 /* offset */, dictFile.length(), true /* useFullEditDistance */, in getBinaryDictionary() 114 final File dictFile = createEmptyDictionaryAndGetFile(formatVersion); in getEmptyBinaryDictionary() local 115 return new BinaryDictionary(dictFile.getAbsolutePath(), in getEmptyBinaryDictionary() [all …]
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/ |
D | BinaryDictionaryUtils.java | 49 public static DictionaryHeader getHeader(final File dictFile) in getHeader() argument 51 return getHeaderWithOffsetAndLength(dictFile, 0 /* offset */, dictFile.length()); in getHeader() 54 public static DictionaryHeader getHeaderWithOffsetAndLength(final File dictFile, in getHeaderWithOffsetAndLength() argument 58 dictFile.getAbsolutePath(), offset, length, in getHeaderWithOffsetAndLength() 69 public static boolean renameDict(final File dictFile, final File newDictFile) { in renameDict() argument 70 if (dictFile.isFile()) { in renameDict() 71 return dictFile.renameTo(newDictFile); in renameDict() 72 } else if (dictFile.isDirectory()) { in renameDict() 73 final String dictName = dictFile.getName(); in renameDict() 78 for (final File file : dictFile.listFiles()) { in renameDict() [all …]
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/personalization/ |
D | UserHistoryDictionaryTests.java | 64 final File dictFile) { in assertDictionaryExists() argument 67 if (!dictFile.exists()) { in assertDictionaryExists() 69 Log.d(TAG, dictFile + " is not existing. Wait " in assertDictionaryExists() 71 printAllFiles(dictFile.getParentFile()); in assertDictionaryExists() 77 assertTrue("Following dictionary file doesn't exist: " + dictFile, dictFile.exists()); in assertDictionaryExists() 126 final File dictFile = ExpandableBinaryDictionary.getDictFile( in doTestRandomWords() local 136 assertDictionaryExists(dict, dictFile); in doTestRandomWords() 221 final File dictFile = ExpandableBinaryDictionary.getDictFile( in doTestAddManyWords() local 230 assertDictionaryExists(dict, dictFile); in doTestAddManyWords()
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/personalization/ |
D | UserHistoryDictionary.java | 60 @Nullable final File dictFile, @Nullable final String account) { in getUserHistoryDictName() argument 62 return getDictName(name, locale, dictFile); in getUserHistoryDictName() 64 return getUserHistoryDictNamePerAccount(name, locale, dictFile, account); in getUserHistoryDictName() 71 @Nullable final File dictFile, @Nullable final String account) { in getUserHistoryDictNamePerAccount() argument 72 if (dictFile != null) { in getUserHistoryDictNamePerAccount() 73 return dictFile.getName(); in getUserHistoryDictNamePerAccount() 86 final File dictFile, final String dictNamePrefix, @Nullable final String account) { in getDictionary() argument
|
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/ |
D | ExpandableBinaryDictionary.java | 143 final Locale locale, final String dictType, final File dictFile) { in ExpandableBinaryDictionary() argument 147 mDictFile = getDictFile(context, dictName, dictFile); in ExpandableBinaryDictionary() 155 final File dictFile) { in getDictFile() argument 156 return (dictFile != null) ? dictFile in getDictFile() 161 final File dictFile) { in getDictName() argument 162 return dictFile != null ? dictFile.getName() : name + "." + locale.toString(); in getDictName() 598 final File dictFile = mDictFile; in asyncReloadDictionary() local 603 if (!dictFile.exists() || isNeededToRecreate()) { in asyncReloadDictionary() 652 final File dictFile = mDictFile; in getDictionaryStats() local 658 result.set(new DictionaryStats(mLocale, dictName, dictName, dictFile, 0)); in getDictionaryStats()
|
D | ContactsBinaryDictionary.java | 54 final File dictFile, final String name) { in ContactsBinaryDictionary() argument 55 super(context, getDictName(name, locale, dictFile), locale, Dictionary.TYPE_CONTACTS, in ContactsBinaryDictionary() 56 dictFile); in ContactsBinaryDictionary() 66 final File dictFile, final String dictNamePrefix, @Nullable final String account) { in getDictionary() argument 67 return new ContactsBinaryDictionary(context, locale, dictFile, dictNamePrefix + NAME); in getDictionary()
|
D | UserBinaryDictionary.java | 60 final File dictFile, final String name) { in UserBinaryDictionary() argument 61 super(context, getDictName(name, locale, dictFile), locale, Dictionary.TYPE_USER, dictFile); in UserBinaryDictionary() 96 final Context context, final Locale locale, final File dictFile, in getDictionary() argument 100 dictFile, dictNamePrefix + NAME); in getDictionary()
|
D | DictionaryStats.java | 40 @Nullable final File dictFile, in DictionaryStats() argument 44 mDictFileSize = (dictFile == null || !dictFile.exists()) ? 0 : dictFile.length(); in DictionaryStats()
|
D | BinaryDictionary.java | 531 final File dictFile = new File(mDictFilePath); in reopen() local 535 loadDictionary(dictFile.getAbsolutePath(), 0 /* startOffset */, in reopen() 536 dictFile.length(), mIsUpdatable); in reopen() 609 final File dictFile = new File(mDictFilePath); in migrateTo() local 611 if (!FileUtils.deleteRecursively(dictFile)) { in migrateTo() 614 if (!BinaryDictionaryUtils.renameDict(tmpDictFile, dictFile)) { in migrateTo() 617 loadDictionary(dictFile.getAbsolutePath(), 0 /* startOffset */, in migrateTo() 618 dictFile.length(), mIsUpdatable); in migrateTo()
|
D | DictionaryFacilitatorImpl.java | 252 final Context context, final Locale locale, final File dictFile, in getSubDict() argument 263 new Object[] { context, locale, dictFile, dictNamePrefix, account }); in getSubDict() 433 final File dictFile = dictionaryFiles.get(dictType); in resetDictionariesForTesting() local 435 dictType, context, locale, dictFile, "" /* dictNamePrefix */, account); in resetDictionariesForTesting()
|
/packages/inputmethods/LatinIME/tests/src/com/android/inputmethod/latin/makedict/ |
D | BinaryDictIOUtils.java | 44 public static DictDecoder getDictDecoder(final File dictFile, final long offset, in getDictDecoder() argument 46 return new Ver4DictDecoder(dictFile); in getDictDecoder() 49 public static DictDecoder getDictDecoder(final File dictFile, final long offset, in getDictDecoder() argument 51 return new Ver4DictDecoder(dictFile); in getDictDecoder() 54 public static DictDecoder getDictDecoder(final File dictFile, final long offset, in getDictDecoder() argument 56 return getDictDecoder(dictFile, offset, length, DictDecoder.USE_READONLY_BYTEBUFFER); in getDictDecoder()
|
D | Ver2DictEncoder.java | 53 public Ver2DictEncoder(final File dictFile, final int codePointTableMode) { in Ver2DictEncoder() argument 54 mDictFile = dictFile; in Ver2DictEncoder()
|
/packages/inputmethods/LatinIME/tools/dicttool/src/com/android/inputmethod/latin/dicttool/ |
D | Header.java | 50 final File dictFile = new File(filename); in run() local 52 BinaryDictOffdeviceUtils.decodeDictionaryForProcess(dictFile, in run() 60 System.out.println("Dictionary : " + dictFile.getAbsolutePath()); in run() 61 System.out.println("Size : " + dictFile.length() + " bytes"); in run()
|