mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-28 09:15:12 +03:00
Always try to use default browser when opening custom tabs on all Android versions
This commit is contained in:
parent
54b476df4e
commit
6bba52a2b6
1 changed files with 2 additions and 5 deletions
|
@ -292,11 +292,8 @@ fun Context.openInBrowser(uri: Uri, @ColorInt toolbarColor: Int? = null) {
|
||||||
.build()
|
.build()
|
||||||
)
|
)
|
||||||
.build()
|
.build()
|
||||||
// Force allowing browser selection for Android 12+ so that verified extensions don't
|
// Force default browser so that verified extensions don't re-open Tachiyomi
|
||||||
// re-open Tachiyomi
|
intent.intent.setPackage(defaultBrowserPackageName())
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
||||||
intent.intent.setPackage(defaultBrowserPackageName())
|
|
||||||
}
|
|
||||||
intent.launchUrl(this, uri)
|
intent.launchUrl(this, uri)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
toast(e.message)
|
toast(e.message)
|
||||||
|
|
Loading…
Reference in a new issue