Return correct errno for FileNotFoundException

When non-legacy app tries to open a file for which it doesn't have read
access, we get a FileNotFoundException from queryForSingleItem. We also
get FileNotFoundException if app tries to open a file that's not in the
database. On FileNotFoundException, we rethrow the exception and return
EFAULT consequently. In both these cases, FileNotFoundException means
that app doesn't have access permission to the file, hence we shouldn't
return EFAULT here.

Changed isOpenAllowedForFuse to return EACCES on FileNotFoundException

Bug: 150927899
Test: atest CtsScopedStorageHostTest
Change-Id: I9304f2923dd4537b006e67be4233df30eb25a8eb
1 file changed