mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-12 20:13:45 +02:00
Prevent crash
This commit is contained in:
@@ -483,6 +483,15 @@ public class Helper {
|
||||
}
|
||||
|
||||
static void share(Context context, File file, String type, String name) {
|
||||
try {
|
||||
_share(context, file, type, name);
|
||||
} catch (Throwable ex) {
|
||||
// java.lang.IllegalArgumentException: Failed to resolve canonical path for ...
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
static void _share(Context context, File file, String type, String name) {
|
||||
// https://developer.android.com/reference/android/support/v4/content/FileProvider
|
||||
Uri uri = FileProvider.getUriForFile(context, BuildConfig.APPLICATION_ID, file);
|
||||
Log.i("uri=" + uri);
|
||||
|
||||
Reference in New Issue
Block a user