Home
last modified time | relevance | path

Searched refs:filePath (Results 1 – 25 of 49) sorted by relevance

12

/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/utils/
Dfile_utils.cpp31 /* static */ int FileUtils::getFileSize(const char *const filePath) { in getFileSize() argument
32 const int fd = open(filePath, O_RDONLY); in getFileSize()
75 char filePath[filePathBufSize]; in removeDirAndFiles() local
76 getFilePath(dirPath, dirent->d_name, filePathBufSize, filePath); in removeDirAndFiles()
77 if (remove(filePath) != 0) { in removeDirAndFiles()
78 AKLOGE("Cannot remove file %s.", filePath); in removeDirAndFiles()
97 /* static */ int FileUtils::getFilePathWithSuffixBufSize(const char *const filePath, in getFilePathWithSuffixBufSize() argument
99 return strlen(filePath) + strlen(suffix) + 1 /* terminator */; in getFilePathWithSuffixBufSize()
102 /* static */ void FileUtils::getFilePathWithSuffix(const char *const filePath, in getFilePathWithSuffix() argument
104 snprintf(outFilePath, filePathBufSize, "%s%s", filePath, suffix); in getFilePathWithSuffix()
[all …]
Ddict_file_writing_utils.cpp40 /* static */ bool DictFileWritingUtils::createEmptyDictFile(const char *const filePath, in createEmptyDictFile() argument
50 filePath, localeAsCodePointVector, attributeMap, formatVersion); in createEmptyDictFile()
55 filePath, localeAsCodePointVector, attributeMap, formatVersion); in createEmptyDictFile()
58 filePath, dictVersion); in createEmptyDictFile()
85 char filePath[filePathBufSize]; in flushBufferToFileWithSuffix() local
86 FileUtils::getFilePathWithSuffix(basePath, suffix, filePathBufSize, filePath); in flushBufferToFileWithSuffix()
87 return flushBufferToFile(filePath, buffer); in flushBufferToFileWithSuffix()
102 /* static */ bool DictFileWritingUtils::flushBufferToFile(const char *const filePath, in flushBufferToFile() argument
104 const int fd = open(filePath, O_WRONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); in flushBufferToFile()
106 AKLOGE("File %s cannot be opened. errno: %d", filePath, errno); in flushBufferToFile()
[all …]
Dfile_utils.h27 static int getFileSize(const char *const filePath);
34 static int getFilePathWithSuffixBufSize(const char *const filePath, const char *const suffix);
36 static void getFilePathWithSuffix(const char *const filePath, const char *const suffix,
45 static bool getFilePathWithoutSuffix(const char *const filePath, const char *const suffix,
48 static void getDirPath(const char *const filePath, const int dirPathBufSize,
51 static void getBasename(const char *const filePath, const int outNameBufSize,
Ddict_file_writing_utils.h34 static bool createEmptyDictFile(const char *const filePath, const int dictVersion,
49 static bool createEmptyV401DictFile(const char *const filePath,
55 static bool createEmptyV4DictFile(const char *const filePath,
60 static bool flushBufferToFile(const char *const filePath,
Dmmapped_buffer.cpp75 char filePath[filePathBufferSize]; in openBuffer() local
76 const int filePathLength = snprintf(filePath, filePathBufferSize, "%s%s", dirPath, in openBuffer()
81 return openBuffer(filePath, isUpdatable); in openBuffer()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DLocalImage.java142 filePath = cursor.getString(INDEX_DATA); in loadFromCursor()
164 filePath = uh.update(filePath, cursor.getString(INDEX_DATA)); in updateFromCursor()
176 type, filePath); in requestImage()
220 return new LocalLargeImageRequest(filePath); in requestLargeImage()
290 exifInterface.forceRewriteExif(filePath); in rotate()
291 fileSize = new File(filePath).length(); in rotate()
294 Log.w(TAG, "cannot find file to set exif: " + filePath); in rotate()
296 Log.w(TAG, "cannot set exif data: " + filePath); in rotate()
326 MediaDetails.extractExifInfo(details, filePath); in getDetails()
348 return filePath; in getFilePath()
DLocalVideo.java110 filePath = cursor.getString(INDEX_DATA); in loadFromCursor()
145 filePath = uh.update(filePath, cursor.getString(INDEX_DATA)); in updateFromCursor()
156 type, filePath); in requestImage()
240 return filePath; in getFilePath()
DMediaDetails.java134 public static void extractExifInfo(MediaDetails details, String filePath) { in extractExifInfo() argument
138 exif.readExif(filePath); in extractExifInfo()
140 Log.w(TAG, "Could not find file to read exif: " + filePath, e); in extractExifInfo()
142 Log.w(TAG, "Could not read exif from file: " + filePath, e); in extractExifInfo()
DDecodeUtils.java101 JobContext jc, String filePath, Options options, int targetSize, int type) { in decodeThumbnail() argument
104 fis = new FileInputStream(filePath); in decodeThumbnail()
218 JobContext jc, String filePath, boolean shareable) { in createBitmapRegionDecoder() argument
220 return BitmapRegionDecoder.newInstance(filePath, shareable); in createBitmapRegionDecoder()
/packages/apps/Camera2/src/com/android/camera/
DThumbnail.java29 public static Bitmap createVideoThumbnailBitmap(String filePath, int targetWidth) { in createVideoThumbnailBitmap() argument
30 return createVideoThumbnailBitmap(filePath, null, targetWidth); in createVideoThumbnailBitmap()
33 private static Bitmap createVideoThumbnailBitmap(String filePath, FileDescriptor fd, in createVideoThumbnailBitmap() argument
38 if (filePath != null) { in createVideoThumbnailBitmap()
39 retriever.setDataSource(filePath); in createVideoThumbnailBitmap()
/packages/apps/Camera/src/com/android/camera/
DThumbnail.java29 public static Bitmap createVideoThumbnailBitmap(String filePath, int targetWidth) { in createVideoThumbnailBitmap() argument
30 return createVideoThumbnailBitmap(filePath, null, targetWidth); in createVideoThumbnailBitmap()
33 private static Bitmap createVideoThumbnailBitmap(String filePath, FileDescriptor fd, in createVideoThumbnailBitmap() argument
38 if (filePath != null) { in createVideoThumbnailBitmap()
39 retriever.setDataSource(filePath); in createVideoThumbnailBitmap()
/packages/apps/Camera2/src/com/android/camera/data/
DRotationTask.java93 String filePath = imageData.getPath(); in rotateInJpegExif() local
107 exifInterface.forceRewriteExif(filePath); in rotateInJpegExif()
108 long fileSize = new File(filePath).length(); in rotateInJpegExif()
113 Log.w(TAG, "Cannot find file to set exif: " + filePath); in rotateInJpegExif()
115 Log.w(TAG, "Cannot set exif data: " + filePath); in rotateInJpegExif()
DMediaDetails.java137 public static void extractExifInfo(MediaDetails details, String filePath) { in extractExifInfo() argument
140 exif.readExif(filePath); in extractExifInfo()
142 Log.w(TAG, "Could not find file to read exif: " + filePath, e); in extractExifInfo()
144 Log.w(TAG, "Could not read exif from file: " + filePath, e); in extractExifInfo()
/packages/inputmethods/LatinIME/native/jni/
Dcom_android_inputmethod_latin_BinaryDictionary.cpp99 jstring filePath) { in latinime_BinaryDictionary_flush() argument
102 const jsize filePathUtf8Length = env->GetStringUTFLength(filePath); in latinime_BinaryDictionary_flush()
104 env->GetStringUTFRegion(filePath, 0, env->GetStringLength(filePath), filePathChars); in latinime_BinaryDictionary_flush()
117 jstring filePath) { in latinime_BinaryDictionary_flushWithGC() argument
120 const jsize filePathUtf8Length = env->GetStringUTFLength(filePath); in latinime_BinaryDictionary_flushWithGC()
122 env->GetStringUTFRegion(filePath, 0, env->GetStringLength(filePath), filePathChars); in latinime_BinaryDictionary_flushWithGC()
Dcom_android_inputmethod_latin_BinaryDictionaryUtils.cpp33 jstring filePath, jlong dictVersion, jstring locale, jobjectArray attributeKeyStringArray, in latinime_BinaryDictionaryUtils_createEmptyDictFile() argument
35 const jsize filePathUtf8Length = env->GetStringUTFLength(filePath); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
37 env->GetStringUTFRegion(filePath, 0, env->GetStringLength(filePath), filePathChars); in latinime_BinaryDictionaryUtils_createEmptyDictFile()
/packages/apps/Mms/src/com/android/mms/ui/
DUriImage.java140 String filePath; in initFromContentUri() local
142 filePath = c.getString(c.getColumnIndexOrThrow(Part.FILENAME)); in initFromContentUri()
143 if (TextUtils.isEmpty(filePath)) { in initFromContentUri()
144 filePath = c.getString( in initFromContentUri()
150 filePath = uri.getPath(); in initFromContentUri()
178 mPath = filePath; in initFromContentUri()
/packages/apps/Gallery2/src/com/android/gallery3d/app/
DVideoUtils.java58 public static void startMute(String filePath, SaveVideoFileInfo dstFileInfo) in startMute() argument
61 genVideoUsingMuxer(filePath, dstFileInfo.mFile.getPath(), -1, -1, in startMute()
64 startMuteUsingMp4Parser(filePath, dstFileInfo); in startMute()
81 private static void startMuteUsingMp4Parser(String filePath, in startMuteUsingMp4Parser() argument
84 File src = new File(filePath); in startMuteUsingMp4Parser()
/packages/apps/LegacyCamera/src/com/android/camera/
DThumbnail.java260 public static Bitmap createVideoThumbnail(String filePath, int targetWidth) { in createVideoThumbnail() argument
261 return createVideoThumbnail(filePath, null, targetWidth); in createVideoThumbnail()
264 … private static Bitmap createVideoThumbnail(String filePath, FileDescriptor fd, int targetWidth) { in createVideoThumbnail() argument
268 if (filePath != null) { in createVideoThumbnail()
269 retriever.setDataSource(filePath); in createVideoThumbnail()
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/backward/v402/
Dver4_patricia_trie_policy.cpp362 bool Ver4PatriciaTriePolicy::flush(const char *const filePath) { in flush() argument
364 AKLOGI("Warning: flush() is called for non-updatable dictionary. filePath: %s", filePath); in flush()
367 if (!mWritingHelper.writeToDictFile(filePath, mUnigramCount, mBigramCount)) { in flush()
375 bool Ver4PatriciaTriePolicy::flushWithGC(const char *const filePath) { in flushWithGC() argument
380 if (!mWritingHelper.writeToDictFileWithGC(getRootPosition(), filePath)) { in flushWithGC()
/packages/inputmethods/LatinIME/native/jni/src/suggest/policyimpl/dictionary/structure/v4/
Dver4_patricia_trie_policy.cpp374 bool Ver4PatriciaTriePolicy::flush(const char *const filePath) { in flush() argument
376 AKLOGI("Warning: flush() is called for non-updatable dictionary. filePath: %s", filePath); in flush()
379 if (!mWritingHelper.writeToDictFile(filePath, mUnigramCount, mBigramCount)) { in flush()
387 bool Ver4PatriciaTriePolicy::flushWithGC(const char *const filePath) { in flushWithGC() argument
392 if (!mWritingHelper.writeToDictFileWithGC(getRootPosition(), filePath)) { in flushWithGC()
/packages/inputmethods/LatinIME/native/jni/src/suggest/core/dictionary/
Ddictionary.cpp158 bool Dictionary::flush(const char *const filePath) { in flush() argument
160 return mDictionaryStructureWithBufferPolicy->flush(filePath); in flush()
163 bool Dictionary::flushWithGC(const char *const filePath) { in flushWithGC() argument
165 return mDictionaryStructureWithBufferPolicy->flushWithGC(filePath); in flushWithGC()
/packages/providers/DownloadProvider/tests/src/com/android/providers/downloads/
DAbstractDownloadProviderFunctionalTest.java208 String filePath = cursor.getString(0); in cleanUpDownloads() local
209 if (filePath == null) continue; in cleanUpDownloads()
210 Log.d(LOG_TAG, "Deleting " + filePath); in cleanUpDownloads()
211 new File(filePath).delete(); in cleanUpDownloads()
/packages/providers/MediaProvider/src/com/android/providers/media/
DMediaScannerService.java237 String filePath = arguments.getString("filepath"); in handleMessage() local
240 if (filePath != null) { in handleMessage()
246 uri = scanFile(filePath, arguments.getString("mimetype")); in handleMessage()
251 listener.scanCompleted(filePath, uri); in handleMessage()
/packages/providers/DownloadProvider/tests/permission/src/com/android/providers/downloads/permission/tests/
DDownloadProviderPermissionsTest.java54 String filePath = "/cache/this-should-not-exist.txt"; in testAccessCacheFilesystem() local
55 FileOutputStream strm = new FileOutputStream(filePath); in testAccessCacheFilesystem()
59 fail("Was able to create and write to " + filePath); in testAccessCacheFilesystem()
/packages/inputmethods/LatinIME/java/src/com/android/inputmethod/latin/utils/
DBinaryDictionaryUtils.java43 private static native boolean createEmptyDictFileNative(String filePath, long dictVersion, in createEmptyDictFileNative() argument
95 public static boolean createEmptyDictFile(final String filePath, final long dictVersion, in createEmptyDictFile() argument
105 return createEmptyDictFileNative(filePath, dictVersion, locale.toString(), keyArray, in createEmptyDictFile()

12