private Context wrapWithResolverWrapper(final Context context) {
		final ContentResolver resolver = context.getContentResolver();
		if (resolver instanceof ContentResolverWrapper) return context;		// Already wrapped
		return new ContextWrapper(context) {

			@Override public ContentResolver getContentResolver() {

				return new ContentResolverWrapper(context, super.getContentResolver()) {
					@Override public void notifyChange(final @NonNull Uri uri, final @Nullable ContentObserver observer) {
						resolver.notifyChange(toProxyUri(uri), observer);
					}

					@Override public void notifyChange(final @NonNull Uri uri, final @Nullable ContentObserver observer, final int flags) {
						resolver.notifyChange(toProxyUri(uri), observer, flags);
					}

					@Override public void notifyChange(final @NonNull Uri uri, final @Nullable ContentObserver observer, final boolean syncToNetwork) {
						resolver.notifyChange(toProxyUri(uri), observer, syncToNetwork);
					}
				};
			}
		};
	}
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