mirror of
https://github.com/revanced/revanced-patches
synced 2025-02-15 22:16:49 +01:00
feat(YouTube): Support version 18.32.39 (#464)
This commit is contained in:
parent
3a8620209f
commit
507e9979d4
@ -4,16 +4,14 @@ import app.revanced.integrations.settings.SettingsEnum;
|
|||||||
|
|
||||||
public class OpenLinksExternallyPatch {
|
public class OpenLinksExternallyPatch {
|
||||||
/**
|
/**
|
||||||
* Override 'android.support.customtabs.action.CustomTabsService',
|
* Return the intent to open links with. If empty, the link will be opened with the default browser.
|
||||||
* 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.
|
|
||||||
*
|
*
|
||||||
* @param original The original custom tabs service.
|
* @param originalIntent The original intent to open links with.
|
||||||
* @return The new, default service to open links with or the original service.
|
* @return The intent to open links with. Empty means the link will be opened with the default browser.
|
||||||
*/
|
*/
|
||||||
public static String enableExternalBrowser(String original) {
|
public static String getIntent(String originalIntent) {
|
||||||
if (SettingsEnum.EXTERNAL_BROWSER.getBoolean()) original = "";
|
if (SettingsEnum.EXTERNAL_BROWSER.getBoolean()) return "";
|
||||||
return original;
|
|
||||||
|
return originalIntent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user