Home
last modified time | relevance | path

Searched refs:atomicFile (Results 1 – 18 of 18) sorted by relevance

/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/signals/
DEncoderPersistenceDao.java125 AtomicFile atomicFile = new AtomicFile(file); in deleteEncoder() local
126 atomicFile.delete(); in deleteEncoder()
183 AtomicFile atomicFile = new AtomicFile(file); in writeDataToFile() local
185 fos = atomicFile.startWrite(); in writeDataToFile()
187 atomicFile.finishWrite(fos); in writeDataToFile()
192 failWriteToFile(fos, atomicFile); in writeDataToFile()
195 failWriteToFile(fos, atomicFile); in writeDataToFile()
201 private void failWriteToFile(FileOutputStream fos, AtomicFile atomicFile) { in failWriteToFile() argument
202 if (fos != null && atomicFile != null) { in failWriteToFile()
203 atomicFile.failWrite(fos); in failWriteToFile()
[all …]
/packages/services/Car/service/src/com/android/car/telemetry/util/
DIoUtils.java48 AtomicFile atomicFile = new AtomicFile(bundleFile); in readBundle() local
49 try (FileInputStream fis = atomicFile.openRead()) { in readBundle()
77 AtomicFile atomicFile = new AtomicFile(dest); in writeBundle() local
78 try (FileOutputStream fos = atomicFile.startWrite()) { in writeBundle()
81 atomicFile.finishWrite(fos); in writeBundle()
83 atomicFile.failWrite(fos); in writeBundle()
112 AtomicFile atomicFile = new AtomicFile(dest); in writeProto() local
113 try (FileOutputStream fos = atomicFile.startWrite()) { in writeProto()
116 atomicFile.finishWrite(fos); in writeProto()
118 atomicFile.failWrite(fos); in writeProto()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/appsindexer/
DAppsIndexerSettings.java96 AtomicFile atomicFile = new AtomicFile(src); in readBundle() local
97 try (FileInputStream fis = atomicFile.openRead()) { in readBundle()
105 AtomicFile atomicFile = new AtomicFile(dest); in writeBundle() local
108 fos = atomicFile.startWrite(); in writeBundle()
110 atomicFile.finishWrite(fos); in writeBundle()
113 atomicFile.failWrite(fos); in writeBundle()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/contactsindexer/
DContactsIndexerSettings.java129 AtomicFile atomicFile = new AtomicFile(src); in readBundle() local
130 try (FileInputStream fis = atomicFile.openRead()) { in readBundle()
138 AtomicFile atomicFile = new AtomicFile(dest); in writeBundle() local
141 fos = atomicFile.startWrite(); in writeBundle()
143 atomicFile.finishWrite(fos); in writeBundle()
146 atomicFile.failWrite(fos); in writeBundle()
/packages/modules/DeviceLock/service/java/com/android/server/devicelock/
DDeviceLockPersistentStore.java89 AtomicFile atomicFile = new AtomicFile(mFile); in writeState() local
91 try (FileOutputStream fileOutputStream = atomicFile.startWrite()) { in writeState()
99 atomicFile.finishWrite(fileOutputStream); in writeState()
102 atomicFile.failWrite(fileOutputStream); in writeState()
124 AtomicFile atomicFile = new AtomicFile(mFile); in readState() local
126 try (FileInputStream inputStream = atomicFile.openRead()) { in readState()
/packages/modules/HealthFitness/service/java/com/android/server/healthconnect/permission/
DGrantTimeXmlHelper.java63 AtomicFile atomicFile = new AtomicFile(file); in serializeGrantTimes() local
66 outputStream = atomicFile.startWrite(); in serializeGrantTimes()
74 atomicFile.finishWrite(outputStream); in serializeGrantTimes()
77 atomicFile.failWrite(outputStream); in serializeGrantTimes()
/packages/modules/Permission/SafetyCenter/Persistence/java/com/android/safetycenter/persistence/
DSafetyCenterIssuesPersistence.java243 AtomicFile atomicFile = new AtomicFile(file); in write() local
246 outputStream = atomicFile.startWrite(); in write()
256 atomicFile.finishWrite(outputStream); in write()
259 atomicFile.failWrite(outputStream); in write()
/packages/services/Car/service/src/com/android/car/
DCarLocationService.java453 AtomicFile atomicFile = new AtomicFile(getLocationCacheFile()); in storeLocation() local
456 fos = atomicFile.startWrite(); in storeLocation()
495 atomicFile.finishWrite(fos); in storeLocation()
498 atomicFile.failWrite(fos); in storeLocation()
526 AtomicFile atomicFile = new AtomicFile(file); in readLocationFromCacheFile() local
527 try (FileInputStream fis = atomicFile.openRead()) { in readLocationFromCacheFile()
/packages/modules/Permission/service/java/com/android/role/persistence/
DRolesPersistenceImpl.java194 AtomicFile atomicFile = new AtomicFile(file); in writeForUser() local
197 outputStream = atomicFile.startWrite(); in writeForUser()
207 atomicFile.finishWrite(outputStream); in writeForUser()
211 atomicFile.failWrite(outputStream); in writeForUser()
/packages/modules/Permission/service/java/com/android/permission/persistence/
DRuntimePermissionsPersistenceImpl.java218 AtomicFile atomicFile = new AtomicFile(file); in writeForUser() local
221 outputStream = atomicFile.startWrite(); in writeForUser()
230 atomicFile.finishWrite(outputStream); in writeForUser()
234 atomicFile.failWrite(outputStream); in writeForUser()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/model/
DProvisioningParams.java576 AtomicFile atomicFile = null; in save() local
579 atomicFile = new AtomicFile(file); in save()
580 stream = atomicFile.startWrite(); in save()
588 atomicFile.finishWrite(stream); in save()
593 if (atomicFile != null) { in save()
594 atomicFile.failWrite(stream); in save()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/safetylabel/
DAppsSafetyLabelHistoryPersistence.kt262 val atomicFile = AtomicFile(file) in <lambda>() constant
266 outputStream = atomicFile.startWrite() in <lambda>()
272 atomicFile.finishWrite(outputStream) in <lambda>()
280 atomicFile.failWrite(outputStream) in <lambda>()
/packages/modules/Connectivity/thread/service/java/com/android/server/thread/
DThreadPersistentSettings.java96 ThreadPersistentSettings(AtomicFile atomicFile, ConnectivityResources resources) { in ThreadPersistentSettings() argument
97 mAtomicFile = atomicFile; in ThreadPersistentSettings()
/packages/modules/Uwb/service/java/com/android/server/uwb/
DUwbSettingsStore.java125 AtomicFile atomicFile, UwbInjector uwbInjector) { in UwbSettingsStore() argument
128 mAtomicFile = atomicFile; in UwbSettingsStore()
/packages/apps/Nfc/src/com/android/nfc/cardemulation/
DRegisteredNfcFServicesCache.java151 RegisteredNfcFServicesCache(Context context, Callback callback, AtomicFile atomicFile) { in RegisteredNfcFServicesCache() argument
207 if (atomicFile == null) { in RegisteredNfcFServicesCache()
211 mDynamicSystemCodeNfcid2File = atomicFile; in RegisteredNfcFServicesCache()
/packages/services/Car/service/src/com/android/car/watchdog/
DWatchdogPerfHandler.java1254 AtomicFile atomicFile = new AtomicFile(file); in writeMetadataFile() local
1257 fos = atomicFile.startWrite(); in writeMetadataFile()
1273 atomicFile.finishWrite(fos); in writeMetadataFile()
1280 atomicFile.failWrite(fos); in writeMetadataFile()
2194 AtomicFile atomicFile = new AtomicFile(file); in readMetadataFileLocked() local
2195 try (FileInputStream fis = atomicFile.openRead()) { in readMetadataFileLocked()
/packages/providers/TelephonyProvider/src/com/android/providers/telephony/
DTelephonyProvider.java3660 AtomicFile atomicFile = new AtomicFile( in writeSimSettingsToInternalStorage() local
3664 fos = atomicFile.startWrite(); in writeSimSettingsToInternalStorage()
3666 atomicFile.finishWrite(fos); in writeSimSettingsToInternalStorage()
3669 atomicFile.failWrite(fos); in writeSimSettingsToInternalStorage()
3699 AtomicFile atomicFile = new AtomicFile(file); in mergeBackedUpDataToSimInfoDb() local
3701 try (FileInputStream fis = atomicFile.openRead()) { in mergeBackedUpDataToSimInfoDb()
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/watchdog/
DWatchdogPerfHandlerUnitTest.java678 AtomicFile atomicFile = new AtomicFile(metadataFile); in testWriteMetadataFile() local
680 FileInputStream fis = atomicFile.openRead(); in testWriteMetadataFile()