Home
last modified time | relevance | path

Searched refs:tempFile (Results 1 – 21 of 21) sorted by relevance

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/hal/fakevhal/
DFakeVhalConfigParserUnitTest.java72 File tempFile = new File("NotExist.json"); in testCustomConfigFileNotExist() local
74 SparseArray<ConfigDeclaration> result = mFakeVhalConfigParser.parseJsonConfig(tempFile); in testCustomConfigFileNotExist()
81 File tempFile = createTempFileWithContent(/* fileContent= */ ""); in testCustomConfigFileIsEmpty() local
83 SparseArray<ConfigDeclaration> result = mFakeVhalConfigParser.parseJsonConfig(tempFile); in testCustomConfigFileIsEmpty()
91 File tempFile = createTempFileWithContent(fileContent); in testConfigFileHaveInvalidJsonObject() local
94 () -> mFakeVhalConfigParser.parseJsonConfig(tempFile)); in testConfigFileHaveInvalidJsonObject()
103 File tempFile = createTempFileWithContent(jsonString); in testConfigFileInvalidJsonKey() local
106 mFakeVhalConfigParser.parseJsonConfig(tempFile)); in testConfigFileInvalidJsonKey()
114 File tempFile = createTempFileWithContent(jsonString); in testConfigFileRootIsNotArray() local
117 mFakeVhalConfigParser.parseJsonConfig(tempFile)); in testConfigFileRootIsNotArray()
[all …]
DFakeVehicleStubUnitTest.java1749 File tempFile = File.createTempFile("custom_config_", ".json"); in createFilenameList() local
1750 tempFile.deleteOnExit(); in createFilenameList()
1751 try (FileOutputStream os = new FileOutputStream(tempFile)) { in createFilenameList()
1753 customFileList.add(tempFile); in createFilenameList()
/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/common/
DUriBitmap.java34 private UriBitmap(Bitmap bitmap, Uri uri, File tempFile) { in UriBitmap() argument
37 mTempFile = tempFile; in UriBitmap()
53 File tempFile = File.createTempFile("tmpImage", ".png"); in createSimpleInstance() local
54 Uri uri = bitmapToUri(bitmap, tempFile); in createSimpleInstance()
55 return new UriBitmap(bitmap, uri, tempFile); in createSimpleInstance()
68 private static Uri bitmapToUri(Bitmap bitmap, File tempFile) throws IOException { in bitmapToUri() argument
69 try (FileOutputStream fs = new FileOutputStream(tempFile)) { in bitmapToUri()
71 return Uri.fromFile(tempFile); in bitmapToUri()
/packages/apps/Camera2/src/com/android/camera/session/
DSessionStorageManagerImpl.java97 File tempFile = new File(tempDirectory, title + ".jpg"); in createTemporaryOutputPath() local
99 if (!tempFile.exists()) { in createTemporaryOutputPath()
100 if (!tempFile.createNewFile()) { in createTemporaryOutputPath()
109 if (!tempFile.canWrite()) { in createTemporaryOutputPath()
112 return tempFile; in createTemporaryOutputPath()
/packages/apps/Messaging/src/com/android/messaging/sms/
DMmsSender.java176 final File tempFile = MmsFileProvider.getFile(contentUri); in writePduToTempFile() local
180 tempFile.getParentFile().mkdirs(); in writePduToTempFile()
181 writer = new FileOutputStream(tempFile); in writePduToTempFile()
194 if (tempFile != null) { in writePduToTempFile()
195 tempFile.delete(); in writePduToTempFile()
197 LogUtil.e(TAG, "Cannot create temporary file " + tempFile.getAbsolutePath(), e); in writePduToTempFile()
201 if (tempFile != null) { in writePduToTempFile()
202 tempFile.delete(); in writePduToTempFile()
/packages/apps/Traceur/src_common/com/android/traceur/
DWinscopeUtils.java112 for (File tempFile : getTraceFilesFromWmTraceDir()) { in traceDump()
117 File outFile = getOutputFile(perfettoFilename, tempFile); in traceDump()
118 FileUtils.copy(tempFile, outFile); in traceDump()
195 private static File getOutputFile(String perfettoFilename, File tempFile) { in getOutputFile() argument
198 String filename = perfettoFilenameWithoutExtension + "-" + tempFile.getName(); in getOutputFile()
/packages/services/Car/tools/GenericCarApiBuilder/src/com/android/car/tool/apibuilder/tests/
DTestHelper.java34 File tempFile = new File(filename + "_temp_" + new Random().nextInt()); in getResourceFile() local
36 try (OutputStream out = new BufferedOutputStream(new FileOutputStream(tempFile))) { in getResourceFile()
43 return tempFile; in getResourceFile()
/packages/modules/OnDevicePersonalization/src/com/android/ondevicepersonalization/services/util/
DIoUtils.java82 File tempFile = File.createTempFile(name, ""); in writeToTempFile() local
83 String filePath = tempFile.getAbsolutePath(); in writeToTempFile()
84 FileOutputStream out = new FileOutputStream(tempFile); in writeToTempFile()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/signals/
DEncoderPersistenceDaoTest.java183 File tempFile = new File(CONTEXT.getFilesDir(), ADSERVICES_PREFIX + "temp_file"); in testWriteAndReadForFile() local
184 mEncoderPersistenceDao.writeDataToFile(tempFile, ENCODER); in testWriteAndReadForFile()
186 mEncoderPersistenceDao.readDataFromFile(CONTEXT.getFilesDir(), tempFile.getName()); in testWriteAndReadForFile()
191 tempFile.delete(); in testWriteAndReadForFile()
/packages/services/Telephony/testapps/EmbmsServiceTestApp/src/com/android/phone/testapps/embmsmw/
DEmbmsSampleDownloadService.java327 UriPathPair tempFile = tempFiles.get(i); in performDownload() local
330 tempFile.getFilePathUri()); in performDownload()
337 downloadSingleFile(appKey, request, tempFile, extraTempFile, fileToDownload); in performDownload()
339 tempFile.getFilePathUri()); in performDownload()
345 UriPathPair tempFile, UriPathPair extraTempFile, FileInfo fileToDownload) { in downloadSingleFile() argument
361 tempFile.getContentUri(), "rw"); in downloadSingleFile()
393 tempFile.getFilePathUri()); in downloadSingleFile()
398 tempFileList.add(tempFile.getFilePathUri()); in downloadSingleFile()
/packages/services/Mtp/src/com/android/mtp/
DMtpFileWriter.java39 final File tempFile = File.createTempFile("mtp", "tmp", context.getCacheDir()); in MtpFileWriter() local
41 tempFile, in MtpFileWriter()
45 tempFile.delete(); in MtpFileWriter()
/packages/apps/Gallery2/src/com/android/gallery3d/data/
DDownloadCache.java318 File tempFile = null; in run() local
321 tempFile = File.createTempFile("cache", ".tmp", mRoot); in run()
324 boolean downloaded = DownloadUtils.requestDownload(jc, url, tempFile); in run()
326 if (downloaded) return tempFile; in run()
332 if (tempFile != null) tempFile.delete(); in run()
/packages/apps/Messaging/src/com/android/messaging/datamodel/action/
DProcessSentMessageAction.java142 final File tempFile = MmsFileProvider.getFile(contentUri); in executeAction() local
144 if (tempFile.exists()) { in executeAction()
145 messageSize = tempFile.length(); in executeAction()
146 tempFile.delete(); in executeAction()
/packages/apps/AvatarPicker/src/main/java/com/android/avatarpicker/ui/details/items/media/
DPhotoPickerIcon.kt45 val tempFile = resultHandler.getTempFile() in <lambda>() constant
58 tempFile.saveBitmap(bitmap) in <lambda>()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/telemetry/systemmonitor/
DSystemMonitorTest.java212 File tempFile = temporaryFolder.newFile(); in writeTempFile() local
213 try (FileWriter fw = new FileWriter(tempFile)) { in writeTempFile()
216 return tempFile.getAbsolutePath(); in writeTempFile()
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/common/
DFileUtils.java53 File tempFile = File.createTempFile(name, extension); in createTempFile() local
54 fileName = tempFile.getAbsolutePath(); in createTempFile()
/packages/modules/common/javatests/com/android/modules/targetprep/
DClasspathFetcherTest.java97 final File tempFile = File.createTempFile(path, null); in setUp()
101 Files.copy(is, tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING); in setUp()
103 return tempFile; in setUp()
/packages/apps/ManagedProvisioning/studio-dev/ManagedProvisioningGradleProject/buildSrc/src/main/java/
DRoboJarFetcherTask.kt126 val tempFile = File(out.parentFile, out.name + ".tmp") in downloadAndroidJarFromServer() constant
127 FileOutputStream(tempFile).use { o -> IOUtils.copy(URL(downloadUrl).openStream(), o) } in downloadAndroidJarFromServer()
128 tempFile.renameTo(out) in downloadAndroidJarFromServer()
/packages/modules/NeuralNetworks/tools/test_generator/
Dtest_generator.py1351 tempFile = filename + '.tmp'
1353 with open(tempFile, 'w') as writer:
1355 os.replace(tempFile, filename)
1356 tempFile = None
1358 if tempFile is not None and os.path.exists(tempFile):
1359 os.remove(tempFile)
/packages/modules/AppSearch/testing/mockingservicestests/src/com/android/server/appsearch/
DAppSearchManagerServiceTest.java666 File tempFile = mTemporaryFolder.newFile(); in testWriteSearchResultsToFileStatsLogging() local
667 FileDescriptor fd = IoBridge.open(tempFile.getPath(), O_WRONLY); in testWriteSearchResultsToFileStatsLogging()
682 File tempFile = mTemporaryFolder.newFile(); in testPutDocumentsFromFileStatsLogging() local
683 FileDescriptor fd = IoBridge.open(tempFile.getPath(), O_RDONLY); in testPutDocumentsFromFileStatsLogging()
1752 File tempFile = mTemporaryFolder.newFile(); in verifyWriteSearchResultsToFileResult() local
1753 FileDescriptor fd = IoBridge.open(tempFile.getPath(), O_WRONLY); in verifyWriteSearchResultsToFileResult()
1766 File tempFile = mTemporaryFolder.newFile(); in verifyPutDocumentsFromFileResult() local
1767 FileDescriptor fd = IoBridge.open(tempFile.getPath(), O_RDONLY); in verifyPutDocumentsFromFileResult()
/packages/apps/ManagedProvisioning/studio-dev/StubGenerator/
DStubGenerator.jarMETA-INF/ META-INF/MANIFEST.MF org/ org/jf/ org/ ...