Commit 7d81759e authored by Steve Gehrman's avatar Steve Gehrman

fix2

parent cc46a34d
......@@ -66,6 +66,8 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
}
private void share(List<String> list, String type, String sharePanelTitle, String subject) {
ArrayList<Uri> uriList;
if (list == null || list.isEmpty()) {
throw new IllegalArgumentException("Non-empty list expected");
}
......@@ -85,7 +87,7 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
}
}
ArrayList<Uri> uriList = new ArrayList<>();
uriList = new ArrayList<>();
for (String path : list) {
File f = new File(path);
Uri uri = ShareUtils.getUriForFile(getContext(), f);
......@@ -117,7 +119,10 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
private void startChooserActivity(Intent shareIntent, String sharePanelTitle, ArrayList<Uri> uriList) {
Intent chooserIntent = Intent.createChooser(shareIntent, sharePanelTitle);
if (uriList != null) {
ShareUtils.grantUriPermission(getContext(), uriList, chooserIntent);
}
if (mRegistrar.activity() != null) {
mRegistrar.activity().startActivity(chooserIntent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment