From aa9d892cde59c39718529bc40a66b93a1cb78f82 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sat, 26 Aug 2023 17:00:59 +0200 Subject: [PATCH] feat(YouTube): Support version 18.32.39 (#464) --- .../patches/OpenLinksExternallyPatch.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/app/revanced/integrations/patches/OpenLinksExternallyPatch.java b/app/src/main/java/app/revanced/integrations/patches/OpenLinksExternallyPatch.java index 1640c7bf..bc23e1bd 100644 --- a/app/src/main/java/app/revanced/integrations/patches/OpenLinksExternallyPatch.java +++ b/app/src/main/java/app/revanced/integrations/patches/OpenLinksExternallyPatch.java @@ -4,16 +4,14 @@ import app.revanced.integrations.settings.SettingsEnum; public class OpenLinksExternallyPatch { /** - * Override 'android.support.customtabs.action.CustomTabsService', - * in order to open links in the default browser. This is done by returning an empty string, - * for the service that handles custom tabs in the Android support library - * which opens links in the default service instead. + * Return the intent to open links with. If empty, the link will be opened with the default browser. * - * @param original The original custom tabs service. - * @return The new, default service to open links with or the original service. + * @param originalIntent The original intent to open links with. + * @return The intent to open links with. Empty means the link will be opened with the default browser. */ - public static String enableExternalBrowser(String original) { - if (SettingsEnum.EXTERNAL_BROWSER.getBoolean()) original = ""; - return original; + public static String getIntent(String originalIntent) { + if (SettingsEnum.EXTERNAL_BROWSER.getBoolean()) return ""; + + return originalIntent; } }