@@ -643,16 +643,14 @@ private void checkForExternalIntent(Intent intent) {
643643
644644 } else if (actionIntent .equals (Intent .ACTION_SEND )) {
645645 if ("text/plain" .equals (type )) {
646- initFabToSave (null );
646+ showSaveSnackbar (null );
647647 } else {
648648 // save a single file to filesystem
649649 Uri uri = intent .getParcelableExtra (Intent .EXTRA_STREAM );
650- if (uri != null
651- && uri .getScheme () != null
652- && uri .getScheme ().startsWith (ContentResolver .SCHEME_FILE )) {
653- ArrayList <Uri > uris = new ArrayList <>();
650+ if (uri != null && uri .getScheme () != null ) {
651+ List <Uri > uris = new ArrayList <>();
654652 uris .add (uri );
655- initFabToSave (uris );
653+ showSaveSnackbar (uris );
656654 } else {
657655 Toast .makeText (this , R .string .error_unsupported_or_null_uri , Toast .LENGTH_LONG ).show ();
658656 }
@@ -665,7 +663,7 @@ private void checkForExternalIntent(Intent intent) {
665663 // save multiple files to filesystem
666664
667665 ArrayList <Uri > arrayList = intent .getParcelableArrayListExtra (Intent .EXTRA_STREAM );
668- initFabToSave (arrayList );
666+ showSaveSnackbar (arrayList );
669667
670668 // disable screen rotation just for convenience purpose
671669 // TODO: Support screen rotation when saving a file
@@ -674,7 +672,7 @@ private void checkForExternalIntent(Intent intent) {
674672 }
675673
676674 /** Initializes the floating action button to act as to save data from an external intent */
677- private void initFabToSave (final List <Uri > uris ) {
675+ private void showSaveSnackbar (final List <Uri > uris ) {
678676 Utils .showThemedSnackbar (
679677 this ,
680678 getString (R .string .select_save_location ),
0 commit comments