public void setImageUriAsync(Uri uri) {
    if (uri != null) {
      BitmapLoadingWorkerTask currentTask =
          mBitmapLoadingWorkerTask != null ? mBitmapLoadingWorkerTask.get() : null;
      if (currentTask != null) {
        // cancel previous loading (no check if the same URI because camera URI can be the same for
        // different images)
        currentTask.cancel(true);
      }

      // either no existing task is working or we canceled it, need to load new URI
      clearImageInt();
      mRestoreCropWindowRect = null;
      mRestoreDegreesRotated = 0;
      mCropOverlayView.setInitialCropWindowRect(null);
      mBitmapLoadingWorkerTask = new WeakReference<>(new BitmapLoadingWorkerTask(this, uri));
      mBitmapLoadingWorkerTask.get().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
      setProgressBarVisibility();
    }
  }
Sets a bitmap loaded from the given Android URI as the content of the CropImageView.<br>
Can be used with URI from gallery or camera source.<br>
Will rotate the image by exif data.<br>

@param uri the URI to load the image from
core/src/main/java/com/theartofdev/edmodo/cropper/CropImageView.java