Home
last modified time | relevance | path

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

123

/packages/inputmethods/LatinIME/native/jni/src/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.cpp41 /* static */ bool DictFileWritingUtils::createEmptyDictFile(const char *const filePath, in createEmptyDictFile() argument
51 filePath, localeAsCodePointVector, attributeMap, formatVersion); in createEmptyDictFile()
56 filePath, localeAsCodePointVector, attributeMap, formatVersion); in createEmptyDictFile()
59 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,
/packages/apps/Dialer/java/com/android/dialer/callcomposer/
DGalleryGridItemData.java39 private String filePath; field in GalleryGridItemData
46 filePath = Assert.isNotNull(copyData.getFilePath()); in GalleryGridItemData()
59 filePath = Assert.isNotNull(cursor.getString(INDEX_DATA_PATH)); in bind()
64 return filePath; in getFilePath()
69 return TextUtils.isEmpty(filePath) ? null : Uri.fromFile(new File(filePath)); in getFileUri()
85 && Objects.equals(filePath, ((GalleryGridItemData) obj).filePath) in equals()
91 return Objects.hash(filePath, mimeType, dateModifiedSeconds); in hashCode()
101 dest.writeString(filePath); in writeToParcel()
120 filePath = in.readString(); in GalleryGridItemData()
/packages/apps/Camera2/src/com/android/camera/data/
DPhotoDataFactory.java41 String filePath = c.getString(PhotoDataQuery.COL_DATA); in fromCursor() local
52 + filePath + ":" + width + "x" + height); in fromCursor()
54 dimensions = decodeBitmapDimensions(filePath); in fromCursor()
78 filePath, in fromCursor()
89 private Size decodeBitmapDimensions(String filePath) { in decodeBitmapDimensions() argument
97 BitmapFactory.decodeFile(filePath, opts); in decodeBitmapDimensions()
102 Log.w(TAG, "Dimension decode failed for " + filePath); in decodeBitmapDimensions()
105 Bitmap b = BitmapFactory.decodeFile(filePath); in decodeBitmapDimensions()
108 + " Decoding " + filePath + " failed."); in decodeBitmapDimensions()
114 Log.w(TAG, "PhotoData skipped. Bitmap size 0 for " + filePath); in decodeBitmapDimensions()
DFilmstripItemData.java54 String filePath, in FilmstripItemData() argument
65 mFilePath = filePath; in FilmstripItemData()
256 public Builder withFilePath(String filePath) { in withFilePath() argument
257 mFilePath = filePath; in withFilePath()
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/apps/Car/tests/TestMediaApp/src/com/android/car/media/testmediaapp/
DTmaLibrary.java58 String filePath = mRootAssetPaths.get(rootType); in getRoot() local
59 return (filePath != null) ? loadAssetFile(filePath) : null; in getRoot()
72 private TmaMediaItem loadAssetFile(String filePath) { in loadAssetFile() argument
73 TmaMediaItem result = mCachedFilesByPath.get(filePath); in loadAssetFile()
75 result = mLoader.loadAssetFile(filePath); in loadAssetFile()
77 mCachedFilesByPath.put(filePath, result); in loadAssetFile()
80 Log.e(TAG, "Unable to load: " + filePath); in loadAssetFile()
/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()
/packages/apps/UniversalMediaPlayer/java/com/android/pump/provider/
DQuery.java108 String filePath = uri.getPath(); in parse() local
110 query = parseEpisode(filePath); in parse()
112 query = parseMovie(filePath); in parse()
120 private static Query parseEpisode(String filePath) { in parseEpisode() argument
122 Matcher matcher = PATTERN_EPISODE.matcher(filePath); in parseEpisode()
146 private static Query parseMovie(String filePath) { in parseMovie() argument
148 Matcher matcher = PATTERN_MOVIE.matcher(filePath); in parseMovie()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/storagelifetime/
DStorageLifetimeFragment.java120 Path filePath = new File(mActivity.getFilesDir(), FILE_NAME).toPath(); in getFilePath() local
121 if (Files.notExists(filePath)) { in getFilePath()
122 Files.createFile(filePath); in getFilePath()
124 return filePath; in getFilePath()
129 final Path filePath = getFilePath(); in writeBytesToFile() local
132 Files.write(filePath, in writeBytesToFile()
142 final Path filePath = getFilePath(); in fsyncFile() local
143 FileDescriptor fd = Os.open(filePath.toString(), O_APPEND | O_RDWR, 0); in fsyncFile()
/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/Camera2/src/com/android/camera/session/
DStackSaverImpl.java64 String filePath = in saveStackedImage() local
66 Log.d(TAG, "Saving using stack image saver: " + filePath); in saveStackedImage()
67 File outputImagePath = new File(filePath); in saveStackedImage()
73 mGpsLocation, imageOrientation, fileLength, filePath, width, height, in saveStackedImage()
80 filePath)); in saveStackedImage()
/packages/apps/Messaging/src/com/android/messaging/util/
DGifTranscoder.java43 public static boolean transcode(Context context, String filePath, String outFilePath) { in transcode() argument
47 final long inputSize = new File(filePath).length(); in transcode()
49 final boolean success = transcodeInternal(filePath, outFilePath); in transcode()
57 LogUtil.sanitizePII(filePath), in transcode()
66 private static native boolean transcodeInternal(String filePath, String outFilePath); in transcodeInternal() argument
/packages/apps/Contacts/tests/src/com/android/contacts/util/
DContactPhotoUtilsTest.java28 String filePath = in testFileUriDataPathFails() local
32 ContactPhotoUtils.savePhotoFromUriToUri(getContext(), Uri.parse(filePath), tempUri, false)); in testFileUriDataPathFails()
36 String filePath = in testFileUriCanonicalDataPathFails() local
40 ContactPhotoUtils.savePhotoFromUriToUri(getContext(), Uri.parse(filePath), tempUri, false)); in testFileUriCanonicalDataPathFails()
/packages/apps/Nfc/src/com/android/nfc/beam/
DMimeTypeUtil.java39 String filePath = uri.getPath().toLowerCase(); in getMimeTypeForUri() local
40 int index = filePath.lastIndexOf("."); in getMimeTypeForUri()
41 if (index > 0 && index + 1 < filePath.length()) { in getMimeTypeForUri()
42 extension = filePath.substring(index + 1); in getMimeTypeForUri()
/packages/apps/Messaging/src/com/android/messaging/datamodel/
DMmsFileProvider.java65 final File filePath = new File(getDirectory(context), path + ".dat"); in getFile() local
68 if (!filePath.getCanonicalPath() in getFile()
71 + filePath.getCanonicalPath() in getFile()
80 return filePath; in getFile()
DMediaScratchFileProvider.java93 final File filePath = new File(getDirectory(context), in getFileWithExtension() local
97 if (!filePath.getCanonicalPath() in getFileWithExtension()
100 + filePath.getCanonicalPath() in getFileWithExtension()
109 return filePath; in getFileWithExtension()
/packages/inputmethods/LatinIME/native/jni/
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/services/Car/tests/BugReportApp/src/com/google/android/car/bugreport/
DMetaBugReport.java114 String filePath = in.readString();
120 .setFilepath(filePath)
165 public Builder setFilepath(String filePath) { in setFilepath() argument
166 mFilePath = filePath; in setFilepath()
/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/providers/DownloadProvider/src/com/android/providers/downloads/
DHelpers.java493 public static boolean isFileInExternalAndroidDirs(String filePath) { in isFileInExternalAndroidDirs() argument
494 return PATTERN_ANDROID_DIRS.matcher(filePath).matches(); in isFileInExternalAndroidDirs()
541 public static boolean isFilenameValidInKnownPublicDir(@Nullable String filePath) { in isFilenameValidInKnownPublicDir() argument
542 if (filePath == null) { in isFilenameValidInKnownPublicDir()
545 final Matcher matcher = PATTERN_PUBLIC_DIRS.matcher(filePath); in isFilenameValidInKnownPublicDir()
649 final String filePath = cursor.getString(3); in handleRemovedUidEntries() local
654 && isFilenameValidInKnownPublicDir(filePath)) { in handleRemovedUidEntries()

123