Fix usage of ContentResolver.openOutputStream()
When writing to an existing file via the OutputStream
returned by ContentResolver.openOutputStream(Uri)
, data is only overwritten, but the file isn't truncated if less data is written than already present in the file. This can lead to broken files.
This code in HotspotViewModel
already does the right thing