File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
SmartFileBrowser/src/main/java/ir/smartdevelopers/smartfilebrowser Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -789,6 +789,10 @@ private void sendBackResult(FileModel model) {
789789 Bundle bundle = new Bundle ();
790790 bundle .putStringArray (EXTRA_RESULT , filesPath );
791791 bundle .putParcelableArray (EXTRA_RESULT_URIS , filesUri );
792+ Bundle sfbExtra =getIntent ().getBundleExtra ("sfb_extra" );
793+ if (sfbExtra !=null ){
794+ bundle .putBundle ("sfb_extra" ,sfbExtra );
795+ }
792796 result .putExtras (bundle );
793797
794798 setResult (RESULT_OK , result );
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public static class IntentBuilder{
3030 private boolean showAudioTab =true ;
3131 private boolean showGalleryTab =true ;
3232 private boolean showPickFromSystemGalleyMenu =true ;
33+ private Bundle mExtra ;
3334
3435 public IntentBuilder setShowVideosInGallery (boolean showVideosInGallery ) {
3536 this .showVideosInGallery = showVideosInGallery ;
@@ -86,6 +87,7 @@ public Intent build(Context context){
8687 filePickerIntent .putExtra ("mShowGalleryTab" ,showGalleryTab );
8788 filePickerIntent .putExtra ("mFileTabFileFilter" ,mFileFilter );
8889 filePickerIntent .putExtra ("mShowPickFromSystemGalleryMenuButton" ,showPickFromSystemGalleyMenu );
90+ filePickerIntent .putExtra ("sfb_extra" ,mExtra );
8991 return filePickerIntent ;
9092 }
9193
@@ -98,6 +100,11 @@ public IntentBuilder setShowPickFromSystemGalleyMenu(boolean showPickFromSystemG
98100 this .showPickFromSystemGalleyMenu = showPickFromSystemGalleyMenu ;
99101 return this ;
100102 }
103+
104+ public IntentBuilder setExtra (Bundle extra ) {
105+ mExtra = extra ;
106+ return this ;
107+ }
101108 }
102109
103110 @ Nullable
@@ -137,4 +144,14 @@ public static Uri[] getResultUris(Intent data){
137144 }
138145 return result ;
139146 }
147+ public static Bundle getExtra (Intent data ){
148+ if (data ==null ){
149+ return null ;
150+ }
151+ Bundle bundle =data .getExtras ();
152+ if (bundle ==null ){
153+ return null ;
154+ }
155+ return bundle .getBundle ("sfb_extra" );
156+ }
140157}
You can’t perform that action at this time.
0 commit comments