Check for path-permissions when opening a file.

When an app is trying to open a Uri, check whether it has been granted
read or write permission by another app via the Intent.FLAG_GRANT_... flags,
instead of only checking whether the app itself has external storage read
or write permissions.

b/10345049

Change-Id: Idbc87fe34a05be9d8220ee7a0223d039480c3ffe
1 file changed