/packages/inputmethods/LatinIME/native/jni/src/dictionary/utils/ |
D | file_utils.cpp | 31 /* 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 …]
|
D | dict_file_writing_utils.cpp | 41 /* 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 …]
|
D | file_utils.h | 27 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,
|
D | dict_file_writing_utils.h | 34 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/ |
D | GalleryGridItemData.java | 39 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/ |
D | PhotoDataFactory.java | 41 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()
|
D | FilmstripItemData.java | 54 String filePath, in FilmstripItemData() argument 65 mFilePath = filePath; in FilmstripItemData() 256 public Builder withFilePath(String filePath) { in withFilePath() argument 257 mFilePath = filePath; in withFilePath()
|
D | MediaDetails.java | 137 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/ |
D | TmaLibrary.java | 58 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/ |
D | LocalImage.java | 142 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()
|
D | LocalVideo.java | 110 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()
|
D | MediaDetails.java | 134 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/ |
D | Query.java | 108 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/ |
D | StorageLifetimeFragment.java | 120 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/ |
D | Thumbnail.java | 29 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/ |
D | StackSaverImpl.java | 64 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/ |
D | GifTranscoder.java | 43 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/ |
D | ContactPhotoUtilsTest.java | 28 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/ |
D | MimeTypeUtil.java | 39 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/ |
D | MmsFileProvider.java | 65 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()
|
D | MediaScratchFileProvider.java | 93 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/ |
D | com_android_inputmethod_latin_BinaryDictionaryUtils.cpp | 33 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/ |
D | MetaBugReport.java | 114 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/ |
D | VideoUtils.java | 58 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/ |
D | Helpers.java | 493 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()
|