mirror of
https://github.com/androidx/media.git
synced 2025-05-16 20:19:57 +08:00

Clean up AtomicFile and make it return a custom FileOutputStream for writing which handles IOException automatically during write operations. It also syncs the file descriptor and deletes the backup file on close() call. This fixes the order of flush and close operations when the fileoutputstream is wrapped by another OutputStream. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138779187