Be compatible with some bad share mechanism

Some apps need file path to share it, but it's not necessary at all.
This commit is contained in:
seven332 committed 2016-12-15 01:59:49 +08:00
1 parent 6c5ad068d2
commit 38911c2d34
4 files changed
+821 -5

No files matched your search

@@ -829,13 +829,13 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
return;
}
File dir = AppConfig.getTempDir();
File dir = AppConfig.getExternalImageDir();
if (null == dir) {
Toast.makeText(this, R.string.error_cant_create_temp_file, Toast.LENGTH_SHORT).show();
return;
}
UniFile file;
if (null == (file = mGalleryProvider.save(page, UniFile.fromFile(dir), Long.toString(System.currentTimeMillis())))) {
if (null == (file = mGalleryProvider.save(page, UniFile.fromFile(dir), mGalleryProvider.getImageFilename(page)))) {
Toast.makeText(this, R.string.error_cant_save_image, Toast.LENGTH_SHORT).show();
return;
}
@@ -853,7 +853,7 @@ public class GalleryActivity extends EhActivity implements SeekBar.OnSeekBarChan
Uri uri = new Uri.Builder()
.scheme(ContentResolver.SCHEME_CONTENT)
.authority("com.hippo.ehviewer.fileprovider")
.appendPath("temp")
.appendPath("image")
.appendPath(filename)
.build();
Intent intent = new Intent();