Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f3f42d46 authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

AM: Use /e/OS browser for custom tab intents

- Only allow /e/ OS browser, so that other webapp work properly
parent 9b8dc7bb
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ import java.net.URL
@Module
@InstallIn(SingletonComponent::class)
class AuthorizationServiceModule {
    val defaultBrowser = "foundation.e.browser"

    /**
     * Make sure to call [net.openid.appauth.AuthorizationService.dispose] when obtaining an instance.
@@ -37,6 +38,9 @@ class AuthorizationServiceModule {
        AuthorizationService(
            context,
            AppAuthConfiguration.Builder()
                .setBrowserMatcher {
                    it.packageName == defaultBrowser
                }
                .setConnectionBuilder { uri ->
                    val url = URL(uri.toString())
                    (url.openConnection() as HttpURLConnection).apply {