Add some comment

This commit is contained in:
Benoit Marty 2020-06-05 10:09:49 +02:00
parent 3714323d74
commit 088e8bc9f9
2 changed files with 3 additions and 0 deletions

View File

@ -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 {

View File

@ -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) {