File tree Expand file tree Collapse file tree
flutter_web_auth_2/android/src/main/kotlin/com/linusu/flutter_web_auth_2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,10 +82,6 @@ class FlutterWebAuth2Plugin(
8282 */
8383 private fun findTargetBrowserPackageName (options : Map <String , Any >): String? {
8484 val chromePackage = " com.android.chrome"
85- // if installed chrome, use chrome at first
86- if (isSupportCustomTabs(chromePackage)) {
87- return chromePackage
88- }
8985
9086 @Suppress(" UNCHECKED_CAST" )
9187 val customTabsPackageOrder = (options[" customTabsPackageOrder" ] as Iterable <String >? ) ? : emptyList()
@@ -104,6 +100,9 @@ class FlutterWebAuth2Plugin(
104100 val allBrowsers = getInstalledBrowsers()
105101 targetPackage = allBrowsers.firstOrNull { isSupportCustomTabs(it) }
106102
103+ if (targetPackage == null ) {
104+ targetPackage = chromePackage
105+ }
107106 return targetPackage
108107 }
109108
You can’t perform that action at this time.
0 commit comments