Browse Source

Update to 84.0.4147.89-1; bug fixes

tags/84.0.4147.89-1
wchen342 9 months ago
parent
commit
4769e664d2
Signed by untrusted user: wchen342 GPG Key ID: 720B70365E800508
39 changed files with 3325 additions and 632 deletions
  1. +2
    -2
      build.sh
  2. +179
    -128
      domain_sub_2.list
  3. +1
    -1
      misc/android_studio_setup.sh
  4. +2
    -2
      patches/Bromite/Add-exit-menu-item.patch
  5. +3
    -3
      patches/Bromite/Add-flag-to-disable-WebGL.patch
  6. +24
    -23
      patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch
  7. +5
    -5
      patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
  8. +44
    -44
      patches/Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
  9. +4
    -9
      patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch
  10. +2
    -2
      patches/Bromite/Remove-account-permissions-from-manifest.patch
  11. +8
    -8
      patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch
  12. +2597
    -14
      patches/Other/debug-fix.patch
  13. +1
    -1
      patches/Other/generate_gradle.patch
  14. +10
    -0
      patches/Other/remove-jdk.patch
  15. +11
    -6
      patches/Other/ungoogled-main-repo-fix.patch
  16. +1
    -1
      patches/Unobtainium/kill-Auth.patch
  17. +11
    -11
      patches/Unobtainium/kill-GCM.patch
  18. +1
    -1
      patches/Unobtainium/kill-Location-fall-back-to-system.patch
  19. +1
    -1
      patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
  20. +3
    -3
      patches/Vanadium/0021-disable-media-router-by-default.patch
  21. +2
    -2
      patches/series
  22. +6
    -6
      patches/src-fix/fix-prefs.patch
  23. +15
    -15
      patches/src-fix/fix-safe-browsing-prefs.patch
  24. +1
    -1
      patches/src-fix/fix-unkown-warning-clang.patch
  25. +3
    -3
      patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch
  26. +1
    -1
      patches/ungoogled-chromium-android/Disable-contextual-search.patch
  27. +1
    -1
      patches/ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch
  28. +4
    -4
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  29. +51
    -89
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  30. +64
    -65
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  31. +112
    -54
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.fido-com.google.android.gms.iid-com.google.android.gms.instantapps-com.google.android.gms.location.patch
  32. +1
    -1
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
  33. +5
    -5
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  34. +58
    -72
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  35. +12
    -16
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  36. +3
    -3
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  37. +11
    -5
      patches/ungoogled-chromium-android/change-package-name-chromium.patch
  38. +64
    -23
      patches/ungoogled-chromium-android/enable-update-notification.patch
  39. +1
    -1
      patches/ungoogled-chromium-android/flag-enable-process-sharing.patch

+ 2
- 2
build.sh View File

@ -8,7 +8,7 @@ chrome_target=chrome_public_apk
mono_target=monochrome_public_apk
webview_target=system_webview_apk
chromium_version=83.0.4103.116
chromium_version=84.0.4147.89
ungoogled_chromium_revision=1
# Argument parser from https://stackoverflow.com/questions/192249/how-do-i-parse-command-line-arguments-in-bash/29754866#29754866
@ -154,7 +154,7 @@ popd
## Hooks
python src/build/util/lastchange.py -o src/build/util/LASTCHANGE
python src/tools/download_cros_provided_profile.py --newest_state=src/chrome/android/profiles/newest.txt --local_state=src/chrome/android/profiles/local.txt --output_name=src/chrome/android/profiles/afdo.prof --gs_url_base=chromeos-prebuilt/afdo-job/llvm
python src/tools/download_optimization_profile.py --newest_state=src/chrome/android/profiles/newest.txt --local_state=src/chrome/android/profiles/local.txt --output_name=src/chrome/android/profiles/afdo.prof --gs_url_base=chromeos-prebuilt/afdo-job/llvm
python src/build/util/lastchange.py -m GPU_LISTS_VERSION --revision-id-only --header src/gpu/config/gpu_lists_version.h
python src/build/util/lastchange.py -m SKIA_COMMIT_HASH -s src/third_party/skia --header src/skia/ext/skia_commit_hash.h


+ 179
- 128
domain_sub_2.list
File diff suppressed because it is too large
View File


+ 1
- 1
misc/android_studio_setup.sh View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=83.0.4103.116
chromium_version=84.0.4147.89
chrome_target=chrome_public_apk
mono_target=monochrome_public_apk
webview_target=system_webview_apk


+ 2
- 2
patches/Bromite/Add-exit-menu-item.patch View File

@ -23,7 +23,7 @@ Corrected Exit functionality
<!-- Items shown only in the tab switcher -->
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -1995,6 +1995,8 @@ public abstract class ChromeActivity<C e
@@ -2027,6 +2027,8 @@ public abstract class ChromeActivity<C e
AddToHomescreenCoordinator.showForAppMenu(
this, getWindowAndroid(), getModalDialogManager(), currentTab.getWebContents());
RecordUserAction.record("MobileMenuAddToHomescreen");
@ -49,7 +49,7 @@ Corrected Exit functionality
@Override
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -2876,6 +2876,9 @@ To change this setting, <ph name="BEGIN_
@@ -2447,6 +2447,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_MENU_SETTINGS" desc="Menu item for opening browser settings. [CHAR-LIMIT=27]">
Settings
</message>


+ 3
- 3
patches/Bromite/Add-flag-to-disable-WebGL.patch View File

@ -10,7 +10,7 @@ Subject: Add flag to disable WebGL
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1836,6 +1836,9 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2050,6 +2050,9 @@ const FeatureEntry kFeatureEntries[] = {
flag_descriptions::kAccelerated2dCanvasName,
flag_descriptions::kAccelerated2dCanvasDescription, kOsAll,
SINGLE_DISABLE_VALUE_TYPE(switches::kDisableAccelerated2dCanvas)},
@ -22,7 +22,7 @@ Subject: Add flag to disable WebGL
SINGLE_VALUE_TYPE(cc::switches::kShowCompositedLayerBorders)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -401,6 +401,10 @@ const char kDeviceDiscoveryNotifications
@@ -452,6 +452,10 @@ const char kDeviceDiscoveryNotifications
const char kDeviceDiscoveryNotificationsDescription[] =
"Device discovery notifications on local network.";
@ -35,7 +35,7 @@ Subject: Add flag to disable WebGL
"With this flag on, tasks of the lowest priority will not be executed "
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -255,6 +255,9 @@ extern const char kDebugShortcutsDescrip
@@ -286,6 +286,9 @@ extern const char kDebugShortcutsDescrip
extern const char kDeviceDiscoveryNotificationsName[];
extern const char kDeviceDiscoveryNotificationsDescription[];


patches/Bromite/Add-flags-to-disable-device-motion-and-orientation-APIs.patch → patches/Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch View File

