private @Nullable Cursor processQuery(final Uri uri, final Supplier<Cursor> procedure) {
		final Cursor cursor;
		try {
			cursor = procedure.get();
		} catch (final RuntimeException e) {
			final String message = "Error during query (in user " + Users.toId(Process.myUserHandle()) + "): " + uri;
			try {
				Analytics.$().logAndReport(TAG, message, e);
			} catch (final RuntimeException ignored) {}		// IllegalStateException will be thrown if GlobalContextProvider is not initialized yet.
			throw new IllegalStateException(message, e);
		}
		if (cursor == null) return null;
		if ("/root".equals(uri.getPath()))
			return new TweakedRootCursor(cursor, Objects.requireNonNull(getContext()).getString(R.string.file_shuttle_summary));
		return cursor;
	}
Documents provider for accessing files in / outside Island.

Created by Oasis on 2017/8/29.
fileprovider/src/main/java/com/oasisfeng/island/fileprovider/ExternalStorageProviderProxy.java