Use the right volume content URI
Some *ForFuse methods have been using MediaStore.getVolumeName or
MediaStore.Files.getContentUriForPath. Unfortunately, these methods can
return a relevant result only for the primary external or internal
volumes, and don't work well with adoptable volumes, for example.
This CL fixes the issue by introducing our own FileUtils method that
generates a content URI from a given path.
In addition, MP#updateAllowingReplace and MP#getQueryBuilderForUpsert
used the MediaStore API and now migrated to the new method.
Test: atest FuseDaemonHostTest
Bug: 155191986
Change-Id: I6431455759908eab0dd2cbf9aed9679b8087c738
2 files changed