Don't query but try catch to bypass new package visibility feature in android 11

This commit is contained in:
Matthieu 2020-12-28 17:00:02 +01:00
parent b105a9557e
commit d6d1262629
1 changed files with 2 additions and 2 deletions

View File

@ -223,9 +223,9 @@ class LoginActivity : BaseActivity() {
intent.launchUrl(this, Uri.parse(url))
} catch (e: ActivityNotFoundException) {
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
if (browserIntent.resolveActivity(packageManager) != null) {
try {
startActivity(browserIntent)
} else {
} catch(e: ActivityNotFoundException) {
return failedRegistration(getString(R.string.browser_launch_failed))
}
}