Files
brave-core/patches/chrome-android-java-src-org-chromium-chrome-browser-suggestions-SuggestionsConfig.java.patch
AlexeyBarabash a5a4c92555 [Android] Change back the number of tiles on NTP to 11 (#34845)
Resolves https://github.com/brave/brave-browser/issues/53813

This is cr146 regression

Chromium change:
https://source.chromium.org/chromium/chromium/src/+/aa3361c165e11f04d6cfbbadb6986d502a7f0e28

commit aa3361c165e11f04d6cfbbadb6986d502a7f0e28
Author: Samuel Huang <huangs@chromium.org>
Date:   Wed Jan 21 11:41:57 2026 -0800

    [Android NTP] Limit the number of MVT tiles to 8.

    Previously, the Android MVT could show up to 12 tiles in total. Custom
    Tiles (CT) had priority (up to 8), and Top Sites Tiles (TST) would fill
    the remaining slots up to the total limit of 12.

    Per UI guideline, this CL reduces the total limit from 12 to 8. Note
    that CTs continue to have priority, so if a user has 8 CTs then they
    don't see TSTs any more.

    This is an opportunity for backend optimization:
    * If 8 CTs exist then we can simply skip TST computation -- but this
      would be an abrupt transition
    * If 1-7 CTs exist then we can partially skip TST computation -- but
      this requires more refactoring.

    However, for simplicity, we skip these for now.

    Bug: 477017208
    Change-Id: Ie2251764b36d76c453985fbf22d101cb1354d637
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7495331
    Commit-Queue: Samuel Huang <huangs@chromium.org>
    Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1572479}
2026-03-20 16:31:30 +02:00

14 lines
961 B
Diff

diff --git a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsConfig.java b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsConfig.java
index c8f63334639579a7d919680ab2061a179c502654..61fd77e861589749f45a7152e756329faf7e34b8 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsConfig.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/suggestions/SuggestionsConfig.java
@@ -26,7 +26,7 @@ public final class SuggestionsConfig {
* Maximum number of tiles that is explicitly supported. UMA relies on this value, so even if
* the UI supports it, getting more can raise unexpected issues.
*/
- public static final int MAX_TILE_COUNT = 8;
+ public static final int MAX_TILE_COUNT = 11;
/** Maximum number of custom tiles supported. In C++ backend this is `kMaxNumCustomLinks`. */
public static final int MAX_NUM_CUSTOM_LINKS = 8;