Skip to content

Commit

Permalink
Fix issues when sharing exported files with other applications
Browse files Browse the repository at this point in the history
We weren't adding the intent's extra text as expected. This caused email
applications to create a message without body. It also made Google Drive
crash.

Fixes codinguser#672
  • Loading branch information
rivaldi8 committed Apr 16, 2017
1 parent 33ad71a commit d2611b0
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -459,9 +459,8 @@ private void shareFiles(List<String> paths) {
shareIntent.putExtra(Intent.EXTRA_EMAIL, new String[]{defaultEmail});

SimpleDateFormat formatter = (SimpleDateFormat) SimpleDateFormat.getDateTimeInstance();
ArrayList<CharSequence> extraText = new ArrayList<>();
extraText.add(mContext.getString(R.string.description_export_email)
+ " " + formatter.format(new Date(System.currentTimeMillis())));
String extraText = mContext.getString(R.string.description_export_email)
+ " " + formatter.format(new Date(System.currentTimeMillis()));
shareIntent.putExtra(Intent.EXTRA_TEXT, extraText);

if (mContext instanceof Activity) {
Expand Down

0 comments on commit d2611b0

Please sign in to comment.