mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-12 12:35:04 -05:00
Don't crash when no suitable intent found
This commit is contained in:
parent
d50a16c6b4
commit
44a52d54a7
@ -1282,8 +1282,16 @@ public class MessageView extends K9Activity
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setData(uri);
|
||||
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
|
||||
try
|
||||
{
|
||||
startActivity(intent);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Toast toast = Toast.makeText(MessageView.this, e.getMessage(), Toast.LENGTH_LONG);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user