From b272f4d95e03907d180e32b307c6db2f2cd18240 Mon Sep 17 00:00:00 2001 From: Carmelo Messina Date: Wed, 23 Aug 2023 17:23:59 +0200 Subject: [PATCH] #202 Disable PartnerCustomizations --- build/bromite_patches_list.txt | 3 +- .../00Disable-PartnerCustomizations.patch | 37 +++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 build/patches/00Disable-PartnerCustomizations.patch diff --git a/build/bromite_patches_list.txt b/build/bromite_patches_list.txt index 8b3fad03..4d03a028 100644 --- a/build/bromite_patches_list.txt +++ b/build/bromite_patches_list.txt @@ -285,4 +285,5 @@ Timezone-customization.patch 00Allow-DocumentPiP-if-PopupsAndRedirects-are-active.patch 00allow-the-download-of-clang-for-windows-crossbuild.patch 00Temp-disable-predictive-back-gesture.patch -00Add-option-to-disable-snapshots.patch \ No newline at end of file +00Add-option-to-disable-snapshots.patch +00Disable-PartnerCustomizations.patch \ No newline at end of file diff --git a/build/patches/00Disable-PartnerCustomizations.patch b/build/patches/00Disable-PartnerCustomizations.patch new file mode 100644 index 00000000..e678c36c --- /dev/null +++ b/build/patches/00Disable-PartnerCustomizations.patch @@ -0,0 +1,37 @@ +From: uazo +Date: Tue, 22 Aug 2023 09:02:50 +0000 +Subject: Disable PartnerCustomizations + +--- + chrome/browser/flags/android/chrome_feature_list.cc | 4 ++-- + .../partnercustomizations/PartnerBrowserCustomizations.java | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/chrome/browser/flags/android/chrome_feature_list.cc b/chrome/browser/flags/android/chrome_feature_list.cc +--- a/chrome/browser/flags/android/chrome_feature_list.cc ++++ b/chrome/browser/flags/android/chrome_feature_list.cc +@@ -865,8 +865,8 @@ BASE_FEATURE(kOpaqueOriginForIncomingIntents, + base::FEATURE_ENABLED_BY_DEFAULT); + + BASE_FEATURE(kPartnerCustomizationsUma, +- "PartnerCustomizationsUma", +- base::FEATURE_ENABLED_BY_DEFAULT); ++ "PartnerCustomizationsUma", // disabled ++ base::FEATURE_DISABLED_BY_DEFAULT); // by default + BASE_FEATURE(kProbabilisticCryptidRenderer, + "ProbabilisticCryptidRenderer", + base::FEATURE_DISABLED_BY_DEFAULT); +diff --git a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java +--- a/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java ++++ b/chrome/browser/partnercustomizations/java/src/org/chromium/chrome/browser/partnercustomizations/PartnerBrowserCustomizations.java +@@ -213,7 +213,7 @@ public class PartnerBrowserCustomizations { + boolean systemOrPreStable = + (context.getApplicationInfo().flags & ApplicationInfo.FLAG_SYSTEM) == 1 + || !VersionInfo.isStableBuild(); +- if (!systemOrPreStable) { ++ if ((true)) { + // Only allow partner customization if this browser is a system package, or + // is in pre-stable channels. + return null; +-- +2.25.1