Peter Cai
584bd25aeb
Previously, we have been triggering the media scanner after calls to `createFile()`. This is not robust, though, as in many cases the writer is not able to finish writing (i.e. *actually* creating the file) before the scanner is scheduled, resulting in media copied into the work profile not showing up in galleries etc. Turns out, ParcelFileDescriptor supports a `listener` argument in its `open()` calls. This listener is triggered when the fd is actually closed by the (potentially remote) writer. To have robust media scanning, we simply re-trigger the scanner every time a writable ParcelFileDescriptor is closed. |
||
---|---|---|
.. | ||
src | ||
.gitignore | ||
build.gradle | ||
proguard-rules.pro |