1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-12-26 09:38:52 -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,7 +1282,15 @@ public class MessageView extends K9Activity
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(intent);
try
{
startActivity(intent);
}
catch (Exception e)
{
Toast toast = Toast.makeText(MessageView.this, e.getMessage(), Toast.LENGTH_LONG);
toast.show();
}
}
}