Files
frameworks_base/core/java/android/util
Hai Zhang b1a7706716 Change AtomicFile to use rename-into-place.
The previous implementation of backing up beforehand doesn't handle
the case where the file is created for the first time, and might leave
a corrupted file in case of failure.

This new implementation creates a new file for writing data into, and
renames it into the place of the original file after writing
finished.

Fixes: 151959443
Test: atest android.util.AtomicFileTest
Change-Id: I5c4c438526a2aecdd2af18f71e16b41a05817c61
Merged-In: I5c4c438526a2aecdd2af18f71e16b41a05817c61
2020-05-19 00:27:32 +00:00
..
2019-11-14 10:00:50 -08:00
2020-03-23 17:19:05 +00:00
2019-11-18 10:51:17 -08:00