List all directory names in FUSE readdir
Previously, FUSE readdir returned a filtered list of directory names.
A directory name was returned only if the directory had at least one file in
the directory tree to which calling package had access permissions.
Also, readdir() skipped all empty directories since MediaProvider database
doesn't include empty directories.
Current implementation of readdir includes all directory names in the given
directory. Directory names are obtained from lower file system to get
unfiltered list of directory names and empty directories.
File names are still filtered based on calling package's access
permissions.
This commit also removes extra code which handled readdir of external
files and obb directories. These paths don't go through FUSE anymore.
Bug: 144350275
Bug: 145287327
Bug: 142806973
Bug: 142475473
Test: atest -c FuseDaemonHostTest#testListDirectoriesWithMediaFiles
atest -c FuseDaemonHostTest#testListDirectoriesWithNonMediaFiles
atest -c MediaProviderTest#testRelativePathForInvalidDirectories
atest -c MediaProviderTest#testRelativePathForValidDirectories
Change-Id: I1f34d8faa29b2a507a3f981f3edb6a63c4331f04
9 files changed