Add some comment
This commit is contained in:
parent
3714323d74
commit
088e8bc9f9
|
@ -70,6 +70,8 @@ fun openUrlInExternalBrowser(context: Context, uri: Uri?) {
|
|||
|
||||
/**
|
||||
* Open url in custom tab or, if not available, in the default browser
|
||||
* If several compatible browsers are installed, the user will be proposed to choose one.
|
||||
* Ref: https://developer.chrome.com/multidevice/android/customtabs
|
||||
*/
|
||||
fun openUrlInChromeCustomTab(context: Context, session: CustomTabsSession?, url: String) {
|
||||
try {
|
||||
|
|
|
@ -43,6 +43,7 @@ open class LoginSignUpSignInSsoFragment @Inject constructor() : LoginSignUpSignI
|
|||
|
||||
val packageName = CustomTabsClient.getPackageName(requireContext(), null)
|
||||
|
||||
// packageName can be null if there are 0 or several CustomTabs compatible browsers installed on the device
|
||||
if (packageName != null) {
|
||||
customTabsServiceConnection = object : CustomTabsServiceConnection() {
|
||||
override fun onCustomTabsServiceConnected(name: ComponentName, client: CustomTabsClient) {
|
||||
|
|
Loading…
Reference in New Issue