[MM-21888] Don't use localPath when it's the share extension cache dir (#3845)

* Don't use localPath when it's the share extension cache dir

* Move android pasted images to cache image folder

* Use Files.move instead of FileInput / FileOutput stream

* Remove commented code and not needed imports
This commit is contained in:
Miguel Alatzar
2020-01-27 09:58:30 -07:00
committed by Amit Uttam
parent 7e7c652828
commit d25561bb83
5 changed files with 30 additions and 3 deletions

View File

@@ -212,7 +212,7 @@ public class MainApplication extends NavigationApplication implements INotificat
instance = this;
// Delete any previous temp files created by the app
File tempFolder = new File(getApplicationContext().getCacheDir(), "mmShare");
File tempFolder = new File(getApplicationContext().getCacheDir(), ShareModule.CACHE_DIR_NAME);
RealPathUtil.deleteTempFiles(tempFolder);
Log.i("ReactNative", "Cleaning temp cache " + tempFolder.getAbsolutePath());