Home
last modified time | relevance | path

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

1234

/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.string(), "r"); in readBytes()
57 int ReadWriteUtils::readBytes(const String8& filePath, char** buffer) { in readBytes() argument
59 file = fopen(filePath.string(), "r"); in readBytes()
78 void ReadWriteUtils::writeToFile(const String8& filePath, const String8& data) { in writeToFile() argument
80 file = fopen(filePath.string(), "w+"); in writeToFile()
88 ALOGE("Failed to write the data to: %s", filePath.string()); in writeToFile()
95 void ReadWriteUtils::appendToFile(const String8& filePath, const String8& data) { in appendToFile() argument
97 file = fopen(filePath.string(), "a+"); in appendToFile()
104 ALOGE("Failed to write the data to: %s", filePath.string()); in appendToFile()
/frameworks/base/core/java/com/android/internal/security/
DVerityUtils.java71 public static String getFsveritySignatureFilePath(String filePath) { in getFsveritySignatureFilePath() argument
72 return filePath + FSVERITY_SIGNATURE_FILE_EXTENSION; in getFsveritySignatureFilePath()
76 public static void setUpFsverity(@NonNull String filePath) throws IOException { in setUpFsverity() argument
77 int errno = enableFsverityNative(filePath); in setUpFsverity()
79 throw new IOException("Failed to enable fs-verity on " + filePath + ": " in setUpFsverity()
94 public static boolean hasFsverity(@NonNull String filePath) { in hasFsverity() argument
95 int retval = statxForFsverityNative(filePath); in hasFsverity()
98 + filePath); in hasFsverity()
197 public static byte[] getFsverityDigest(@NonNull String filePath) { in getFsverityDigest() argument
199 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/core/jni/
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()
100 int measureFsverity(JNIEnv *env, jobject /* clazz */, jstring filePath, jbyteArray digest) { in measureFsverity() argument
108 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()
/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
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()
DFactoryPackageTest.kt37 private val filePath = constant in com.android.server.pm.test.FactoryPackageTest
44 device.deleteFile(filePath.parent.toString()) in removeApk()
51 preparer.pushResourceFile(VERSION_ONE, filePath.toString()) in testGetInstalledPackagesFactoryOnlyFlag()
/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()
221 public static @Nullable String computeSha256DigestForLargeFile(@NonNull String filePath, in computeSha256DigestForLargeFile() argument
223 return computeSha256DigestForLargeFile(filePath, fileBuffer, null); in computeSha256DigestForLargeFile()
236 public static @Nullable String computeSha256DigestForLargeFile(@NonNull String filePath, in computeSha256DigestForLargeFile() argument
238 byte[] resultBytes = computeSha256DigestForLargeFileAsBytes(filePath, fileBuffer); in computeSha256DigestForLargeFile()
/frameworks/base/services/core/java/com/android/server/wm/
DTaskPersister.java220 void saveImage(Bitmap image, String filePath) { in saveImage() argument
221 mPersisterQueue.updateLastOrAddItem(new ImageWriteQueueItem(filePath, image), in saveImage()
224 Slog.d(TAG, "saveImage: filePath=" + filePath + " now=" in saveImage()
229 Bitmap getTaskDescriptionIcon(String filePath) { in getTaskDescriptionIcon() argument
231 final Bitmap icon = getImageFromWriteQueue(filePath); in getTaskDescriptionIcon()
235 return restoreImage(filePath); in getTaskDescriptionIcon()
238 private Bitmap getImageFromWriteQueue(String filePath) { in getImageFromWriteQueue() argument
240 queueItem -> queueItem.mFilePath.equals(filePath), ImageWriteQueueItem.class); in getImageFromWriteQueue()
510 private static boolean createParentDirectory(String filePath) { in createParentDirectory() argument
511 File parentDir = new File(filePath).getParentFile(); in createParentDirectory()
[all …]
/frameworks/base/core/java/android/app/backup/
DBackupAgent.java708 String filePath; in fullBackupFile() local
749 filePath = file.getCanonicalPath(); in fullBackupFile()
755 if (filePath.startsWith(cacheDir) in fullBackupFile()
756 || filePath.startsWith(codeCacheDir) in fullBackupFile()
757 || filePath.startsWith(nbFilesDir) in fullBackupFile()
758 || filePath.startsWith(deviceCacheDir) in fullBackupFile()
759 || filePath.startsWith(deviceCodeCacheDir) in fullBackupFile()
760 || filePath.startsWith(deviceNbFilesDir) in fullBackupFile()
761 || filePath.startsWith(libDir)) { in fullBackupFile()
768 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/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/base/services/core/java/com/android/server/pm/
DApkChecksums.java393 final String filePath = file.getAbsolutePath(); in getAvailableApkChecksums() local
398 ApkChecksum checksum = extractHashFromFS(split, filePath); in getAvailableApkChecksums()
408 split, filePath, types); in getAvailableApkChecksums()
542 final String filePath = file.getAbsolutePath(); in needToWait() local
543 if (!IncrementalManager.isIncrementalPath(filePath)) { in needToWait()
552 IncrementalStorage storage = manager.openStorage(filePath); in needToWait()
554 Slog.e(TAG, "IncrementalStorage is missing for a path on IncFs: " + filePath); in needToWait()
558 return !storage.isFileFullyLoaded(filePath); in needToWait()
572 final String filePath = file.getAbsolutePath(); in getRequiredApkChecksums() local
578 filePath, /*salt=*/null, in getRequiredApkChecksums()
[all …]
/frameworks/native/libs/ultrahdr/tests/
Djpegr_test.cpp1043 std::string filePath = "/sdcard/Documents/encoded_from_p010_input.jpgr"; in TEST_F() local
1044 std::ofstream imageFile(filePath.c_str(), std::ofstream::binary); in TEST_F()
1046 ALOGE("%s: Unable to create file %s", __FUNCTION__, filePath.c_str()); in TEST_F()
1060 std::string filePath = "/sdcard/Documents/decoded_from_p010_input.rgb"; in TEST_F() local
1061 std::ofstream imageFile(filePath.c_str(), std::ofstream::binary); in TEST_F()
1063 ALOGE("%s: Unable to create file %s", __FUNCTION__, filePath.c_str()); in TEST_F()
1098 std::string filePath = "/sdcard/Documents/encoded_from_p010_input.jpgr"; in TEST_F() local
1099 std::ofstream imageFile(filePath.c_str(), std::ofstream::binary); in TEST_F()
1101 ALOGE("%s: Unable to create file %s", __FUNCTION__, filePath.c_str()); in TEST_F()
1115 std::string filePath = "/sdcard/Documents/decoded_from_p010_input.rgb"; in TEST_F() local
[all …]

1234