Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enables Leo on Android when a global JS toggle set to blocked #27978

Merged
merged 1 commit into from
Mar 5, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import org.chromium.chrome.browser.flags.ChromeFeatureList;
import org.chromium.chrome.browser.preferences.BravePref;
import org.chromium.chrome.browser.profiles.Profile;
import org.chromium.components.browser_ui.site_settings.WebsitePreferenceBridge;
import org.chromium.components.content_settings.ContentSettingsType;
import org.chromium.components.prefs.PrefService;
import org.chromium.components.user_prefs.UserPrefs;

Expand Down Expand Up @@ -141,17 +139,7 @@ public static boolean isLeoEnabled() {
return false;
}

Profile profileToUse = BraveLeoPrefUtils.getProfile();
if (profileToUse == null) {
Log.e(TAG, "BraveLeoPrefUtils.isLeoEnabled profile is null");
// JS is enabled for most users
return true;
}

// Disables Leo when a global JAVASCRIPT toggle set to blocked.
// We want to fix that in the future.
return WebsitePreferenceBridge.isCategoryEnabled(
profileToUse, ContentSettingsType.JAVASCRIPT);
return true;
}

public static boolean isSubscriptionLinked() {
Expand Down
Loading