FUSE readdir: enforce restrictions based on target SDK

Legacy app with storage permission will bypass FUSE and files list will
be obtained from lower file system instead of MediaProvider database.
Legacy app with no permissions can only list files in its external media
directory.
Bug: 144990065
Test: atest -c LegacyAccessHostTest#testListFiles_hasR
      atest -c LegacyAccessHostTest#testReadOnlyExternalStorage_hasR

Change-Id: Ic867c8d885ab8ee471891d254dee73a499f8c8fd
5 files changed