compat/src/main/java/androidx/core/content/FileProvider.java
@Override
    public ParcelFileDescriptor openFile(@NonNull Uri uri, @NonNull String mode)
            throws FileNotFoundException {
        // ContentProvider has already checked granted permissions
        final File file = mStrategy.getFileForUri(uri);
        final int fileMode = modeToMode(mode);
        return ParcelFileDescriptor.open(file, fileMode);
    }
/**
     * By default, FileProvider automatically returns the
     * {@link ParcelFileDescriptor} for a file associated with a <code>content://</code>
     * {@link Uri}. To get the {@link ParcelFileDescriptor}, call
     * {@link android.content.ContentResolver#openFileDescriptor(Uri, String)
     * ContentResolver.openFileDescriptor}.
     *
     * To override this method, you must provide your own subclass of FileProvider.
     *
     * @param uri A content URI associated with a file, as returned by
     * {@link #getUriForFile(Context, String, File) getUriForFile()}.
     * @param mode Access mode for the file. May be "r" for read-only access, "rw" for read and
     * write access, or "rwt" for read and write access that truncates any existing file.
     * @return A new {@link ParcelFileDescriptor} with which you can access the file.
     */
By default, FileProvider automatically returns the
ParcelFileDescriptor for a file associated with a content:
Uri.

To override this method, you must provide your own subclass of FileProvider.

@param uri A content URI associated with a file, as returned by
#getUriForFile(Context, String, File) getUriForFile().
@param mode Access mode for the file.
By default FileProvider automatically returns the ParcelFileDescriptor for a file associated with a content : Uri . To override this method you must provide your own subclass of FileProvider . @param uri A content URI associated with a file as returned by #getUriForFile ( Context String File ) getUriForFile () . @param mode Access mode for the file .
@Override
    public ParcelFileDescriptor openFile(@NonNull Uri uri, @NonNull String mode)
            throws FileNotFoundException {
        final File file = mStrategy.getFileForUri(uri);
        final int fileMode = modeToMode(mode);
        return ParcelFileDescriptor.open(file, fileMode);
    }
@ Override public ParcelFileDescriptor openFile ( @ NonNull Uri uri , @ NonNull String mode ) throws FileNotFoundException { final File file = mStrategy . getFileForUri ( uri ) ; final int fileMode = modeToMode ( mode ) ; return ParcelFileDescriptor . open ( file , fileMode ) ; }
By default, FileProvider automatically returns the
 {@link ParcelFileDescriptor} for a file associated with a <code>content://</code>
 {@link Uri}.
By default FileProvider automatically returns the { @link ParcelFileDescriptor } for a file associated with a <code > content : // < / code > { @link Uri } .
// ContentProvider has already checked granted permissions