Home
last modified time | relevance | path

Searched refs:fos (Results 1 – 25 of 61) sorted by relevance

123

/frameworks/base/services/tests/servicestests/src/com/android/server/backup/
DBackupPasswordManagerTest.java200 FileOutputStream fos = null; in writeHashAndSaltToFile() local
205 fos = new FileOutputStream(passwordHash); in writeHashAndSaltToFile()
206 dos = new DataOutputStream(fos); in writeHashAndSaltToFile()
213 if (fos != null) fos.close(); in writeHashAndSaltToFile()
218 FileOutputStream fos = null; in writePasswordVersionToFile() local
223 fos = new FileOutputStream(passwordVersion); in writePasswordVersionToFile()
224 dos = new DataOutputStream(fos); in writePasswordVersionToFile()
229 if (fos != null) fos.close(); in writePasswordVersionToFile()
DDataChangedJournalTest.java70 FileInputStream fos = new FileInputStream(mFile); in addPackage_addsPackagesToEndOfFile() local
71 DataInputStream dos = new DataInputStream(fos); in addPackage_addsPackagesToEndOfFile()
DProcessedPackagesJournalTest.java159 try (FileOutputStream fos = new FileOutputStream(journal); in writePermanentJournalPackages() argument
160 DataOutputStream dos = new DataOutputStream(fos)) { in writePermanentJournalPackages()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/util/leak/
DLeakDetectorTest.java109 FileOutputStream fos = new FileOutputStream("/dev/null"); in testDump() local
110 mLeakDetector.dump(fos.getFD(), new PrintWriter(fos), new String[0]); in testDump()
125 FileOutputStream fos = new FileOutputStream("/dev/null"); in testDisabled() local
126 mLeakDetector.dump(fos.getFD(), new PrintWriter(fos), new String[0]); in testDisabled()
/frameworks/base/keystore/java/android/security/
DSystemKeyStore.java92 FileOutputStream fos = new FileOutputStream(keyFile); in generateNewKey() local
93 fos.write(retKey); in generateNewKey()
94 fos.flush(); in generateNewKey()
95 FileUtils.sync(fos); in generateNewKey()
96 fos.close(); in generateNewKey()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/helpers/
DCameraTestHelper.java69 FileOutputStream fos = null;
73 fos = new FileOutputStream(String.format("%s/%s/%s-%d.jpg",
77 fos.write(data);
84 if (fos != null) {
85 fos.close();
/frameworks/base/services/core/java/com/android/server/
DSystemUpdateManagerService.java215 FileOutputStream fos = null; in writeInfoFileLocked() local
217 fos = mFile.startWrite(); in writeInfoFileLocked()
220 out.setOutput(fos, StandardCharsets.UTF_8.name()); in writeInfoFileLocked()
228 mFile.finishWrite(fos); in writeInfoFileLocked()
232 if (fos != null) { in writeInfoFileLocked()
233 mFile.failWrite(fos); in writeInfoFileLocked()
DDiskStatsService.java77 FileOutputStream fos = null; in dump() local
82 fos = new FileOutputStream(tmp); in dump()
83 fos.write(junk); in dump()
87 try { if (fos != null) fos.close(); } catch (IOException e) {} in dump()
/frameworks/base/services/core/java/com/android/server/wm/
DTaskSnapshotPersister.java349 FileOutputStream fos = null; in writeProto() local
351 fos = atomicFile.startWrite(); in writeProto()
352 fos.write(bytes); in writeProto()
353 atomicFile.finishWrite(fos); in writeProto()
355 atomicFile.failWrite(fos); in writeProto()
398 FileOutputStream fos = new FileOutputStream(file); in writeBuffer() local
399 swBitmap.compress(JPEG, QUALITY, fos); in writeBuffer()
400 fos.close(); in writeBuffer()
DCompatModePackages.java360 FileOutputStream fos = null; in saveCompatModes() local
363 fos = mFile.startWrite(); in saveCompatModes()
365 out.setOutput(fos, StandardCharsets.UTF_8.name()); in saveCompatModes()
407 mFile.finishWrite(fos); in saveCompatModes()
410 if (fos != null) { in saveCompatModes()
411 mFile.failWrite(fos); in saveCompatModes()
DAppWarnings.java472 FileOutputStream fos = null; in writeConfigToFileAmsThread() local
474 fos = mConfigFile.startWrite(); in writeConfigToFileAmsThread()
477 out.setOutput(fos, StandardCharsets.UTF_8.name()); in writeConfigToFileAmsThread()
497 mConfigFile.finishWrite(fos); in writeConfigToFileAmsThread()
500 if (fos != null) { in writeConfigToFileAmsThread()
501 mConfigFile.failWrite(fos); in writeConfigToFileAmsThread()
/frameworks/base/core/java/com/android/internal/os/
DTransferPipe.java250 final OutputStream fos; in run() local
259 fos = getNewOutputStream(); in run()
274 fos.write(buffer, 0, size); in run()
280 fos.write(buffer, start, i-start); in run()
284 fos.write(bufferPrefix); in run()
296 fos.write(buffer, start, size-start); in run()
DAtomicFile.java133 FileOutputStream fos = new FileOutputStream(mBaseName); in truncate() local
134 FileUtils.sync(fos); in truncate()
135 fos.close(); in truncate()
/frameworks/base/services/core/java/com/android/server/timezone/
DPackageStatusStorage.java315 FileOutputStream fos = null; in writePackageStatusLocked() local
317 fos = mPackageStatusFile.startWrite(); in writePackageStatusLocked()
319 serializer.setOutput(fos, StandardCharsets.UTF_8.name()); in writePackageStatusLocked()
338 mPackageStatusFile.finishWrite(fos); in writePackageStatusLocked()
340 if (fos != null) { in writePackageStatusLocked()
341 mPackageStatusFile.failWrite(fos); in writePackageStatusLocked()
/frameworks/base/services/tests/servicestests/src/com/android/server/pm/
DPackageInstallerSessionTest.java187 FileOutputStream fos = null; in dumpSessions() local
189 fos = mSessionsFile.startWrite(); in dumpSessions()
192 out.setOutput(fos, StandardCharsets.UTF_8.name()); in dumpSessions()
201 mSessionsFile.finishWrite(fos); in dumpSessions()
204 if (fos != null) { in dumpSessions()
205 mSessionsFile.failWrite(fos); in dumpSessions()
/frameworks/base/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/
DBandwidthTestUtil.java108 FileOutputStream fos = new FileOutputStream(file); in DownloadFromUrl() local
109 fos.write(baf.toByteArray()); in DownloadFromUrl()
110 fos.close(); in DownloadFromUrl()
/frameworks/base/core/java/android/app/
DWallpaperManager.java1182 FileOutputStream fos = null; in setResource() local
1185 fos = new ParcelFileDescriptor.AutoCloseOutputStream(fd); in setResource()
1186 copyStreamToWallpaperFile(resources.openRawResource(resid), fos); in setResource() local
1189 fos.close(); in setResource()
1194 IoUtils.closeQuietly(fos); in setResource()
1310 FileOutputStream fos = null; in setBitmap() local
1312 fos = new ParcelFileDescriptor.AutoCloseOutputStream(fd); in setBitmap()
1313 fullImage.compress(Bitmap.CompressFormat.PNG, 90, fos); in setBitmap()
1314 fos.close(); in setBitmap()
1317 IoUtils.closeQuietly(fos); in setBitmap()
[all …]
/frameworks/base/services/usage/java/com/android/server/usage/
DAppIdleHistory.java194 FileOutputStream fos = null; in writeScreenOnTime() local
196 fos = screenOnTimeFile.startWrite(); in writeScreenOnTime()
197 fos.write((Long.toString(mScreenOnDuration) + "\n" in writeScreenOnTime()
199 screenOnTimeFile.finishWrite(fos); in writeScreenOnTime()
201 screenOnTimeFile.failWrite(fos); in writeScreenOnTime()
594 FileOutputStream fos = null; in writeAppIdleTimes() local
597 fos = appIdleFile.startWrite(); in writeAppIdleTimes()
598 final BufferedOutputStream bos = new BufferedOutputStream(fos); in writeAppIdleTimes()
641 appIdleFile.finishWrite(fos); in writeAppIdleTimes()
643 appIdleFile.failWrite(fos); in writeAppIdleTimes()
/frameworks/base/core/java/android/util/
DAtomicFile.java192 FileOutputStream fos = new FileOutputStream(mBaseName); in truncate() local
193 FileUtils.sync(fos); in truncate()
194 fos.close(); in truncate()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/leak/
DLeakReporter.java84 try (FileOutputStream fos = new FileOutputStream(dumpFile)) { in dumpLeak() argument
85 PrintWriter w = new PrintWriter(fos); in dumpLeak()
89 mLeakDetector.dump(fos.getFD(), w, new String[0]); in dumpLeak()
/frameworks/base/core/tests/coretests/src/android/text/
DFontFallbackSetup.java74 try (FileOutputStream fos = new FileOutputStream(testFontsXml)) { in FontFallbackSetup() argument
75 fos.write(mXml.getBytes(Charset.forName("UTF-8"))); in FontFallbackSetup()
/frameworks/base/core/java/android/net/
DLocalSocketImpl.java40 private SocketOutputStream fos; field in LocalSocketImpl
381 if (fos == null) { in getOutputStream()
382 fos = new SocketOutputStream(); in getOutputStream()
385 return fos; in getOutputStream()
/frameworks/base/test-runner/src/junit/runner/
DBaseTestRunner.java57 FileOutputStream fos= new FileOutputStream(getPreferencesFile()); in savePreferences() local
59 getPreferences().store(fos, ""); in savePreferences()
61 fos.close(); in savePreferences()
/frameworks/base/services/core/java/com/android/server/locksettings/
DPasswordSlotManager.java211 try (FileOutputStream fos = new FileOutputStream(getSlotMapFile())) { in saveSlotMap() argument
212 saveSlotMap(fos); in saveSlotMap()
/frameworks/base/services/core/java/com/android/server/content/
DSyncStorageEngine.java1967 FileOutputStream fos = null; in writeAccountInfoLocked() local
1970 fos = mAccountInfoFile.startWrite(); in writeAccountInfoLocked()
1972 out.setOutput(fos, StandardCharsets.UTF_8.name()); in writeAccountInfoLocked()
2008 mAccountInfoFile.finishWrite(fos); in writeAccountInfoLocked()
2011 if (fos != null) { in writeAccountInfoLocked()
2012 mAccountInfoFile.failWrite(fos); in writeAccountInfoLocked()
2066 FileOutputStream fos = null; in writeStatusLocked() local
2068 fos = mStatusFile.startWrite(); in writeStatusLocked()
2077 fos.write(out.marshall()); in writeStatusLocked()
2080 mStatusFile.finishWrite(fos); in writeStatusLocked()
[all …]

123