mirror of
https://github.com/element-hq/element-android
synced 2024-11-28 13:38:49 +03:00
Add some comment
This commit is contained in:
parent
3714323d74
commit
088e8bc9f9
2 changed files with 3 additions and 0 deletions
|
@ -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 a new issue