Commit 1a4e054f authored by Steve Gehrman's avatar Steve Gehrman

fix3

parent 7d81759e
...@@ -66,7 +66,7 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi ...@@ -66,7 +66,7 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
} }
private void share(List<String> list, String type, String sharePanelTitle, String subject) { private void share(List<String> list, String type, String sharePanelTitle, String subject) {
ArrayList<Uri> uriList; ArrayList<Uri> uriList = new ArrayList<>();;
if (list == null || list.isEmpty()) { if (list == null || list.isEmpty()) {
throw new IllegalArgumentException("Non-empty list expected"); throw new IllegalArgumentException("Non-empty list expected");
...@@ -87,7 +87,6 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi ...@@ -87,7 +87,6 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
} }
} }
uriList = new ArrayList<>();
for (String path : list) { for (String path : list) {
File f = new File(path); File f = new File(path);
Uri uri = ShareUtils.getUriForFile(getContext(), f); Uri uri = ShareUtils.getUriForFile(getContext(), f);
...@@ -119,11 +118,8 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi ...@@ -119,11 +118,8 @@ public class ShareExtendPlugin implements MethodChannel.MethodCallHandler, Plugi
private void startChooserActivity(Intent shareIntent, String sharePanelTitle, ArrayList<Uri> uriList) { private void startChooserActivity(Intent shareIntent, String sharePanelTitle, ArrayList<Uri> uriList) {
Intent chooserIntent = Intent.createChooser(shareIntent, sharePanelTitle); Intent chooserIntent = Intent.createChooser(shareIntent, sharePanelTitle);
ShareUtils.grantUriPermission(getContext(), uriList, chooserIntent);
if (uriList != null) {
ShareUtils.grantUriPermission(getContext(), uriList, chooserIntent);
}
if (mRegistrar.activity() != null) { if (mRegistrar.activity() != null) {
mRegistrar.activity().startActivity(chooserIntent); mRegistrar.activity().startActivity(chooserIntent);
} else { } else {
......
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