1
0
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:
Daniel Applebaum 2009-08-29 22:55:14 +00:00
parent d50a16c6b4
commit 44a52d54a7

View File

@ -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