@ -1,6 +1,6 @@
From: csagan5 <[email protected]>
Date: Mon, 22 Oct 2018 21:29:53 +0200
Subject: Add flags to disable device motion and orientation APIs
Subject: Add flags to disable device motion/orientation APIs
Both flags will be disabled by default and prevent usage of gyroscope and
legacy acceleration events.
@ -12,14 +12,14 @@ legacy acceleration events.
content/public/common/content_features.cc | 10 ++++++++++
content/public/common/content_features.h | 2 ++
third_party/blink/public/platform/web_runtime_features.h | 2 ++
third_party/blink/renderer/modules/modules_initializer.cc | 9 ++++++---
third_party/blink/renderer/modules/modules_initializer.cc | 10 +++++++---
third_party/blink/renderer/platform/exported/web_runtime_features.cc | 8 ++++++++
third_party/blink/renderer/platform/runtime_enabled_features.json5 | 8 ++++++++
10 files changed, 59 insertions(+), 3 deletions(-)
10 files changed, 60 insertions(+), 3 deletions(-)
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2055,6 +2055,12 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2266,6 +2266,12 @@ const FeatureEntry kFeatureEntries[] = {
{"enable-gpu-rasterization", flag_descriptions::kGpuRasterizationName,
flag_descriptions::kGpuRasterizationDescription, kOsAll,
MULTI_VALUE_TYPE(kEnableGpuRasterizationChoices)},
@ -34,7 +34,7 @@ legacy acceleration events.
MULTI_VALUE_TYPE(kEnableOopRasterizationChoices)},
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -600,6 +600,14 @@ const char kWinrtSensorsImplementationDe
@@ -678,6 +678,14 @@ const char kWinrtSensorsImplementationDe
"Enables usage of the Windows.Devices.Sensors WinRT APIs on Windows for "
"sensors";
@ -51,7 +51,7 @@ legacy acceleration events.
const char kEnableGenericSensorExtraClassesDescription[] =
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -365,6 +365,12 @@ extern const char kWinrtGeolocationImple
@@ -410,6 +410,12 @@ extern const char kWinrtGeolocationImple
extern const char kWinrtSensorsImplementationName[];
extern const char kWinrtSensorsImplementationDescription[];
@ -66,7 +66,7 @@ legacy acceleration events.
--- a/content/child/runtime_features.cc
+++ b/content/child/runtime_features.cc
@@ -87,6 +87,9 @@ void SetRuntimeFeatureDefaultsForPlatfor
@@ -88,6 +88,9 @@ void SetRuntimeFeatureDefaultsForPlatfor
command_line.HasSwitch(
switches::kEnableGpuMemoryBufferCompositorResources) &&
!command_line.HasSwitch(switches::kDisableWebGLImageChromium) &&
@ -78,7 +78,7 @@ legacy acceleration events.
#else
--- a/content/public/common/content_features.cc
+++ b/content/public/common/content_features.cc
@@ -785,6 +785,16 @@ const base::Feature kWebOtpBackend{"kWeb
@@ -804,6 +804,16 @@ const base::Feature kWebOtpBackend{"kWeb
// TODO(rouslan): Remove this.
const base::Feature kWebPayments{"WebPayments",
base::FEATURE_ENABLED_BY_DEFAULT};
@ -97,7 +97,7 @@ legacy acceleration events.
const base::Feature kWebPaymentsMinimalUI{"WebPaymentsMinimalUI",
--- a/content/public/common/content_features.h
+++ b/content/public/common/content_features.h
@@ -172,6 +172,8 @@ CONTENT_EXPORT extern const base::Featur
@@ -176,6 +176,8 @@ CONTENT_EXPORT extern const base::Featur
CONTENT_EXPORT extern const base::Feature kWebXrIncubations;
CONTENT_EXPORT extern const base::Feature kWebXrPermissionsApi;
@ -108,7 +108,7 @@ legacy acceleration events.
CONTENT_EXPORT extern const base::Feature
--- a/third_party/blink/public/platform/web_runtime_features.h
+++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -100,6 +100,8 @@ class WebRuntimeFeatures {
@@ -98,6 +98,8 @@ class WebRuntimeFeatures {
BLINK_PLATFORM_EXPORT static void EnableCSSHexAlphaColor(bool);
BLINK_PLATFORM_EXPORT static void EnableSameSiteByDefaultCookies(bool);
BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool);
@ -119,25 +119,26 @@ legacy acceleration events.
BLINK_PLATFORM_EXPORT static void EnableDecodeJpeg420ImagesToYUV(bool);
--- a/third_party/blink/renderer/modules/modules_initializer.cc
+++ b/third_party/blink/renderer/modules/modules_initializer.cc
@@ -244,9 +244,12 @@ void ModulesInitializer::InitInspectorAg
void ModulesInitializer::OnClearWindowObjectInMainWorld(
@@ -224,9 +224,13 @@ void ModulesInitializer::OnClearWindowOb
Document& document,
const Settings& settings) const {
- DeviceMotionController::From(document);
- DeviceOrientationController::From(document);
- DeviceOrientationAbsoluteController::From(document);
LocalDOMWindow& window = *document.domWindow();
- DeviceMotionController::From(window);
- DeviceOrientationController::From(window);
- DeviceOrientationAbsoluteController::From(window);
+ if (RuntimeEnabledFeatures::DeviceMotionEnabled())
+ DeviceMotionController::From(document);
+ DeviceMotionController::From(window);
+ if (RuntimeEnabledFeatures::DeviceOrientationEnabled()) {
+ DeviceOrientationController::From(document);
+ DeviceOrientationAbsoluteController::From(document);
+ DeviceOrientationController::From(window);
+ DeviceOrientationAbsoluteController::From(window);
+ }
NavigatorGamepad::From(document);
NavigatorServiceWorker::From(document);
DOMWindowStorageController::From(document);
+
NavigatorGamepad::From(*window.navigator());
// TODO(nhiroki): Figure out why ServiceWorkerContainer needs to be eagerly
--- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc
+++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -183,6 +183,14 @@ void WebRuntimeFeatures::EnableScrollTop
@@ -179,6 +179,14 @@ void WebRuntimeFeatures::EnableScrollTop
RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(enable);
}
@ -154,7 +155,7 @@ legacy acceleration events.
}
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -1203,6 +1203,14 @@
@@ -1245,6 +1245,14 @@
status: "experimental",
},
{

+ 5
- 5
patches/Bromite/Add-option-to-not-persist-tabs-across-sessions.patch View File

@ -38,7 +38,7 @@ Subject: Add option to not persist tabs across sessions
android:key="do_not_track"
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -1092,8 +1092,10 @@ public class ChromeTabbedActivity
@@ -1149,8 +1149,10 @@ public class ChromeTabbedActivity
boolean hadCipherData =
CipherFactory.getInstance().restoreFromBundle(getSavedInstanceState());
@ -68,7 +68,7 @@ Subject: Add option to not persist tabs across sessions
import org.chromium.base.BuildInfo;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.help.HelpAndFeedback;
@@ -37,6 +39,7 @@ public class PrivacySettings
@@ -38,6 +40,7 @@ public class PrivacySettings
extends PreferenceFragmentCompat implements Preference.OnPreferenceChangeListener {
private static final String PREF_CAN_MAKE_PAYMENT = "can_make_payment";
private static final String PREF_NETWORK_PREDICTIONS = "preload_pages";
@ -76,7 +76,7 @@ Subject: Add option to not persist tabs across sessions
private static final String PREF_USAGE_STATS = "usage_stats_reporting";
private static final String PREF_DO_NOT_TRACK = "do_not_track";
private static final String PREF_SYNC_AND_SERVICES_LINK = "sync_and_services_link";
@@ -84,7 +87,11 @@ public class PrivacySettings
@@ -86,7 +89,11 @@ public class PrivacySettings
Pref.CAN_MAKE_PAYMENT_ENABLED, (boolean) newValue);
} else if (PREF_NETWORK_PREDICTIONS.equals(key)) {
PrivacyPreferencesManager.getInstance().setNetworkPredictionEnabled((boolean) newValue);
@ -89,7 +89,7 @@ Subject: Add option to not persist tabs across sessions
return true;
}
@@ -132,6 +139,11 @@ public class PrivacySettings
@@ -134,6 +141,11 @@ public class PrivacySettings
} else {
getPreferenceScreen().removePreference(usageStatsPref);
}
@ -103,7 +103,7 @@ Subject: Add option to not persist tabs across sessions
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -3674,6 +3674,12 @@ Only you can see what your camera is loo
@@ -3220,6 +3220,12 @@ Only you can see what your camera is loo
<message name="IDS_CONTEXTMENU_IMAGE_TITLE" desc="The title of a context menu tab when the item pressed contains more than one type. This indicates that all the actions are related to the image.">
IMAGE
</message>


+ 44
- 44
patches/Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch View File

@ -12,12 +12,12 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java | 92 ++++++++++
chrome/android/java/src/org/chromium/chrome/browser/settings/DoHPreferences.java | 54 +++++
chrome/app/generated_resources.grd | 6
chrome/browser/flags/android/cached_feature_flags.cc | 24 ++
chrome/browser/flags/android/cached_feature_flags.cc | 25 ++
chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java | 24 ++
chrome/browser/net/stub_resolver_config_reader.cc | 40 ----
chrome/browser/net/stub_resolver_config_reader.cc | 36 ---
chrome/browser/ui/android/strings/android_chrome_strings.grd | 11 +
chrome/common/chrome_features.cc | 4
14 files changed, 322 insertions(+), 34 deletions(-)
14 files changed, 322 insertions(+), 31 deletions(-)
create mode 100644 chrome/android/java/res/layout/doh_editor.xml
create mode 100644 chrome/android/java/res/xml/doh_preferences.xml
create mode 100644 chrome/android/java/src/org/chromium/chrome/browser/settings/DoHEditor.java
@ -25,7 +25,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
--- a/chrome/android/chrome_java_resources.gni
+++ b/chrome/android/chrome_java_resources.gni
@@ -1107,6 +1107,7 @@ chrome_java_resources = [
@@ -953,6 +953,7 @@ chrome_java_resources = [
"java/res/layout/device_item_list.xml",
"java/res/layout/distilled_page_font_family_spinner.xml",
"java/res/layout/distilled_page_prefs_view.xml",
@ -33,17 +33,17 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
"java/res/layout/edit_url_suggestion_layout.xml",
"java/res/layout/editable_option_editor_footer.xml",
"java/res/layout/editable_option_editor_icons.xml",
@@ -1346,6 +1347,7 @@ chrome_java_resources = [
@@ -1184,6 +1185,7 @@ chrome_java_resources = [
"java/res/xml/data_reduction_preferences.xml",
"java/res/xml/data_reduction_preferences_off_lite_mode.xml",
"java/res/xml/developer_preferences.xml",
+ "java/res/xml/doh_preferences.xml",
"java/res/xml/do_not_track_preferences.xml",
"java/res/xml/download_preferences.xml",
"java/res/xml/google_services_preferences.xml",
"java/res/xml/homepage_preferences.xml",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1399,6 +1399,8 @@ chrome_java_sources = [
@@ -1370,6 +1370,8 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/searchwidget/SearchWidgetProvider.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/DevicePickerBottomSheetAdapter.java",
"java/src/org/chromium/chrome/browser/send_tab_to_self/DevicePickerBottomSheetContent.java",
@ -79,7 +79,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ android:orientation="vertical"
+ android:focusableInTouchMode="true" >
+
+ <org.chromium.components.browser_ui.widget.text.ChromeTextInputLayout
+ <com.google.android.material.textfield.TextInputLayout
+ android:id="@+id/doh_url"
+ style="@style/PreferenceScreenLayout"
+ android:layout_width="match_parent"
@ -93,7 +93,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+ android:inputType="textUri"
+ android:singleLine="true"
+ android:hint="@string/options_doh_edit_label" />
+ </org.chromium.components.browser_ui.widget.text.ChromeTextInputLayout>
+ </com.google.android.material.textfield.TextInputLayout>
+
+ <Space style="@style/ButtonBarTopSpacer" />
+ <View style="@style/ButtonBarTopDivider" />
@ -122,7 +122,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+</FrameLayout>
--- a/chrome/android/java/res/values/values.xml
+++ b/chrome/android/java/res/values/values.xml
@@ -75,6 +75,8 @@
@@ -72,6 +72,8 @@
<integer name="download_infobar_bar_fill_in_delay">400</integer>
<integer name="download_infobar_bar_fill_out_delay">200</integer>
@ -183,7 +183,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+package org.chromium.chrome.browser.settings;
+
+import android.os.Bundle;
+import android.support.v4.app.Fragment;
+import androidx.fragment.app.Fragment;
+import android.text.Editable;
+import android.text.TextWatcher;
+import android.view.LayoutInflater;
@ -327,7 +327,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+}
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6864,6 +6864,12 @@ the Bookmarks menu.">
@@ -6912,6 +6912,12 @@ the Bookmarks menu.">
</if>
<if expr="is_android">
@ -353,14 +353,15 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
using base::android::ConvertJavaStringToUTF8;
using base::android::ConvertUTF8ToJavaString;
using base::android::JavaParamRef;
@@ -41,3 +45,23 @@ static jboolean JNI_CachedFeatureFlags_I
@@ -41,3 +45,24 @@ static jboolean JNI_CachedFeatureFlags_I
return content::IsOutOfProcessNetworkService() &&
base::FeatureList::IsEnabled(features::kWarmUpNetworkProcess);
}
+
+static jboolean JNI_CachedFeatureFlags_GetDoHEnabled(JNIEnv* env) {
+ std::string doh_mode = g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsMode);
+ return ((doh_mode == "secure") || (doh_mode == "auto"));
+ return ((doh_mode == "secure") || (doh_mode == "auto"))
+ && !g_browser_process->local_state()->GetString(prefs::kDnsOverHttpsTemplates).empty();
+}
+
+static void JNI_CachedFeatureFlags_SetDoHEnabled(JNIEnv* env, jboolean enabled) {
@ -379,7 +380,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
+}
--- a/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
+++ b/chrome/browser/flags/android/java/src/org/chromium/chrome/browser/flags/CachedFeatureFlags.java
@@ -124,6 +124,26 @@ public class CachedFeatureFlags {
@@ -127,6 +127,26 @@ public class CachedFeatureFlags {
private static Map<String, String> sOverridesTestFeatures;
private static String sReachedCodeProfilerTrialGroup;
@ -406,7 +407,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
/**
* Checks if a cached feature flag is enabled.
*
@@ -393,6 +413,10 @@ public class CachedFeatureFlags {
@@ -401,6 +421,10 @@ public class CachedFeatureFlags {
@NativeMethods
interface Natives {
@ -419,25 +420,11 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
}
--- a/chrome/browser/net/stub_resolver_config_reader.cc
+++ b/chrome/browser/net/stub_resolver_config_reader.cc
@@ -122,41 +122,12 @@ StubResolverConfigReader::StubResolverCo
local_state_->SetDefaultPrefValue(prefs::kBuiltInDnsClientEnabled,
base::Value(ShouldEnableAsyncDns()));
std::string default_doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
- std::string default_doh_templates;
- if (base::FeatureList::IsEnabled(features::kDnsOverHttps)) {
- if (features::kDnsOverHttpsFallbackParam.Get()) {
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeAutomatic;
- } else {
- default_doh_mode = chrome_browser_net::kDnsOverHttpsModeSecure;
- }
- default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
- }
+ std::string default_doh_templates = features::kDnsOverHttpsTemplatesParam.Get();
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsMode,
base::Value(default_doh_mode));
@@ -140,28 +140,6 @@ StubResolverConfigReader::StubResolverCo
base::Value(SecureDnsConfig::ModeToString(default_secure_dns_mode)));
local_state_->SetDefaultPrefValue(prefs::kDnsOverHttpsTemplates,
base::Value(default_doh_templates));
-
- // If the user has explicitly enabled or disabled the DoH experiment in
- // chrome://flags and the DoH UI setting is not visible, store that choice
- // in the user prefs so that it can be persisted after the experiment ends.
@ -449,11 +436,11 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
- if (entries.count("[email protected]")) {
- // The user has "Enabled" selected.
- local_state_->SetString(prefs::kDnsOverHttpsMode,
- chrome_browser_net::kDnsOverHttpsModeAutomatic);
- SecureDnsConfig::kModeAutomatic);
- } else if (entries.count("[email protected]")) {
- // The user has "Disabled" selected.
- local_state_->SetString(prefs::kDnsOverHttpsMode,
- chrome_browser_net::kDnsOverHttpsModeOff);
- SecureDnsConfig::kModeOff);
- } else {
- // The user has "Default" selected.
- local_state_->ClearPref(prefs::kDnsOverHttpsMode);
@ -462,25 +449,38 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
}
pref_change_registrar_.Add(prefs::kBuiltInDnsClientEnabled, pref_callback);
@@ -346,8 +317,13 @@ void StubResolverConfigReader::GetAndUpd
@@ -323,21 +301,21 @@ SecureDnsConfig StubResolverConfigReader
parental_controls_checked_ = true;
}
- if (record_metrics) {
- UMA_HISTOGRAM_ENUMERATION("Net.DNS.DnsConfig.SecureDnsMode", mode_details);
- }
-
std::string doh_templates =
local_state_->GetString(prefs::kDnsOverHttpsTemplates);
- std::string server_method;
+ if (doh_templates.empty()) {
+ secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
+ }
+ LOG(INFO) << "DoH templates: '" << doh_templates << "' with mode " << SecureDnsConfig::ModeToString(secure_dns_mode);
std::vector<net::DnsOverHttpsServerConfig> dns_over_https_servers;
base::Optional<std::vector<network::mojom::DnsOverHttpsServerPtr>>
servers_mojo;
- if (!doh_templates.empty() &&
- secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
+ if (doh_templates.empty()) {
+ secure_dns_mode = net::DnsConfig::SecureDnsMode::OFF;
+ doh_mode = chrome_browser_net::kDnsOverHttpsModeOff;
+ }
+ LOG(INFO) << "DoH templates: '" << doh_templates << "' with mode " << doh_mode;
+ if (secure_dns_mode != net::DnsConfig::SecureDnsMode::OFF) {
+ std::string server_method;
for (base::StringPiece server_template :
chrome_browser_net::SplitDohTemplateGroup(doh_templates)) {
chrome_browser_net::secure_dns::SplitGroup(doh_templates)) {
if (!net::dns_util::IsValidDohTemplate(server_template, &server_method)) {
+ LOG(WARNING) << "DoH templates: skipping invalid: '" << server_template << "'";
continue;
}
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -594,6 +594,17 @@ CHAR-LIMIT guidelines:
@@ -599,6 +599,17 @@ CHAR-LIMIT guidelines:
Chrome Passwords
</message>
@ -500,7 +500,7 @@ Subject: Add user setting for DNS-over-HTTPS (DoH) custom URL
Enter custom web address
--- a/chrome/common/chrome_features.cc
+++ b/chrome/common/chrome_features.cc
@@ -265,12 +265,12 @@ const base::Feature kDnsHttpssvc{"DnsHtt
@@ -281,12 +281,12 @@ const base::Feature kDefaultWebAppInstal
// Enable DNS over HTTPS (DoH).
const base::Feature kDnsOverHttps{"DnsOverHttps",


+ 4
- 9
patches/Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch View File

@ -6,14 +6,13 @@ This prevents leakage of the local IP address.
See also: https://github.com/bromite/bromite/issues/553
---
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
.../peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
chrome/browser/ui/browser_ui_prefs.cc | 4 ++--
third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc | 7 ++++---
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_ui_prefs.cc
--- a/chrome/browser/ui/browser_ui_prefs.cc
+++ b/chrome/browser/ui/browser_ui_prefs.cc
@@ -83,8 +83,8 @@ void RegisterBrowserUserPrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -83,8 +83,8 @@ void RegisterBrowserUserPrefs(user_prefs
false);
#endif
// TODO(guoweis): Remove next 2 options at M50.
@ -24,10 +23,9 @@ diff --git a/chrome/browser/ui/browser_ui_prefs.cc b/chrome/browser/ui/browser_u
registry->RegisterStringPref(prefs::kWebRTCIPHandlingPolicy,
blink::kWebRTCIPHandlingDefault);
registry->RegisterStringPref(prefs::kWebRTCUDPPortRange, std::string());
diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
--- a/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
+++ b/third_party/blink/renderer/modules/peerconnection/peer_connection_dependency_factory.cc
@@ -435,12 +435,13 @@ PeerConnectionDependencyFactory::CreatePortAllocator(
@@ -434,12 +434,13 @@ PeerConnectionDependencyFactory::CreateP
port_config.enable_nonproxied_udp = false;
break;
case DEFAULT:
@ -44,6 +42,3 @@ diff --git a/third_party/blink/renderer/modules/peerconnection/peer_connection_d
<< "policy: " << policy
<< ", multiple_routes: " << port_config.enable_multiple_routes
<< ", nonproxied_udp: " << port_config.enable_nonproxied_udp
--
2.17.1

+ 2
- 2
patches/Bromite/Remove-account-permissions-from-manifest.patch View File

@ -42,7 +42,7 @@ Subject: Remove all sync and account permissions/features from manifest
{% block extra_uses_permissions %}
{% endblock %}
@@ -932,16 +924,6 @@ by a child template that "extends" this
@@ -860,16 +852,6 @@ by a child template that "extends" this
android:resource="@xml/file_paths" />
</provider>
@ -59,7 +59,7 @@ Subject: Remove all sync and account permissions/features from manifest
<!-- Broadcast receiver that will be notified of account changes -->
<receiver android:name="org.chromium.chrome.browser.services.AccountsChangedReceiver">
<intent-filter>
@@ -1010,14 +992,6 @@ by a child template that "extends" this
@@ -938,14 +920,6 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />


+ 8
- 8
patches/Bromite/Revert-flags-remove-disable-pull-to-refresh-effect.patch View File

@ -12,7 +12,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2385,6 +2385,10 @@ const FeatureEntry kFeatureEntries[] = {
@@ -2619,6 +2619,10 @@ const FeatureEntry kFeatureEntries[] = {
SINGLE_VALUE_TYPE(switches::kHostedAppQuitNotification)},
#endif // OS_MACOSX
#if defined(OS_ANDROID)
@ -25,7 +25,7 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
flag_descriptions::kTranslateForceTriggerOnEnglishDescription, kOsAndroid,
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -65,6 +65,11 @@
@@ -70,6 +70,11 @@
"expiry_milestone": 88
},
{
@ -39,9 +39,9 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
// This flag is used for frequent manual testing and should not be removed.
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -2575,6 +2575,10 @@ const char kProcessSharingWithStrictSite
const char kQueryTilesName[] = "Show query tiles";
const char kQueryTilesDescription[] = "Shows query tiles in Chrome";
@@ -2707,6 +2707,10 @@ const char kQueryTilesInstantFetchName[]
const char kQueryTilesInstantFetchDescription[] =
"Immediately schedule background task to fetch query tiles";
+const char kPullToRefreshEffectName[] = "The pull-to-refresh effect";
+const char kPullToRefreshEffectDescription[] =
@ -52,9 +52,9 @@ This reverts commit 4e598f38a0e6dd3dbede009c6a99b2a520a94e1f.
"Determines what pages the Reader Mode infobar is shown on.";
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -1484,6 +1484,9 @@ extern const char kProcessSharingWithStr
extern const char kQueryTilesName[];
extern const char kQueryTilesDescription[];
@@ -1578,6 +1578,9 @@ extern const char kQueryTilesCountryCode
extern const char kQueryTilesInstantFetchName[];
extern const char kQueryTilesInstantFetchDescription[];
+extern const char kPullToRefreshEffectName[];
+extern const char kPullToRefreshEffectDescription[];


+ 2597
- 14
patches/Other/debug-fix.patch
File diff suppressed because it is too large
View File


+ 1
- 1
patches/Other/generate_gradle.patch View File

@ -13,7 +13,7 @@ diff --git a/src/build/android/gradle/generate_gradle.py b/src/build/android/gra
def _RunNinja(output_dir, args):
cmd = [
- os.path.join(_DEPOT_TOOLS_PATH, 'autoninja'),
- 'autoninja',
+ 'ninja',
'-C',
output_dir,


+ 10
- 0
patches/Other/remove-jdk.patch View File

@ -29,3 +29,13 @@ Subject: Remove dependency on bundled jdk
}
}
--- a/build/android/stacktrace/BUILD.gn
+++ b/build/android/stacktrace/BUILD.gn
@@ -22,7 +22,6 @@ group("java_deobfuscate") {
"java_deobfuscate.py",
"java_deobfuscate.jar",
"//third_party/proguard/lib/proguard603.jar",
"//third_party/proguard/lib/retrace603.jar",
]
- deps = [ "//third_party/jdk:java_data" ]
}

+ 11
- 6
patches/Other/ungoogled-main-repo-fix.patch View File

@ -2,9 +2,14 @@ description: remove some prune causing build to fail, modify GN flags
author: Wengling Chen <[email protected]>
---
flags.gn | 1 -
pruning.list | 5 -----
2 files changed, 6 deletions(-)
--- a/ungoogled-chromium/pruning.list
+++ b/ungoogled-chromium/pruning.list
@@ -17,7 +17,6 @@ base/test/data/pe_image/pe_image_test_32.dll
@@ -16,7 +16,6 @@ base/test/data/tzdata/2019a/44/le/metaZones.res
base/test/data/tzdata/2019a/44/le/timezoneTypes.res
base/test/data/tzdata/2019a/44/le/zoneinfo64.res
build/android/CheckInstallApk-debug.apk
@ -12,7 +17,7 @@ author: Wengling Chen <[email protected]>
build/android/stacktrace/java_deobfuscate.jar
build/android/tests/symbolize/liba.so
build/android/tests/symbolize/libb.so
@@ -14727,12 +14725,9 @@ third_party/hunspell/fuzz/bdict_corpus/en-US-7-1.bdic
@@ -15168,12 +15167,9 @@ third_party/hunspell/fuzz/bdict_corpus/en-US-7-1.bdic
third_party/hunspell/fuzz/bdict_corpus/en-US-8-0.bdic
third_party/hunspell/fuzz/bdict_corpus/f95048cdc0fc231dd712bad106578a9eeecd869b
third_party/hunspell/fuzz/bdict_corpus/fda69541054125551c41ab3e591e0482405ca2dc
@ -25,14 +30,14 @@ author: Wengling Chen <[email protected]>
third_party/icu/flutter/icudtl.dat
third_party/icu/ios/icudtl.dat
third_party/icu/source/data/in/coll/ucadata-implicithan.icu
@@ -15178,7 +15178,6 @@ base/test/data/pe_image/pe_image_test_32.dll
@@ -15191,7 +15187,6 @@ third_party/icu/source/data/in/uts46.nrm
third_party/icu/tzres/metaZones.res
third_party/icu/tzres/timezoneTypes.res
third_party/icu/tzres/zoneinfo64.res
-third_party/jetifier_standalone/lib/jetifier-standalone.jar
third_party/libdrm/src/intel/tests/gen4-3d.batch
third_party/libdrm/src/intel/tests/gen5-3d.batch
third_party/libdrm/src/intel/tests/gen6-3d.batch
third_party/libavif/src/tests/data/cosmos1650_yuv444_10bpc_p3pq.y4m
third_party/libavif/src/tests/data/kodim03_yuv420_8bpc.y4m
third_party/libavif/src/tests/data/kodim23_yuv420_8bpc.y4m
--- a/ungoogled-chromium/flags.gn
+++ b/ungoogled-chromium/flags.gn
@@ -11,7 +11,6 @@


+ 1
- 1
patches/Unobtainium/kill-Auth.patch View File

@ -20,7 +20,7 @@ Subject: kill Auth
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.task.AsyncTask;
@@ -61,23 +57,7 @@ public class SigninHelper {
@@ -62,23 +58,7 @@ public class SigninHelper {
@Override
public List<String> getAccountChangeEvents(
Context context, int index, String accountName) {


+ 11
- 11
patches/Unobtainium/kill-GCM.patch View File

@ -23,7 +23,7 @@ Subject: kill GCM
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -428,7 +428,6 @@ android_library("chrome_java") {
@@ -450,7 +450,6 @@ android_library("chrome_java") {
"//third_party/android_deps:com_google_protobuf_protobuf_javalite_java",
"//third_party/android_deps:javax_inject_javax_inject_java",
"//third_party/android_media:android_media_java",
@ -41,7 +41,7 @@ Subject: kill GCM
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java",
@@ -1414,11 +1413,6 @@ chrome_java_sources = [
@@ -1383,11 +1382,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/services/AndroidChildAccountHelper.java",
"java/src/org/chromium/chrome/browser/services/AndroidEduOwnerCheckCallback.java",
"java/src/org/chromium/chrome/browser/services/GoogleServicesManager.java",
@ -51,8 +51,8 @@ Subject: kill GCM
- "java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java",
- "java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java",
"java/src/org/chromium/chrome/browser/settings/HyperlinkPreference.java",
"java/src/org/chromium/chrome/browser/settings/LearnMorePreference.java",
"java/src/org/chromium/chrome/browser/settings/MainSettings.java",
"java/src/org/chromium/chrome/browser/settings/SettingsActivity.java",
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -82,22 +82,17 @@ by a child template that "extends" this
@ -78,7 +78,7 @@ Subject: kill GCM
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
@@ -1040,50 +1035,9 @@ by a child template that "extends" this
@@ -968,50 +963,9 @@ by a child template that "extends" this
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -129,7 +129,7 @@ Subject: kill GCM
<receiver android:name="com.google.ipc.invalidation.ticl.android2.AndroidInternalScheduler$AlarmReceiver"
android:exported="false"/>
<receiver android:name="com.google.ipc.invalidation.external.client.contrib.AndroidListener$AlarmReceiver"
@@ -1110,28 +1064,10 @@ by a child template that "extends" this
@@ -1038,28 +992,10 @@ by a child template that "extends" this
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -328,14 +328,14 @@ Subject: kill GCM
private boolean isMessageWithinLimit(Bundle data) {
--- a/components/gcm_driver/android/BUILD.gn
+++ b/components/gcm_driver/android/BUILD.gn
@@ -13,7 +13,6 @@ android_library("gcm_driver_java") {
"//base:base_java",
@@ -14,7 +14,6 @@ android_library("gcm_driver_java") {
"//base:jni_java",
"//content/public/android:content_java",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
- "//third_party/android_sdk:android_gcm_java",
"//third_party/jsr-305:jsr_305_javalib",
]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
--- a/components/gcm_driver/instance_id/android/BUILD.gn
+++ b/components/gcm_driver/instance_id/android/BUILD.gn
@@ -27,7 +27,6 @@ android_library("instance_id_driver_java
@ -451,14 +451,14 @@ Subject: kill GCM
@Override
--- a/components/sync/android/BUILD.gn
+++ b/components/sync/android/BUILD.gn
@@ -12,7 +12,6 @@ android_library("sync_java") {
"//components/signin/core/browser/android:java",
@@ -13,7 +13,6 @@ android_library("sync_java") {
"//net/android:net_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
"//third_party/android_deps:com_google_code_findbugs_jsr305_java",
- "//third_party/android_sdk:android_gcm_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/cacheinvalidation:cacheinvalidation_proto_java",
"//third_party/jsr-305:jsr_305_javalib",
]
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -138,7 +138,6 @@ if (is_android) {


+ 1
- 1
patches/Unobtainium/kill-Location-fall-back-to-system.patch View File

@ -9,7 +9,7 @@ Subject: kill Location, fall back to system
--- a/services/device/geolocation/BUILD.gn
+++ b/services/device/geolocation/BUILD.gn
@@ -145,7 +145,6 @@ if (is_android) {
@@ -152,7 +152,6 @@ if (is_android) {
"android/java/src/org/chromium/device/geolocation/LocationProviderAdapter.java",
"android/java/src/org/chromium/device/geolocation/LocationProviderAndroid.java",
"android/java/src/org/chromium/device/geolocation/LocationProviderFactory.java",


+ 1
- 1
patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch View File

@ -9,7 +9,7 @@ Subject: [PATCH 20/30] disable media router media remoting by default
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -268,7 +268,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -329,7 +329,7 @@ void Profile::RegisterProfilePrefs(user_
prefs::kMediaRouterFirstRunFlowAcknowledged,
false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);


+ 3
- 3
patches/Vanadium/0021-disable-media-router-by-default.patch View File

@ -38,9 +38,9 @@ Subject: [PATCH 21/30] disable media router by default
#endif // defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -403,7 +403,7 @@ void ProfileImpl::RegisterProfilePrefs(
registry->RegisterStringPref(
prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
@@ -409,7 +409,7 @@ void ProfileImpl::RegisterProfilePrefs(
#endif
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);
- registry->RegisterBooleanPref(prefs::kEnableMediaRouter, true);
+ registry->RegisterBooleanPref(prefs::kEnableMediaRouter, false);


+ 2
- 2
patches/series View File

@ -1,6 +1,6 @@
src-fix/android-rlz-fix-missing-variable.patch
src-fix/fix-null-mInstanceID.patch
src-fix/fix-unkown-warning-clang-9.patch
src-fix/fix-unkown-warning-clang.patch
src-fix/fix-safe-browsing-prefs.patch
src-fix/fix-prefs.patch
Vanadium/0020-disable-media-router-media-remoting-by-default.patch
@ -32,7 +32,7 @@ ungoogled-chromium-android/flag-enable-process-sharing.patch
ungoogled-chromium-android/enable-update-notification.patch
Bromite/Add-exit-menu-item.patch
Bromite/Add-flag-to-disable-WebGL.patch
Bromite/Add-flags-to-disable-device-motion-and-orientation-APIs.patch
Bromite/Add-flags-to-disable-device-motion-orientation-APIs.patch
Bromite/Add-option-to-not-persist-tabs-across-sessions.patch
Bromite/Add-user-setting-for-DNS-over-HTTPS-DoH-custom-URL.patch
Bromite/Change-default-webRTC-policy-to-not-use-any-address.patch


+ 6
- 6
patches/src-fix/fix-prefs.patch View File

@ -36,7 +36,7 @@ Subject: fix build error with prefs.h
prefs::kHomePage,
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragmentBase.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninFragmentBase.java
@@ -437,7 +437,7 @@ public abstract class SigninFragmentBase
@@ -428,7 +428,7 @@ public abstract class SigninFragmentBase
private void runStateMachineAndSignin(boolean settingsClicked) {
mConfirmSyncDataStateMachine = new ConfirmSyncDataStateMachine(
new ConfirmSyncDataStateMachineDelegate(getChildFragmentManager()),
@ -47,13 +47,13 @@ Subject: fix build error with prefs.h
public void onConfirm(boolean wipeData) {
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninPromoUtil.java
@@ -38,8 +38,7 @@ public class SigninPromoUtil {
@@ -39,8 +39,7 @@ public class SigninPromoUtil {
public static boolean launchSigninPromoIfNeeded(final Activity activity) {
SigninPreferencesManager preferencesManager = SigninPreferencesManager.getInstance();
int currentMajorVersion = ChromeVersionInfo.getProductMajorVersion();
- boolean wasSignedIn = TextUtils.isEmpty(
- PrefServiceBridge.getInstance().getString(Pref.SYNC_LAST_ACCOUNT_NAME));
+ boolean wasSignedIn = TextUtils.isEmpty("");
Supplier<Set<String>> accountNamesSupplier = ()
-> new ArraySet<>(
+ boolean wasSignedIn = true;
List<String> accountNames = AccountUtils.toAccountNames(
AccountManagerFacadeProvider.getInstance().tryGetGoogleAccounts());
Supplier<Set<String>> accountNamesSupplier = () -> new ArraySet<>(accountNames);

+ 15
- 15
patches/src-fix/fix-safe-browsing-prefs.patch View File

@ -14,7 +14,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -2906,7 +2906,6 @@ generate_jni("chrome_jni_headers") {
@@ -2914,7 +2914,6 @@ generate_jni("chrome_jni_headers") {
"java/src/org/chromium/chrome/browser/resources/ResourceMapper.java",
"java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java",
@ -24,7 +24,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
"java/src/org/chromium/chrome/browser/search_engines/TemplateUrlServiceFactory.java",
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -1386,7 +1386,6 @@ chrome_java_sources = [
@@ -1355,7 +1355,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/resources/ResourceMapper.java",
"java/src/org/chromium/chrome/browser/rlz/RevenueStats.java",
"java/src/org/chromium/chrome/browser/rlz/RlzPingHandler.java",
@ -34,7 +34,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
"java/src/org/chromium/chrome/browser/screenshot/EditorScreenshotTask.java",
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -236,7 +236,7 @@ base::FilePath AwBrowserContext::GetCont
@@ -235,7 +235,7 @@ base::FilePath AwBrowserContext::GetCont
// static
void AwBrowserContext::RegisterPrefs(PrefRegistrySimple* registry) {
@ -45,7 +45,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
// The default value '0' represents the latest Chrome major version on which
--- a/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc
+++ b/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc
@@ -123,12 +123,12 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsi
@@ -98,12 +98,12 @@ AwSafeBrowsingBlockingPage* AwSafeBrowsi
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options =
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions(
IsMainPageLoadBlocked(unsafe_resources),
@ -84,7 +84,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
import org.chromium.chrome.browser.settings.ChromeManagedPreferenceDelegate;
import org.chromium.chrome.browser.settings.SettingsActivity;
import org.chromium.chrome.browser.signin.IdentityServicesProvider;
@@ -357,17 +356,9 @@ public class SyncAndServicesSettings ext
@@ -358,17 +357,9 @@ public class SyncAndServicesSettings ext
PostTask.postTask(UiThreadTaskTraits.DEFAULT, this::updatePreferences);
} else if (PREF_SEARCH_SUGGESTIONS.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.SEARCH_SUGGEST_ENABLED, (boolean) newValue);
@ -102,7 +102,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
} else if (PREF_NAVIGATION_ERROR.equals(key)) {
mPrefServiceBridge.setBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED, (boolean) newValue);
} else if (PREF_USAGE_AND_CRASH_REPORTING.equals(key)) {
@@ -540,7 +531,6 @@ public class SyncAndServicesSettings ext
@@ -544,7 +535,6 @@ public class SyncAndServicesSettings ext
mSearchSuggestions.setChecked(mPrefServiceBridge.getBoolean(Pref.SEARCH_SUGGEST_ENABLED));
mNavigationError.setChecked(
mPrefServiceBridge.getBoolean(Pref.ALTERNATE_ERROR_PAGES_ENABLED));
@ -110,7 +110,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
updateLeakDetectionAndSafeBrowsingReportingPreferences();
@@ -609,10 +599,9 @@ public class SyncAndServicesSettings ext
@@ -614,10 +604,9 @@ public class SyncAndServicesSettings ext
* its appearance needs to be updated. The same goes for safe browsing reporting.
*/
private void updateLeakDetectionAndSafeBrowsingReportingPreferences() {
@ -123,7 +123,7 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
boolean has_token_for_leak_check = PasswordUIView.hasAccountForLeakCheckRequest();
boolean leak_detection_enabled =
@@ -640,10 +629,10 @@ public class SyncAndServicesSettings ext
@@ -645,10 +634,10 @@ public class SyncAndServicesSettings ext
return mPrefServiceBridge.isManagedPreference(Pref.SEARCH_SUGGEST_ENABLED);
}
if (PREF_SAFE_BROWSING_SCOUT_REPORTING.equals(key)) {
@ -138,19 +138,19 @@ Subject: Fix build error caused by the removal of safe_browsing_prefs.h
return mPrefServiceBridge.isManagedPreference(
--- a/weblayer/browser/browser_context_impl.cc
+++ b/weblayer/browser/browser_context_impl.cc
@@ -15,7 +15,6 @@
@@ -17,7 +17,6 @@
#include "components/prefs/json_pref_store.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
-#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/security_interstitials/content/stateful_ssl_host_state_delegate.h"
#include "components/user_prefs/user_prefs.h"
#include "components/variations/variations_client.h"
@@ -233,7 +232,6 @@ void BrowserContextImpl::RegisterPrefs(
#include "components/security_state/core/security_state.h"
#include "components/translate/core/browser/translate_pref_names.h"
@@ -236,7 +235,6 @@ void BrowserContextImpl::RegisterPrefs(
StatefulSSLHostStateDelegate::RegisterProfilePrefs(pref_registry);
HostContentSettingsMap::RegisterProfilePrefs(pref_registry);
- safe_browsing::RegisterProfilePrefs(pref_registry);
#if defined(OS_ANDROID)
cdm::MediaDrmStorageImpl::RegisterProfilePrefs(pref_registry);
permissions::GeolocationPermissionContextAndroid::RegisterProfilePrefs(
security_state::RegisterProfilePrefs(pref_registry);
language::LanguagePrefs::RegisterProfilePrefs(pref_registry);
translate::TranslatePrefs::RegisterProfilePrefs(pref_registry);

patches/src-fix/fix-unkown-warning-clang-9.patch → patches/src-fix/fix-unkown-warning-clang.patch View File

@ -7,7 +7,7 @@ author: Wengling Chen <[email protected]>
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1507,6 +1507,9 @@ config("default_warnings") {
@@ -1480,6 +1480,9 @@ config("default_warnings") {
# Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
# recognize.
cflags += [

+ 3
- 3
patches/ungoogled-chromium-android/Add-folder-button-bookmark.patch View File

@ -178,7 +178,7 @@ Subject: Add new folder button to bookmark activity
if (!mIsCreatingFolder) {
--- a/chrome/browser/ui/android/strings/android_chrome_strings.grd
+++ b/chrome/browser/ui/android/strings/android_chrome_strings.grd
@@ -2940,6 +2940,9 @@ To change this setting, <ph name="BEGIN_
@@ -2511,6 +2511,9 @@ To change this setting, <ph name="BEGIN_
<message name="IDS_BOOKMARK_ACTION_BAR_EDIT_FOLDER" desc="Button text for editing current folder action on the bookmark action bar [CHAR-LIMIT=32]">
Edit folder
</message>
@ -190,7 +190,7 @@ Subject: Add new folder button to bookmark activity
</message>
--- a/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
@@ -435,7 +435,8 @@ public class BookmarkBridge {
@@ -437,7 +437,8 @@ public class BookmarkBridge {
* moving some folders (a folder cannot be moved to its own children).
*/
public void getMoveDestinations(List<BookmarkId> folderList,
@ -200,7 +200,7 @@ Subject: Add new folder button to bookmark activity
ThreadUtils.assertOnUiThread();
assert mIsNativeBookmarkModelLoaded;
BookmarkBridgeJni.get().getAllFoldersWithDepths(
@@ -460,7 +461,7 @@ public class BookmarkBridge {
@@ -462,7 +463,7 @@ public class BookmarkBridge {
// statement.
if (!shouldTrim) {
BookmarkId folder = folderList.get(i);


+ 1
- 1
patches/ungoogled-chromium-android/Disable-contextual-search.patch View File

@ -8,7 +8,7 @@ Subject: Disable contextual search by default
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -188,7 +188,7 @@ void Profile::RegisterProfilePrefs(user_
@@ -251,7 +251,7 @@ void Profile::RegisterProfilePrefs(user_
#if defined(OS_ANDROID)
registry->RegisterStringPref(
prefs::kContextualSearchEnabled,


+ 1
- 1
patches/ungoogled-chromium-android/Mark-http-as-dangerous-mixed-content-warning.patch View File

@ -20,7 +20,7 @@ Subject: Enable legacy TLS warnings and mark-http-as-dangerous by default
base::FEATURE_DISABLED_BY_DEFAULT};
--- a/components/security_state/core/security_state.cc
+++ b/components/security_state/core/security_state.cc
@@ -42,7 +42,7 @@ SecurityLevel GetSecurityLevelForNonSecu
@@ -43,7 +43,7 @@ SecurityLevel GetSecurityLevelForNonSecu
// Default to dangerous on editing form fields and otherwise
// warning.


+ 4
- 4
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch View File

@ -18,7 +18,7 @@ Subject: Remove dependency on com.google.android.gms.auth
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -262,7 +262,6 @@ android_library("chrome_java") {
@@ -275,7 +275,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
":update_proto_java",
":usage_stats_proto_java",
@ -110,7 +110,7 @@ Subject: Remove dependency on com.google.android.gms.auth
"$google_play_services_package:google_play_services_tasks_java",
--- a/third_party/android_deps/BUILD.gn
+++ b/third_party/android_deps/BUILD.gn
@@ -1134,53 +1134,6 @@ java_prebuilt("com_android_tools_build_j
@@ -972,53 +972,6 @@ java_prebuilt("com_android_tools_build_j
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
@ -215,7 +215,7 @@ Subject: Remove dependency on com.google.android.gms.auth
/**
--- a/components/background_task_scheduler/BUILD.gn
+++ b/components/background_task_scheduler/BUILD.gn
@@ -117,7 +117,6 @@ if (is_android) {
@@ -119,7 +119,6 @@ if (is_android) {
]
deps = [
@ -383,7 +383,7 @@ Subject: Remove dependency on com.google.android.gms.auth
@VisibleForTesting
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -2418,7 +2418,6 @@ if (is_android) {
@@ -2424,7 +2424,6 @@ if (is_android) {
testonly = true
sources = content_java_sources_needing_jni
deps = [


+ 51
- 89
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch View File

@ -6,29 +6,29 @@ Subject: Remove dependency on com.google.android.gms.cast
chrome/android/BUILD.gn | 6
chrome/android/features/media_router/BUILD.gn | 2
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/CastSessionUtil.java | 35 ---
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaSink.java | 44 ---
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaStatusBridge.java | 40 ---
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaSink.java | 44 ----
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaStatusBridge.java | 40 +--
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/BaseNotificationController.java | 46 ----
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/BaseSessionController.java | 115 ----------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CafBaseMediaRouteProvider.java | 103 --------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/BaseSessionController.java | 86 --------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CafBaseMediaRouteProvider.java | 103 ----------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CafMediaRouteProvider.java | 16 -
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CafMessageHandler.java | 97 --------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CafMessageHandler.java | 97 ---------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CastMediaSource.java | 10
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CastOptionsProvider.java | 22 -
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CastSessionController.java | 84 -------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CastOptionsProvider.java | 22 --
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CastSessionController.java | 84 --------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/CastUtils.java | 6
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/CafExpandedControllerActivity.java | 24 --
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/FlingingControllerAdapter.java | 71 ------
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/CafExpandedControllerActivity.java | 21 --
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/FlingingControllerAdapter.java | 61 -----
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/RemotingMediaSource.java | 8
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/RemotingSessionController.java | 21 -
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/RemotingSessionController.java | 21 --
chrome/android/java/AndroidManifest.xml | 28 --
chrome/test/android/cast_emulator/BUILD.gn | 1
third_party/android_deps/BUILD.gn | 39 ---
21 files changed, 26 insertions(+), 792 deletions(-)
21 files changed, 27 insertions(+), 749 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -264,8 +264,6 @@ android_library("chrome_java") {
@@ -277,8 +277,6 @@ android_library("chrome_java") {
":usage_stats_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -37,7 +37,7 @@ Subject: Remove dependency on com.google.android.gms.cast
"$google_play_services_package:google_play_services_fido_java",
"$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
@@ -703,8 +701,6 @@ junit_binary("chrome_junit_tests") {
@@ -714,8 +712,6 @@ junit_binary("chrome_junit_tests") {
":partner_location_descriptor_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -46,7 +46,7 @@ Subject: Remove dependency on com.google.android.gms.cast
"$google_play_services_package:google_play_services_fido_java",
"//base:base_java",
"//base:base_java_test_support",
@@ -818,8 +814,6 @@ android_library("chrome_test_java") {
@@ -831,8 +827,6 @@ android_library("chrome_test_java") {
":partner_location_descriptor_proto_java",
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -430,25 +430,22 @@ Subject: Remove dependency on com.google.android.gms.cast
@Override
--- a/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/BaseSessionController.java
+++ b/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/BaseSessionController.java
@@ -6,12 +6,6 @@ package org.chromium.chrome.browser.medi
@@ -6,10 +6,6 @@ package org.chromium.chrome.browser.medi
import androidx.annotation.Nullable;
-import com.google.android.gms.cast.CastDevice;
-import com.google.android.gms.cast.framework.CastSession;
-import com.google.android.gms.cast.framework.media.RemoteMediaClient;
-import com.google.android.gms.common.api.PendingResult;
-import com.google.android.gms.common.api.Status;
-
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -50,16 +44,13 @@ public abstract class BaseSessionControl
import org.chromium.base.Log;
import org.chromium.chrome.browser.media.router.CastSessionUtil;
import org.chromium.chrome.browser.media.router.FlingingController;
@@ -42,15 +38,12 @@ public abstract class BaseSessionControl
void onMetadataUpdated();
}
private final Random mRequestIdGenerator = new Random();
- private CastSession mCastSession;
private int mLatestMediaSessionId;
private final CafBaseMediaRouteProvider mProvider;
private CreateRouteRequestInfo mRouteCreationInfo;
- private final RemoteMediaClient.Callback mRemoteMediaClientCallback;
@ -460,7 +457,7 @@ Subject: Remove dependency on com.google.android.gms.cast
}
public void addCallback(Callback callback) {
@@ -72,9 +63,6 @@ public abstract class BaseSessionControl
@@ -63,9 +56,6 @@ public abstract class BaseSessionControl
public void requestSessionLaunch() {
mRouteCreationInfo = mProvider.getPendingCreateRouteRequestInfo();
@ -470,7 +467,7 @@ Subject: Remove dependency on com.google.android.gms.cast
// When the user clicks a route on the MediaRouteChooserDialog, we intercept the click event
// and do not select the route. Instead the route selection is postponed to here. This will
// trigger CAF to launch the session.
@@ -93,60 +81,18 @@ public abstract class BaseSessionControl
@@ -84,69 +74,22 @@ public abstract class BaseSessionControl
return mRouteCreationInfo;
}
@ -510,30 +507,9 @@ Subject: Remove dependency on com.google.android.gms.cast
public boolean isConnected() {
- return mCastSession != null && mCastSession.isConnected();
- }
-
- /**
- * Safely seek to a position. This is an workaround for an IllegalStateException in
- * RemoteMediaClient when a seek command times out. The code should be replaced by a normal
- * seek() call when the Google Play services SDK gets updated.
- */
- public PendingResult<Status> safelySeek(long position) {
- JSONObject json = new JSONObject();
- try {
- json.put("requestId", mRequestIdGenerator.nextInt(10000));
- json.put("mediaSessionId", mLatestMediaSessionId);
- json.put("type", "SEEK");
- json.put("currentTime", position / 1000.0);
- } catch (JSONException e) {
- // Ignore.
- }
- return getSession().sendMessage(CastSessionUtil.MEDIA_NAMESPACE, json.toString());
+ return false;
}
private void updateMediaSessionId(String message) {
@@ -171,29 +117,6 @@ public abstract class BaseSessionControl
private void updateRemoteMediaClient(String message) {
if (!isConnected()) return;
-
@ -562,7 +538,7 @@ Subject: Remove dependency on com.google.android.gms.cast
}
/** Called when session started. */
@@ -210,40 +133,6 @@ public abstract class BaseSessionControl
@@ -163,31 +106,6 @@ public abstract class BaseSessionControl
return mProvider;
}
@ -575,7 +551,6 @@ Subject: Remove dependency on com.google.android.gms.cast
- "Received message from Cast device: namespace=\"" + namespace + "\" message=\""
- + message + "\"");
- if (CastSessionUtil.MEDIA_NAMESPACE.equals(namespace)) {
- updateMediaSessionId(message);
- updateRemoteMediaClient(message);
- }
- }
@ -592,18 +567,10 @@ Subject: Remove dependency on com.google.android.gms.cast
- }
- }
-
- protected void onStatusUpdated() {
- notifyCallback((Callback callback) -> callback.onStatusUpdated());
- }
-
- protected void onMetadataUpdated() {
- notifyCallback((Callback callback) -> callback.onMetadataUpdated());
- }
-
@Nullable
public FlingingController getFlingingController() {
return null;
@@ -254,7 +143,7 @@ public abstract class BaseSessionControl
protected void onStatusUpdated() {
notifyCallback((Callback callback) -> callback.onStatusUpdated());
}
@@ -206,7 +124,7 @@ public abstract class BaseSessionControl
* {@link CastSession#getSessionId()} is final.
*/
public String getSessionId() {
@ -1160,12 +1127,12 @@ Subject: Remove dependency on com.google.android.gms.cast
}
@Override
@@ -71,27 +67,19 @@ public class CafExpandedControllerActivi
@@ -71,23 +67,20 @@ public class CafExpandedControllerActivi
@Override
public void seekTo(long pos) {
if (!mSessionController.isConnected()) return;
-
- mSessionController.safelySeek(pos);
- mSessionController.getSession().getRemoteMediaClient().seek(pos);
}
@Override
@ -1182,14 +1149,11 @@ Subject: Remove dependency on com.google.android.gms.cast
PlaybackStateCompat.ACTION_REWIND | PlaybackStateCompat.ACTION_FAST_FORWARD;
- if (mSessionController.isConnected()
- && mSessionController.getSession().getRemoteMediaClient().isPlaying()) {
- flags |= PlaybackStateCompat.ACTION_PAUSE;
- } else {
- flags |= PlaybackStateCompat.ACTION_PLAY;
- }
return flags;
}
};
@@ -180,20 +168,10 @@ public class CafExpandedControllerActivi
+ if (mSessionController.isConnected()) {
flags |= PlaybackStateCompat.ACTION_PAUSE;
} else {
flags |= PlaybackStateCompat.ACTION_PLAY;
@@ -180,20 +173,10 @@ public class CafExpandedControllerActivi
private void updateUi() {
if (!mSessionController.isConnected()) return;
@ -1270,21 +1234,19 @@ Subject: Remove dependency on com.google.android.gms.cast
}
@Override
@@ -125,54 +103,5 @@ public class FlingingControllerAdapter i
load(position);
@@ -126,8 +104,6 @@ public class FlingingControllerAdapter i
return;
}
-
- mSessionController.safelySeek(position).setResultCallback(this::onMediaCommandResult);
- mStreamPositionExtrapolator.onSeek(position);
- }
-
- ////////////////////////////////////////////
- // MediaController implementation end
- ////////////////////////////////////////////
-
- public void onStatusUpdated() {
- if (mMediaStatusObserver == null) return;
- mSessionController.getRemoteMediaClient().seek(position).setResultCallback(
- this::onMediaCommandResult);
mStreamPositionExtrapolator.onSeek(position);
}
@@ -137,43 +113,6 @@ public class FlingingControllerAdapter i
public void onStatusUpdated() {
if (mMediaStatusObserver == null) return;
-
- RemoteMediaClient remoteMediaClient = mSessionController.getRemoteMediaClient();
-
@ -1311,8 +1273,8 @@ Subject: Remove dependency on com.google.android.gms.cast
- mLoaded = false;
- mStreamPositionExtrapolator.clear();
- }
- }
-
}
- private void onMediaCommandResult(Result result) {
- // When multiple API calls are made in quick succession, "Results have already been set"
- // IllegalStateExceptions might be thrown from GMS code. We prefer to catch the exception
@ -1323,7 +1285,7 @@ Subject: Remove dependency on com.google.android.gms.cast
- Log.e(TAG, "Error when sending command. Status code: %d",
- result.getStatus().getStatusCode());
- }
}
- }
}
--- a/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/RemotingMediaSource.java
+++ b/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/caf/remoting/RemotingMediaSource.java
@ -1415,7 +1377,7 @@ Subject: Remove dependency on com.google.android.gms.cast
<!-- Note: All activities directly or indirectly derived from ChromeActivity
must specify android:hardwareAccelerated="false".
@@ -777,16 +771,6 @@ by a child template that "extends" this
@@ -701,16 +695,6 @@ by a child template that "extends" this
</intent-filter>
</activity>
@ -1432,7 +1394,7 @@ Subject: Remove dependency on com.google.android.gms.cast
<!-- This activity is used to restart the main Chrome process. Should never be exported. -->
<activity android:name="org.chromium.chrome.browser.BrowserRestartActivity"
android:launchMode="singleInstance"
@@ -1232,18 +1216,6 @@ android:value="true" />
@@ -1157,18 +1141,6 @@ by a child template that "extends" this
{% endif %}
{% block extra_application_definitions %}
@ -1463,7 +1425,7 @@ Subject: Remove dependency on com.google.android.gms.cast
"//third_party/android_deps:androidx_mediarouter_mediarouter_java",
--- a/third_party/android_deps/BUILD.gn
+++ b/third_party/android_deps/BUILD.gn
@@ -1165,45 +1165,6 @@ android_aar_prebuilt("google_play_servic
@@ -1003,45 +1003,6 @@ android_aar_prebuilt("google_play_servic
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.


+ 64
- 65
patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch View File

@ -5,40 +5,39 @@ Subject: Remove dependency on
com.google.android.gms.tasks
---
chrome/android/BUILD.gn | 8
chrome/android/features/cablev2_authenticator/internal/BUILD.gn | 2
chrome/android/features/media_router/BUILD.gn | 2
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java | 7
chrome/android/java/AndroidManifest.xml | 9 -
chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java | 14 -
chrome/android/java/src/org/chromium/chrome/browser/ChromeVersionInfo.java | 12 -
chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java | 8
chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java | 14 -
chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java | 7
chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java | 25 ---
chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java | 82 ----------
chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java | 10 -
chrome/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerLauncher.java | 4
chrome/test/android/BUILD.gn | 2
components/background_task_scheduler/BUILD.gn | 3
components/background_task_scheduler/internal/BUILD.gn | 6
components/signin/core/browser/android/BUILD.gn | 2
components/signin/core/browser/android/java/src/org/chromium/components/signin/GmsAvailabilityException.java | 4
components/signin/core/browser/android/java/src/org/chromium/components/signin/SystemAccountManagerDelegate.java | 3
content/public/android/BUILD.gn | 3
content/test/BUILD.gn | 3
device/BUILD.gn | 2
remoting/android/client_java_tmpl.gni | 3
services/BUILD.gn | 4
services/device/geolocation/BUILD.gn | 2
services/shape_detection/BUILD.gn | 2
third_party/cacheinvalidation/BUILD.gn | 1
third_party/robolectric/BUILD.gn | 2
29 files changed, 17 insertions(+), 229 deletions(-)
chrome/android/BUILD.gn | 8
chrome/android/features/cablev2_authenticator/BUILD.gn | 2
chrome/android/features/media_router/BUILD.gn | 2
chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java | 7
chrome/android/java/AndroidManifest.xml | 9 -
chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java | 14 -
chrome/android/java/src/org/chromium/chrome/browser/ChromeVersionInfo.java | 12 -
chrome/android/java/src/org/chromium/chrome/browser/component_updater/UpdateScheduler.java | 8
chrome/android/java/src/org/chromium/chrome/browser/externalauth/ExternalAuthUtils.java | 14 -
chrome/android/java/src/org/chromium/chrome/browser/externalauth/UserRecoverableErrorHandler.java | 7
chrome/android/java/src/org/chromium/chrome/browser/gcore/ChromeGoogleApiClientImpl.java | 25 ---
chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApiClientHelper.java | 82 ----------
chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java | 10 -
chrome/android/java/src/org/chromium/chrome/browser/password_manager/PasswordManagerLauncher.java | 4
chrome/test/android/BUILD.gn | 2
components/background_task_scheduler/BUILD.gn | 3
components/background_task_scheduler/internal/BUILD.gn | 6
components/signin/core/browser/android/BUILD.gn | 2
components/signin/core/browser/android/java/src/org/chromium/components/signin/GmsAvailabilityException.java | 4
content/public/android/BUILD.gn | 3
content/test/BUILD.gn | 3
device/BUILD.gn | 2
remoting/android/client_java_tmpl.gni | 3
services/BUILD.gn | 4
services/device/geolocation/BUILD.gn | 2
services/shape_detection/BUILD.gn | 2
third_party/cacheinvalidation/BUILD.gn | 1
third_party/robolectric/BUILD.gn | 2
28 files changed, 17 insertions(+), 226 deletions(-)
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -262,9 +262,6 @@ android_library("chrome_java") {
@@ -275,9 +275,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
":update_proto_java",
":usage_stats_proto_java",
@ -47,8 +46,8 @@ Subject: Remove dependency on
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:jni_java",
"//chrome/android/features/cablev2_authenticator:public_java",
@@ -695,8 +692,6 @@ junit_binary("chrome_junit_tests") {
"//chrome/android/features/keyboard_accessory:public_java",
@@ -706,8 +703,6 @@ junit_binary("chrome_junit_tests") {
":chrome_app_java_resources",
":chrome_java",
":partner_location_descriptor_proto_java",
@ -57,16 +56,16 @@ Subject: Remove dependency on
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -807,9 +802,6 @@ android_library("chrome_test_java") {
":chrome_app_java_resources",
@@ -820,9 +815,6 @@ android_library("chrome_test_java") {
":chrome_test_util_java",
":native_java_unittests_java",
":partner_location_descriptor_proto_java",
- "$google_play_services_package:google_play_services_base_java",
- "$google_play_services_package:google_play_services_basement_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:base_java_test_support",
"//base/test:test_support_java",
"//base:jni_java",
--- a/chrome/android/features/media_router/BUILD.gn
+++ b/chrome/android/features/media_router/BUILD.gn
@@ -10,8 +10,6 @@ import("//chrome/common/features.gni")
@ -103,7 +102,7 @@ Subject: Remove dependency on
MediaRouteProvider cafProvider = CafMediaRouteProvider.create(manager);
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -851,15 +851,6 @@ by a child template that "extends" this
@@ -775,15 +775,6 @@ by a child template that "extends" this
</intent-filter>
</activity>
@ -121,7 +120,7 @@ Subject: Remove dependency on
android:exported="false"
--- a/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/AppHooks.java
@@ -11,9 +11,6 @@ import android.view.View;
@@ -10,9 +10,6 @@ import android.content.pm.PackageManager
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;
@ -131,7 +130,7 @@ Subject: Remove dependency on
import org.chromium.base.Callback;
import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.CalledByNative;
@@ -335,16 +332,7 @@ public abstract class AppHooks {
@@ -333,16 +330,7 @@ public abstract class AppHooks {
* same as {@link GoogleApiAvailability#isGooglePlayServicesAvailable()}.
*/
public int isGoogleApiAvailableWithMinApkVersion(int minApkVersion) {
@ -169,10 +168,10 @@ Subject: Remove dependency on
final long installedGmsVersion = getPlayServicesApkVersionNumber(context);
final String accessType;
@@ -112,12 +110,6 @@ public class ChromeVersionInfo {
}
private static long getPlayServicesApkVersionNumber(Context context) {
@@ -118,12 +116,6 @@ public class ChromeVersionInfo {
* package is not found.
*/
public static int getPlayServicesApkVersionNumber(Context context) {
- try {
- return context.getPackageManager()
- .getPackageInfo(GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE, 0)
@ -530,7 +529,7 @@ Subject: Remove dependency on
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
--- a/chrome/test/android/BUILD.gn
+++ b/chrome/test/android/BUILD.gn
@@ -200,8 +200,6 @@ android_library("chrome_java_test_suppor
@@ -197,8 +197,6 @@ android_library("chrome_java_test_suppor
"javatests/src/org/chromium/chrome/test/util/browser/webapps/WebappTestPage.java",
]
deps = [