Skip to content

Commit

Permalink
feat(YouTube): Support version 18.32.39 (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Aug 26, 2023
1 parent aff6e98 commit aa9d892
Showing 1 changed file with 7 additions and 9 deletions.
Expand Up @@ -4,16 +4,14 @@

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;
}
}

0 comments on commit aa9d892

Please sign in to comment.