Home
last modified time | relevance | path

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

12345

/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/functional/
DCodecTest.java87 public static int getDuration(String filePath) { in getDuration() argument
88 Log.v(TAG, "getDuration - " + filePath); in getDuration()
91 mp.setDataSource(filePath); in getDuration()
103 public static boolean getCurrentPosition(String filePath){ in getCurrentPosition() argument
104 Log.v(TAG, "GetCurrentPosition - " + filePath); in getCurrentPosition()
110 mp.setDataSource(filePath); in getCurrentPosition()
128 if (filePath.equals(MediaNames.SHORTMP3)){ in getCurrentPosition()
138 public static boolean seekTo(String filePath){ in seekTo() argument
139 Log.v(TAG, "seekTo " + filePath); in seekTo()
143 mp.setDataSource(filePath); in seekTo()
[all …]
/frameworks/base/core/tests/coretests/src/android/os/storage/
DStorageManagerIntegrationTest.java39 String filePath = file.getAbsolutePath(); in testMountSingleObb() local
40 mountObb(filePath); in testMountSingleObb()
41 verifyObb1Contents(filePath); in testMountSingleObb()
42 unmountObb(filePath, DONT_FORCE); in testMountSingleObb()
91 String filePath = file.getAbsolutePath(); in testMountUnsignedObb() local
93 mountObb(filePath, OnObbStateChangeListener.ERROR_INTERNAL); in testMountUnsignedObb()
106 String filePath = file.getAbsolutePath(); in testMountBadPackageNameObb() local
107 mountObb(filePath, OnObbStateChangeListener.ERROR_PERMISSION_DENIED); in testMountBadPackageNameObb()
116 String filePath = file.getAbsolutePath(); in testRemountObb() local
117 mountObb(filePath); in testRemountObb()
[all …]
/frameworks/av/drm/common/
DReadWriteUtils.cpp35 String8 ReadWriteUtils::readBytes(const String8& filePath) { in readBytes() argument
37 file = fopen(filePath.c_str(), "r"); in readBytes()
57 int ReadWriteUtils::readBytes(const String8& filePath, char** buffer) { in readBytes() argument
59 file = fopen(filePath.c_str(), "r"); in readBytes()
78 void ReadWriteUtils::writeToFile(const String8& filePath, const String8& data) { in writeToFile() argument
80 file = fopen(filePath.c_str(), "w+"); in writeToFile()
88 ALOGE("Failed to write the data to: %s", filePath.c_str()); in writeToFile()
95 void ReadWriteUtils::appendToFile(const String8& filePath, const String8& data) { in appendToFile() argument
97 file = fopen(filePath.c_str(), "a+"); in appendToFile()
104 ALOGE("Failed to write the data to: %s", filePath.c_str()); in appendToFile()
/frameworks/base/core/jni/
Dcom_android_internal_content_FileSystemUtils.cpp78 bool punchHoles(const char *filePath, const uint64_t offset, in punchHoles() argument
81 if (int result = lstat64(filePath, &beforePunch); result != 0) { in punchHoles()
82 ALOGE("lstat64 failed for filePath %s, error:%d", filePath, errno); in punchHoles()
96 android::base::unique_fd fd(open(filePath, O_RDWR | O_CLOEXEC)); in punchHoles()
98 ALOGE("Can't open file to punch %s", filePath); in punchHoles()
192 if (int result = lstat64(filePath, &afterPunch); result != 0) { in punchHoles()
193 ALOGD("lstat64 failed for filePath %s, error:%d", filePath, errno); in punchHoles()
205 bool punchHolesInElf64(const char *filePath, const uint64_t offset) { in punchHolesInElf64() argument
208 std::ifstream inputStream(filePath, std::ifstream::in); in punchHolesInElf64()
230 filePath, programHeaderOffset, programHeaderNum); in punchHolesInElf64()
[all …]
Dcom_android_internal_content_F2fsUtils.cpp48 ScopedUtfChars filePath(env, path); in com_android_internal_content_F2fsUtils_nativeReleaseCompressedBlocks() local
50 android::base::unique_fd fd(open(filePath.c_str(), O_RDONLY | O_CLOEXEC, 0)); in com_android_internal_content_F2fsUtils_nativeReleaseCompressedBlocks()
52 ALOGW("Failed to open file: %s (%d)\n", filePath.c_str(), errno); in com_android_internal_content_F2fsUtils_nativeReleaseCompressedBlocks()
59 ALOGW("Failed to get flags for file: %s (%d)\n", filePath.c_str(), errno); in com_android_internal_content_F2fsUtils_nativeReleaseCompressedBlocks()
Dcom_android_internal_security_VerityUtils.cpp59 int enableFsverity(JNIEnv *env, jobject clazz, jstring filePath) { in enableFsverity() argument
60 ScopedUtfChars path(env, filePath); in enableFsverity()
70 int statxForFsverity(JNIEnv *env, jobject /* clazz */, jstring filePath) { in statxForFsverity() argument
71 ScopedUtfChars path(env, filePath); in statxForFsverity()
113 int measureFsverity(JNIEnv *env, jobject /* clazz */, jstring filePath, jbyteArray digest) { in measureFsverity() argument
121 ScopedUtfChars path(env, filePath); in measureFsverity()
Dandroid_content_res_ObbScanner.cpp44 const char* filePath = env->GetStringUTFChars(file, NULL); in android_content_res_ObbScanner_getObbInfo() local
47 if (!obb->readFrom(filePath)) { in android_content_res_ObbScanner_getObbInfo()
48 env->ReleaseStringUTFChars(file, filePath); in android_content_res_ObbScanner_getObbInfo()
53 env->ReleaseStringUTFChars(file, filePath); in android_content_res_ObbScanner_getObbInfo()
Dcom_android_internal_content_FileSystemUtils.h29 bool punchHolesInElf64(const char* filePath, uint64_t offset);
36 bool punchHolesInZip(const char* filePath, uint64_t offset, uint16_t extraFieldLen);
/frameworks/base/core/java/com/android/internal/security/
DVerityUtils.java76 public static String getFsveritySignatureFilePath(String filePath) { in getFsveritySignatureFilePath() argument
77 return filePath + FSVERITY_SIGNATURE_FILE_EXTENSION; in getFsveritySignatureFilePath()
81 public static void setUpFsverity(@NonNull String filePath) throws IOException { in setUpFsverity() argument
82 int errno = enableFsverityNative(filePath); in setUpFsverity()
84 throw new IOException("Failed to enable fs-verity on " + filePath + ": " in setUpFsverity()
99 public static boolean hasFsverity(@NonNull String filePath) { in hasFsverity() argument
100 int retval = statxForFsverityNative(filePath); in hasFsverity()
103 + filePath); in hasFsverity()
202 public static @Nullable byte[] getFsverityDigest(@NonNull String filePath) { in getFsverityDigest() argument
204 int retval = measureFsverityNative(filePath, result); in getFsverityDigest()
[all …]
/frameworks/base/core/java/android/content/res/
DObbScanner.java38 public static ObbInfo getObbInfo(String filePath) throws IOException { in getObbInfo() argument
39 if (filePath == null) { in getObbInfo()
43 final File obbFile = new File(filePath); in getObbInfo()
45 throw new IllegalArgumentException("OBB file does not exist: " + filePath); in getObbInfo()
61 private native static void getObbInfo_native(String filePath, ObbInfo obbInfo) in getObbInfo_native() argument
/frameworks/base/services/core/java/com/android/server/
DResourcePressureUtil.java43 private static String readResourcePsiState(String filePath) { in readResourcePsiState() argument
46 if (new File(filePath).exists()) { in readResourcePsiState()
47 contents.append("----- Output from " + filePath + " -----\n"); in readResourcePsiState()
48 contents.append(IoUtils.readFileAsString(filePath)); in readResourcePsiState()
49 contents.append("----- End output from " + filePath + " -----\n"); in readResourcePsiState()
52 Slog.e(TAG, " could not read " + filePath, e); in readResourcePsiState()
/frameworks/minikin/tests/util/
DFontTestUtils.h49 std::shared_ptr<FontCollection> buildFontCollection(const std::string& filePath);
55 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath);
60 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, const std::string& lang,
66 inline std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, in buildFontFamily() argument
68 return buildFontFamily(filePath, lang, false /* isCustomFallback */); in buildFontFamily()
DFontTestUtils.cpp122 std::shared_ptr<FontCollection> buildFontCollection(const std::string& filePath) { in buildFontCollection() argument
123 return FontCollection::create(buildFontFamily(filePath)); in buildFontCollection()
126 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath) { in buildFontFamily() argument
127 auto font = std::make_shared<FreeTypeMinikinFontForTest>(getTestFontPath(filePath)); in buildFontFamily()
133 std::shared_ptr<FontFamily> buildFontFamily(const std::string& filePath, const std::string& lang, in buildFontFamily() argument
135 auto font = std::make_shared<FreeTypeMinikinFontForTest>(getTestFontPath(filePath)); in buildFontFamily()
/frameworks/av/drm/common/include/
DReadWriteUtils.h48 static String8 readBytes(const String8& filePath);
56 static int readBytes(const String8& filePath, char** buffer);
63 static void writeToFile(const String8& filePath, const String8& data);
70 static void appendToFile(const String8& filePath, const String8& data);
/frameworks/base/packages/SystemUI/scripts/token_alignment/
Dindex.ts155 const filePath = `${repoPath}/${locaFilePath}`;
157 const doc = await FileIO.loadXML(filePath);
165 await FileIO.saveFile(DOM.XMLDocToString(doc), filePath);
198 const filePath = `${repoPath}/${locaFilePath}`;
199 const doc = await FileIO.loadXML(filePath);
206 await FileIO.saveFile(DOM.XMLDocToString(doc), filePath);
231 const filePath = `${repoPath}/${locaFilePath}`;
232 const fileContent = await FileIO.loadFileAsText(filePath);
234 await FileIO.saveFile(str, filePath);
/frameworks/base/services/core/java/com/android/server/pm/dex/
DDynamicCodeLogger.java109 String filePath = fileEntry.getKey(); in logDynamicCodeLoading() local
141 if (fileIsUnder(filePath, appInfo.credentialProtectedDataDir)) { in logDynamicCodeLoading()
143 } else if (fileIsUnder(filePath, appInfo.deviceProtectedDataDir)) { in logDynamicCodeLoading()
146 Slog.e(TAG, "Could not infer CE/DE storage for path " + filePath); in logDynamicCodeLoading()
147 needWrite |= mPackageDynamicCodeLoading.removeFile(packageName, filePath, userId); in logDynamicCodeLoading()
157 hash = mInstaller.hashSecondaryDexFile(filePath, packageName, appInfo.uid, in logDynamicCodeLoading()
160 Slog.e(TAG, "Got InstallerException when hashing file " + filePath in logDynamicCodeLoading()
167 String fileName = new File(filePath).getName(); in logDynamicCodeLoading()
174 Slog.d(TAG, "Got no hash for " + filePath); in logDynamicCodeLoading()
176 needWrite |= mPackageDynamicCodeLoading.removeFile(packageName, filePath, userId); in logDynamicCodeLoading()
[all …]
/frameworks/base/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/
DInvalidNewSystemAppTest.kt53 private val filePath = HostUtils.makePathForApk("PackageManagerTestApp.apk", Partition.PRODUCT) constant in com.android.server.pm.test.InvalidNewSystemAppTest
59 preparer.deleteFile(filePath.parent.toString()) in removeApk()
66 preparer.pushResourceFile(VERSION_ONE, filePath.toString()) in verify()
74 preparer.deleteFile(filePath.toString()) in verify()
75 .pushResourceFile(VERSION_THREE_INVALID, filePath.toString()) in verify()
/frameworks/base/tools/protologtool/src/com/android/protolog/tool/
DParsingContext.kt21 data class ParsingContext(val filePath: String, val lineNumber: Int) { constant in com.android.protolog.tool.ParsingContext
22 constructor(filePath: String, node: Node)
23 : this(filePath, if (node.range.isPresent) node.range.get().begin.line else -1)
/frameworks/base/services/core/java/com/android/server/audio/
DSoundEffectsHelper.java215 String filePath = getResourceFilePath(res); in onLoadSoundEffects() local
216 int sampleId = mSoundPool.load(filePath, 0); in onLoadSoundEffects()
222 logEvent("effect " + filePath + " rejected by SoundPool"); in onLoadSoundEffects()
223 Log.w(TAG, "SoundPool could not load file: " + filePath); in onLoadSoundEffects()
275 String filePath = getResourceFilePath(res); in onPlaySoundEffect() local
276 mediaPlayer.setDataSource(filePath); in onPlaySoundEffect()
327 String filePath = Environment.getProductDirectory() + SOUND_EFFECTS_PATH + res.mFileName; in getResourceFilePath() local
328 if (!new File(filePath).isFile()) { in getResourceFilePath()
329 filePath = Environment.getRootDirectory() + SOUND_EFFECTS_PATH + res.mFileName; in getResourceFilePath()
331 return filePath; in getResourceFilePath()
[all …]
/frameworks/base/core/java/android/util/
DPackageUtils.java194 public static @Nullable byte[] computeSha256DigestForLargeFileAsBytes(@NonNull String filePath, in computeSha256DigestForLargeFileAsBytes() argument
205 File f = new File(filePath); in computeSha256DigestForLargeFileAsBytes()
220 public static @Nullable String computeSha256DigestForLargeFile(@NonNull String filePath, in computeSha256DigestForLargeFile() argument
222 return computeSha256DigestForLargeFile(filePath, fileBuffer, null); in computeSha256DigestForLargeFile()
235 public static @Nullable String computeSha256DigestForLargeFile(@NonNull String filePath, in computeSha256DigestForLargeFile() argument
237 byte[] resultBytes = computeSha256DigestForLargeFileAsBytes(filePath, fileBuffer); in computeSha256DigestForLargeFile()
/frameworks/base/core/java/android/app/backup/
DBackupAgent.java718 String filePath; in fullBackupFile() local
759 filePath = file.getCanonicalPath(); in fullBackupFile()
765 if (filePath.startsWith(cacheDir) in fullBackupFile()
766 || filePath.startsWith(codeCacheDir) in fullBackupFile()
767 || filePath.startsWith(nbFilesDir) in fullBackupFile()
768 || filePath.startsWith(deviceCacheDir) in fullBackupFile()
769 || filePath.startsWith(deviceCodeCacheDir) in fullBackupFile()
770 || filePath.startsWith(deviceNbFilesDir) in fullBackupFile()
771 || filePath.startsWith(libDir)) { in fullBackupFile()
778 if (filePath.startsWith(dbDir)) { in fullBackupFile()
[all …]
/frameworks/av/media/mtp/
DMtpStorage.cpp34 MtpStorage::MtpStorage(MtpStorageID id, const char* filePath, in MtpStorage() argument
37 mFilePath(filePath), in MtpStorage()
43 ALOGV("MtpStorage id: %d path: %s\n", id, filePath); in MtpStorage()
/frameworks/base/services/core/java/com/android/server/wm/
DTaskPersister.java222 void saveImage(Bitmap image, String filePath) { in saveImage() argument
223 mPersisterQueue.updateLastOrAddItem(new ImageWriteQueueItem(filePath, image), in saveImage()
226 Slog.d(TAG, "saveImage: filePath=" + filePath + " now=" in saveImage()
231 Bitmap getTaskDescriptionIcon(String filePath) { in getTaskDescriptionIcon() argument
233 final Bitmap icon = getImageFromWriteQueue(filePath); in getTaskDescriptionIcon()
237 return restoreImage(filePath); in getTaskDescriptionIcon()
240 private Bitmap getImageFromWriteQueue(String filePath) { in getImageFromWriteQueue() argument
242 queueItem -> queueItem.mFilePath.equals(filePath), ImageWriteQueueItem.class); in getImageFromWriteQueue()
532 private static boolean createParentDirectory(String filePath) { in createParentDirectory() argument
533 File parentDir = new File(filePath).getParentFile(); in createParentDirectory()
[all …]
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/
DParserFactory.java47 public static XmlPullParser create(@NonNull String filePath) in create() argument
49 return create(filePath, false); in create()
53 public static XmlPullParser create(@NonNull String filePath, boolean isLayout) in create() argument
55 XmlPullParser parser = sParserFactory.createXmlParserForFile(filePath); in create()
/frameworks/native/libs/binder/tests/parcel_fuzzer/binder2corpus/
Dbinder2corpus.cpp51 std::string filePath = std::string(corpusDir) + std::string("transaction_") + in generateCorpus() local
54 unique_fd corpusFd(open(filePath.c_str(), openFlags, 0666)); in generateCorpus()
56 std::cerr << "Failed to open fd. Path " << filePath in generateCorpus()

12345