Merge "Translate SecurityException into EACCES."

This commit is contained in:
Jeff Sharkey
2019-02-28 00:19:05 +00:00
committed by Android (Google) Code Review

View File

@@ -6954,6 +6954,8 @@ public final class ActivityThread extends ClientTransactionHandler {
fd.setInt$(cr.openFileDescriptor(uri,
FileUtils.translateModePosixToString(mode)).detachFd());
return fd;
} catch (SecurityException e) {
throw new ErrnoException(e.getMessage(), OsConstants.EACCES);
} catch (FileNotFoundException e) {
throw new ErrnoException(e.getMessage(), OsConstants.ENOENT);
}