Prevent crash

This commit is contained in:
M66B 2018-11-02 19:28:55 +00:00
parent af54c584b1
commit 906e993d0f
2 changed files with 5 additions and 1 deletions

View File

@ -897,7 +897,10 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
create.addCategory(Intent.CATEGORY_OPENABLE);
create.setType(intent.getStringExtra("type"));
create.putExtra(Intent.EXTRA_TITLE, intent.getStringExtra("name"));
startActivityForResult(create, REQUEST_ATTACHMENT);
if (create.resolveActivity(getPackageManager()) == null)
Snackbar.make(view, R.string.title_no_saf, Snackbar.LENGTH_LONG).show();
else
startActivityForResult(create, REQUEST_ATTACHMENT);
}
private void onDecrypt(Intent intent) {

View File

@ -195,6 +195,7 @@
<string name="title_no_answers">No reply templates defined</string>
<string name="title_no_viewer">No viewer app available for %1$s</string>
<string name="title_no_saf">Storage access framework not available</string>
<string name="title_attachment_saved">Attachment saved</string>
<string name="title_attachment_unavailable">Some attachments are not downloaded and will not be forwarded, continue?</string>
<string name="title_ask_delete">Delete message permanently?</string>