Home
last modified time | relevance | path

Searched refs:newFile (Results 1 – 25 of 43) 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 …]
/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()
190 File newFile = createNewFile(mainStorageDir); in testMtpObjectGetNameNonRoot() local
193 Assert.assertEquals(stream.get(0).getName(), newFile.getName()); in testMtpObjectGetNameNonRoot()
208 File newFile = createNewFile(mainStorageDir); in testMtpObjectGetIdNonRoot() local
226 File newFile = createNewFile(mainStorageDir, "TEST123.mp3"); in testMtpObjectIsDirFalse() local
236 File newFile = createNewDir(mainStorageDir); in testMtpObjectGetFormatDir() local
246 File newFile = createNewFile(mainStorageDir, "TEST123.mp3"); in testMtpObjectGetFormatNonDir() local
256 File newFile = createNewFile(mainStorageDir); in testMtpObjectGetStorageId() local
266 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/base/packages/SettingsLib/DataStore/tests/src/com/android/settingslib/datastore/
DBackupRestoreStorageTest.kt149 temporaryFolder.newFile().toParcelFileDescriptor(MODE_READ_ONLY).use { in <lambda>()
160 temporaryFolder.newFile().toParcelFileDescriptor(MODE_READ_ONLY).use { in <lambda>()
170 temporaryFolder.newFile().toParcelFileDescriptor(MODE_READ_ONLY).use { in <lambda>()
206 temporaryFolder.newFile().toParcelFileDescriptor(MODE_READ_ONLY).use { in <lambda>()
217 temporaryFolder.newFile().toParcelFileDescriptor(MODE_READ_ONLY).apply { in <lambda>()
227 val stateFile = temporaryFolder.newFile() in <lambda>()
244 temporaryFolder.newFile().toParcelFileDescriptor(MODE_READ_ONLY).use { in <lambda>()
253 temporaryFolder.newFile().toParcelFileDescriptor(MODE_WRITE_ONLY or MODE_APPEND).use { in <lambda>()
286 val newStateFile = temporaryFolder.newFile() in <lambda>()
316 val stateFile = temporaryFolder.newFile() in <lambda>()
[all …]
DBackupRestoreFileArchiverTest.kt79 val file = temporaryFolder.newFile() in restoreEntity_disabled()
208 val file = temporaryFolder.newFile() in toBackupRestoreEntity_backup()
/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/core/tests/coretests/src/android/os/
DMemoryFileTest.java69 MemoryFile newFile = new MemoryFile("MemoryFileTest", 10000000); in testPurge() local
70 newFile.allowPurging(true); in testPurge()
71 newFile.writeBytes(testString, 0, 0, testString.length); in testPurge()
72 files.add(newFile); in testPurge()
/frameworks/base/services/tests/PackageManagerServiceTests/host/src/com/android/server/pm/test/
DTamperedUpdatedSystemPackageTest.kt93 val xml = tempFolder.newFile().apply { in backupAndModifySystemFiles()
126 tempFolder.newFile() in detectApkAndXmlTamperingAtBoot()
153 tempFolder.newFile() in detectApkTamperingAtBoot()
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()
DPackageInstallerSessionTest.kt50 val deviceSideFile = HostUtils.copyResourceToHostFile(DEVICE_SIDE, tempFolder.newFile()) in runDeviceTest()
DBootTest.kt42 val testApkFile = HostUtils.copyResourceToHostFile(TEST_APK_NAME, tempFolder.newFile()) in installApk()
DSdCardEjectionTests.kt89 val hostApkFile = HostUtils.copyResourceToHostFile(VERSION_ONE, tempFolder.newFile()) in launchActivity()
120 val usesApkFile = HostUtils.copyResourceToHostFile(VERSION_USES, tempFolder.newFile()) in uninstallStaticLibraryInUse()
DOverlayPathsUninstallSystemUpdatesTest.kt65 val versionTwoFile = HostUtils.copyResourceToHostFile(VERSION_TWO, tempFolder.newFile()) in verify()
DOverlayActorVisibilityTest.kt72 val file = tempFolder.newFile().apply { in pushSysConfigFile()
DOriginalPackageMigrationTest.kt88 val file = tempFolder.newFile().apply { writeText("Test") } in runForApk()
/frameworks/av/media/mtp/tests/MtpFuzzer/
Dmtp_fuzzer.cpp174 std::string newFile = toPathStr + name; in createDatabaseFromSourceDir() local
177 ret += makeFolder(newFile.c_str()); in createDatabaseFromSourceDir()
188 ret += createDatabaseFromSourceDir(oldFile.c_str(), newFile.c_str(), in createDatabaseFromSourceDir()
191 ret += copyFile(oldFile.c_str(), newFile.c_str()); in createDatabaseFromSourceDir()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/backup/
DPackageManagerBackupAgentTest.java89 mBackupData = folder.newFile("backup_data"); in setUp()
90 mOldState = folder.newFile("old_state"); in setUp()
91 mNewState = folder.newFile("new_state"); in setUp()
260 File temporaryBackupData = folder.newFile("backup_data.tmp"); in deleteKeyFromBackupData()
DDataChangedJournalTest.java64 mFile = mTemporaryFolder.newFile(); in setUp()
104 assertThat(mJournal.equals(new DataChangedJournal(mTemporaryFolder.newFile()))).isFalse(); in equals_isFalseForDifferentFiles()
/frameworks/base/services/tests/PackageManagerServiceTests/unit/src/com/android/server/pm/test/verify/domain/
DDomainVerificationPersistenceTest.kt118 val file = tempFolder.newFile().writeXml { in <lambda>()
137 val file = tempFolder.newFile().writeXml { in <lambda>()
166 val file = tempFolder.newFile().writeXml { in <lambda>()
DDomainVerificationLegacySettingsTest.kt72 val file = tempFolder.newFile().writeXml(settings::writeSettings) in writeAndReadBackNormal()
/frameworks/base/services/tests/PackageManagerServiceTests/unit/src/com/android/server/pm/test/pkg/
DPackageStateTest.kt121 .setCodePath(tempFolder.newFile().path) in collectionImmutability()
152 listOf(tempFolder.newFile().path), in fillMissingData()
165 listOf(tempFolder.newFile().path), in fillMissingData()
/frameworks/base/services/tests/mockingservicestests/src/com/android/server/backup/utils/
DBackupManagerMonitorDumpsysUtilsTest.java45 mTempBMMEventsFile = tmp.newFile("testbmmevents.txt"); in setUp()
46 mTempSetUpDateFile = tmp.newFile("testSetUpDate.txt"); in setUp()
DDataStreamFileCodecTest.java44 File unicornFile = mTemporaryFolder.newFile(); in serialize_writesToTheFile()

12