static String getPackageSupportingCustomTabs()

in auth-lib/src/auth/java/com/spotify/sdk/android/auth/browser/CustomTabsSupportChecker.java [26:39]


    static String getPackageSupportingCustomTabs(Context context, AuthorizationRequest request) {
        String redirectUri = request.getRedirectUri();
        final String packageSupportingCustomTabs = getPackageNameSupportingCustomTabs(
                context.getPackageManager(), request.toUri()
        );
        // CustomTabs seems to have problem with redirecting back the app after auth when URI has http/https scheme
        if (!redirectUri.startsWith("http") && !redirectUri.startsWith("https") &&
                hasBrowserSupportForCustomTabs(packageSupportingCustomTabs) &&
                hasRedirectUriActivity(context.getPackageManager(), redirectUri)) {
            return packageSupportingCustomTabs;
        } else {
            return "";
        }
    }