private Intent getDefaultShareIntent() {
   Intent intent = new Intent(Intent.ACTION_SEND);
   intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
   intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
   intent.setType(SharedImageProvider.MIME_TYPE);
   mSharedOutputFile = SaveCopyTask.getNewFile(this, mImageLoader.getUri());
   Uri uri =
       Uri.withAppendedPath(
           SharedImageProvider.CONTENT_URI, Uri.encode(mSharedOutputFile.getAbsolutePath()));
   intent.putExtra(Intent.EXTRA_STREAM, uri);
   return intent;
 }
 public void saveImage() {
   if (mImageShow.hasModifications()) {
     // Get the name of the album, to which the image will be saved
     File saveDir = SaveCopyTask.getFinalSaveDirectory(this, mImageLoader.getUri());
     int bucketId = GalleryUtils.getBucketId(saveDir.getPath());
     String albumName = LocalAlbum.getLocalizedName(getResources(), bucketId, null);
     showSavingProgress(albumName);
     mImageShow.saveImage(this, null);
   } else {
     finish();
   }
 }