Skip to content

Commit

Permalink
Allow uploads from external apps
Browse files Browse the repository at this point in the history
  • Loading branch information
davigonz committed Nov 2, 2018
1 parent d53e418 commit 7c3c8a2
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,13 @@ private void prepareStreamsToUpload() {
if (getIntent().getAction().equals(Intent.ACTION_SEND)) {
mStreamsToUpload = new ArrayList<>();
mStreamsToUpload.add(getIntent().getParcelableExtra(Intent.EXTRA_STREAM));
if (mStreamsToUpload.get(0) != null) {
String streamToUpload = mStreamsToUpload.get(0).toString();
if (streamToUpload.contains("/data") && streamToUpload.contains(getPackageName()) &&
!streamToUpload.contains(getCacheDir().getPath())) {
finish();
}
}
} else if (getIntent().getAction().equals(Intent.ACTION_SEND_MULTIPLE)) {
mStreamsToUpload = getIntent().getParcelableArrayListExtra(Intent.EXTRA_STREAM);
}
Expand Down

0 comments on commit 7c3c8a2

Please sign in to comment.