Don't query but try catch to bypass new package visibility feature in android 11
This commit is contained in:
parent
b105a9557e
commit
d6d1262629
|
@ -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))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue