Home
last modified time | relevance | path

Searched refs:newFile (Results 1 – 25 of 40) sorted by relevance

12

/frameworks/base/services/tests/servicestests/src/com/android/server/storage/
DFileCollectorTest.java52 writeDataToFile(temporaryFolder.newFile("test.jpg"), "1234"); in testImageFile()
61 writeDataToFile(temporaryFolder.newFile("test.mp4"), "1234"); in testVideoFile()
70 writeDataToFile(temporaryFolder.newFile("test.mp3"), "1234"); in testAudioFile()
79 writeDataToFile(temporaryFolder.newFile("test"), "1234"); in testMiscFile()
98 writeDataToFile(temporaryFolder.newFile("test"), "1234"); in testMultipleFiles()
99 writeDataToFile(temporaryFolder.newFile("test2"), "12345"); in testMultipleFiles()
108 writeDataToFile(temporaryFolder.newFile("test.jpg"), "1"); in testTotalSize()
109 writeDataToFile(temporaryFolder.newFile("test.mp3"), "1"); in testTotalSize()
110 writeDataToFile(temporaryFolder.newFile("test.mp4"), "1"); in testTotalSize()
111 writeDataToFile(temporaryFolder.newFile("test"), "1"); in testTotalSize()
[all …]
DDiskStatsLoggingServiceTest.java84 mInputFile = mTemporaryFolder.newFile(); in setUp()
121 writeDataToFile(mDownloads.newFile(), "lol"); in testPopulatedLogTask()
/frameworks/base/media/tests/MtpTests/src/android/mtp/
DMtpStorageManagerTest.java79 private static void vWriteNewFile(File newFile) { in vWriteNewFile() argument
81 new FileOutputStream(newFile).write(new byte[] {0, 0, 0}); in vWriteNewFile()
188 File newFile = createNewFile(mainStorageDir); in testMtpObjectGetNameNonRoot() local
191 Assert.assertEquals(stream.get(0).getName(), newFile.getName()); in testMtpObjectGetNameNonRoot()
206 File newFile = createNewFile(mainStorageDir); in testMtpObjectGetIdNonRoot() local
224 File newFile = createNewFile(mainStorageDir, "TEST123.mp3"); in testMtpObjectIsDirFalse() local
234 File newFile = createNewDir(mainStorageDir); in testMtpObjectGetFormatDir() local
244 File newFile = createNewFile(mainStorageDir, "TEST123.mp3"); in testMtpObjectGetFormatNonDir() local
254 File newFile = createNewFile(mainStorageDir); in testMtpObjectGetStorageId() local
264 File newFile = createNewFile(mainStorageDir); in testMtpObjectGetLastModified() local
[all …]
DMtpDatabaseTest.java84 private static void writeNewFile(File newFile) { in writeNewFile() argument
86 new FileOutputStream(newFile).write(new byte[] {0, 0, 0}); in writeNewFile()
92 private static void writeNewFileFromByte(File newFile, byte[] byteData) { in writeNewFileFromByte() argument
94 new FileOutputStream(newFile).write(byteData); in writeNewFileFromByte()
/frameworks/base/packages/PackageInstaller/src/com/android/packageinstaller/wear/
DWearPackageUtil.java46 File newFile = new File(newFileDir, packageName + ".apk"); in getTemporaryFile() local
47 return newFile; in getTemporaryFile()
80 File newFile = getTemporaryFile(context, packageName); in getFileFromFd() local
99 final FileOutputStream fo = new FileOutputStream(newFile); in getFileFromFd()
105 Os.chmod(newFile.getAbsolutePath(), 0644); in getFileFromFd()
106 return newFile; in getFileFromFd()
/frameworks/av/media/mtp/tests/MtpFuzzer/
Dmtp_fuzzer.cpp100 std::string newFile = toPathStr + name; in createDatabaseFromSourceDir() local
103 ret += makeFolder(newFile.c_str()); in createDatabaseFromSourceDir()
114 ret += createDatabaseFromSourceDir(oldFile.c_str(), newFile.c_str(), in createDatabaseFromSourceDir()
117 ret += copyFile(oldFile.c_str(), newFile.c_str()); in createDatabaseFromSourceDir()
/frameworks/base/core/tests/coretests/src/android/os/
DMemoryFileTest.java53 MemoryFile newFile = new MemoryFile("MemoryFileTest", 10000000); in testPurge() local
54 newFile.allowPurging(true); in testPurge()
55 newFile.writeBytes(testString, 0, 0, testString.length); in testPurge()
56 files.add(newFile); in testPurge()
/frameworks/av/media/mtp/
DMtpUtils.cpp144 string newFile = toPathStr + name; in copyRecursive() local
147 ret += makeFolder(newFile.c_str()); in copyRecursive()
148 ret += copyRecursive(oldFile.c_str(), newFile.c_str()); in copyRecursive()
150 ret += copyFile(oldFile.c_str(), newFile.c_str()); in copyRecursive()
/frameworks/base/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/
DFactoryPackageTest.kt54 val versionTwoFile = HostUtils.copyResourceToHostFile(VERSION_TWO, tempFolder.newFile()) in testGetInstalledPackagesFactoryOnlyFlag()
67 val deviceSideFile = HostUtils.copyResourceToHostFile(DEVICE_SIDE, tempFolder.newFile()) in runDeviceTest()
DInvalidNewSystemAppTest.kt69 val versionTwoFile = HostUtils.copyResourceToHostFile(VERSION_TWO, tempFolder.newFile()) in verify()
82 val versionFourFile = HostUtils.copyResourceToHostFile(VERSION_FOUR, tempFolder.newFile()) in verify()
DBootTest.kt42 val testApkFile = HostUtils.copyResourceToHostFile(TEST_APK_NAME, tempFolder.newFile()) in installApk()
DSdCardEjectionTests.kt86 val hostApkFile = HostUtils.copyResourceToHostFile(VERSION_ONE, tempFolder.newFile()) in launchActivity()
117 val usesApkFile = HostUtils.copyResourceToHostFile(VERSION_USES, tempFolder.newFile()) in uninstallStaticLibraryInUse()
DOverlayActorVisibilityTest.kt72 val file = tempFolder.newFile().apply { in pushSysConfigFile()
DOriginalPackageMigrationTest.kt88 val file = tempFolder.newFile().apply { writeText("Test") } in runForApk()
DHostUtils.kt45 val file = HostUtils.copyResourceToHostFile(javaResource, tempFolder.newFile()) in installJavaResourceApk()
/frameworks/base/services/tests/PackageManagerServiceTests/unit/src/com/android/server/pm/test/verify/domain/
DDomainVerificationPersistenceTest.kt113 val file = tempFolder.newFile().writeXml { in <lambda>()
132 val file = tempFolder.newFile().writeXml { in <lambda>()
161 val file = tempFolder.newFile().writeXml { in <lambda>()
DDomainVerificationLegacySettingsTest.kt72 val file = tempFolder.newFile().writeXml(settings::writeSettings) in writeAndReadBackNormal()
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/
DDataChangedJournalTest.java64 mFile = mTemporaryFolder.newFile(); in setUp()
104 assertThat(mJournal.equals(new DataChangedJournal(mTemporaryFolder.newFile()))).isFalse(); in equals_isFalseForDifferentFiles()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/chunking/
DBackupFileBuilderTest.java523 mOldFile = mTemporaryFolder.newFile(); in setUpOldBackupWithChunks()
548 File newFile = mTemporaryFolder.newFile(); in parseDiffScript() local
549 new DiffScriptProcessor(mOldFile, newFile).process(new ByteArrayInputStream(diffScript)); in parseDiffScript()
550 return Files.toByteArray(newFile); in parseDiffScript()
DDecryptedChunkFileOutputTest.java59 mOutputFile = temporaryFolder.newFile(); in setUp()
/frameworks/base/services/tests/servicestests/src/com/android/server/backup/utils/
DDataStreamFileCodecTest.java44 File unicornFile = mTemporaryFolder.newFile(); in serialize_writesToTheFile()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/keys/
DTertiaryKeyRotationWindowedCountTest.java53 mFile = mTemporaryFolder.newFile(); in setUp()
/frameworks/base/packages/BackupEncryption/test/robolectric/src/com/android/server/backup/encryption/tasks/
DFullRestoreToFileTaskTest.java65 mTargetFile = mTemporaryFolder.newFile(); in setUp()
/frameworks/base/services/core/java/com/android/server/wm/
DLaunchParamsPersister.java167 final File newFile = new File(launchParamsFolder, paramsFileName); in loadLaunchParams() local
168 if (paramsFile.renameTo(newFile)) { in loadLaunchParams()
169 paramsFile = newFile; in loadLaunchParams()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/parsing/
DPackageParsingDeferErrorTest.kt125 val file = tempFolder.newFile() in <lambda>()

12