Fix crash trying to open link when no app for it
(cherry picked from commit 176cbc9a28a814f57e6d410139dda427b2ababb6)
This commit is contained in:
parent
51d2e86e48
commit
bd5ca4d10c
1 changed files with 5 additions and 1 deletions
|
@ -890,7 +890,11 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp
|
|||
switchToConversation(xmppConnectionService.findOrCreateConversation(account, Jid.of(uri.getSchemeSpecificPart()), false, true));
|
||||
} else {
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
|
||||
startActivity(intent);
|
||||
try {
|
||||
startActivity(intent);
|
||||
} catch (ActivityNotFoundException e) {
|
||||
Toast.makeText(this, R.string.no_application_found_to_open_link, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
binding.profileItems.setOnItemLongClickListener((a0, v, pos, a3) -> {
|
||||
|
|
Loading…
Add table
Reference in a new issue