Browse Source

Update to 79.0.3945.117-1

tags/79.0.3945.117-1
wchen342 1 year ago
parent
commit
ef57959a8e
Signed by: wchen342 GPG Key ID: 720B70365E800508
38 changed files with 3304 additions and 1531 deletions
  1. +6
    -0
      CHANGELOG.md
  2. +1
    -1
      README.md
  3. +3
    -2
      android_flags.debug.gn
  4. +2
    -2
      android_flags.gn
  5. +4
    -2
      android_flags.release.gn
  6. +20
    -17
      build.sh
  7. +2315
    -532
      domain_sub_2.list
  8. +17
    -3
      misc/android_studio_setup.sh
  9. +1
    -1
      misc/misc.sh
  10. +1
    -2
      patches/Bromite/Remove-SMS-integration.patch
  11. +0
    -481
      patches/Bromite/Remove-play-dependency-for-module-installer.patch
  12. +2
    -2
      patches/Unobtainium/kill-Auth.patch
  13. +35
    -214
      patches/Unobtainium/kill-GCM.patch
  14. +1
    -1
      patches/Unobtainium/kill-Location-fall-back-to-system.patch
  15. +2
    -2
      patches/Unobtainium/kill-Translate.patch
  16. +1
    -1
      patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
  17. +1
    -1
      patches/Vanadium/0021-disable-media-router-by-default.patch
  18. +7
    -7
      patches/android-prune-fix.patch
  19. +20
    -0
      patches/generate_gradle.patch
  20. +20
    -0
      patches/ignore-aidl-assertion-error.patch
  21. +0
    -14
      patches/ndk-native-window.patch
  22. +3
    -1
      patches/series
  23. +1
    -1
      patches/src-fix/fix-null-mInstanceID.patch
  24. +83
    -0
      patches/src-fix/fix-safe-browsing-prefs.patch
  25. +1
    -1
      patches/src-fix/fix-unkown-warning-clang-9.patch
  26. +54
    -0
      patches/src-fix/fix-wrong-macro-kSigninAllowedOnNextStartup.patch
  27. +6
    -6
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.auth.patch
  28. +48
    -47
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.cast.patch
  29. +49
    -48
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
  30. +17
    -23
      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
  31. +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
  32. +40
    -95
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.gcm.patch
  33. +3
    -3
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-com.google.android.gms.clearcut-com.google.android.gms.phenotype.patch
  34. +517
    -0
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
  35. +18
    -18
      patches/ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
  36. +1
    -1
      patches/ungoogled-chromium-android/change-package-name-chromium.patch
  37. +1
    -1
      patches/ungoogled-chromium-android/disable-context-search-by-default.patch
  38. +2
    -0
      pruning_2.list

+ 6
- 0
CHANGELOG.md View File

@ -39,3 +39,9 @@
* Update scripts and patches to new version
* Merge patches from Bromite and Unobtainium
* New dependencies: nodejs binaries, lib files from ndk
# 79.0.3945.117-1
* Update NDK to r20b
* Remove split installer dependencies (Google Play), disable DFM
* Other source fixes
* Known issue: some pages, including `chrome://flags`, `chrome://gpu` are not working

+ 1
- 1
README.md View File

@ -33,7 +33,7 @@ For more information on `ungoogled-chromium`, please visit the original repo: [E
The current build has been tested on:
* cpu_arch: `x86`, `arm`, `arm64`
* OS: API 28 (Android 8.1), API 27 (Android 8.0), LineageOS 16.0
* OS: API 28 (Android 9.0), API 27 (Android 8.1), LineageOS 16.0
Theoretically it will run on any device with a minimum API of 24 (Nougat).


+ 3
- 2
android_flags.debug.gn View File

@ -1,9 +1,10 @@
blink_symbol_level=1
clang_use_chrome_plugins=false
closure_compile=false
enable_ac3_eac3_audio_demuxing=true
dfmify_dev_ui=false
disable_autofill_assistant_dfm=true
disable_tab_ui_dfm=true
enable_hangout_services_extension=false
enable_hevc_demuxing=true
enable_iterator_debugging=false
enable_mdns=false
enable_mse_mpeg2ts_stream_parser=true


+ 2
- 2
android_flags.gn View File

@ -2,8 +2,8 @@ android_channel="stable"
android32_ndk_api_level=21
android64_ndk_api_level=21
android_ndk_root = "//third_party/android_ndk"
android_ndk_version = "r18b"
android_ndk_major_version = 18
android_ndk_version = "r20b"
android_ndk_major_version = 20
android_sdk_build_tools_version="27.0.3"
android_sdk_tools_version_suffix="-26.2.0-dev"
android_sdk_version=28


+ 4
- 2
android_flags.release.gn View File

@ -1,9 +1,11 @@
blink_symbol_level=0
enable_ac3_eac3_audio_demuxing=true
dfmify_dev_ui=false
disable_autofill_assistant_dfm=true
disable_tab_ui_dfm=true
enable_iterator_debugging=false
enable_swiftshader=false
fatal_linker_warnings=false
is_debug=false
is_official_build=true
is_official_build=false
proprietary_codecs=true
symbol_level=0

+ 20
- 17
build.sh View File

@ -1,10 +1,10 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=78.0.3904.97
ungoogled_chromium_revision=2
target=monochrome_public_apk
webview_target=system_webview_apk
chromium_version=79.0.3945.117
ungoogled_chromium_revision=1
monochrome_target=monochrome_public_apk
monochrome_webview_target=system_webview_apk
# Required tools: python2, python3, ninja, git, clang, lld, llvm, curl, wget, npm
# Assuming default python to be python2. This is true on most Linux distributions.
@ -63,7 +63,7 @@ git fetch --depth 1 --no-tags origin "${libsync_commit}"
git reset --hard FETCH_HEAD
popd
gn_commit=a0a58ab261297009f1181222ac82ee6247e398ad
gn_commit=2426c173819e74a9dad7a2ab647cfa1506f6007f
mv src/tools/gn src/tools/gn.bak
git clone https://gn.googlesource.com/gn src/tools/gn
pushd src/tools/gn
@ -84,7 +84,7 @@ src/third_party/node/update_npm_deps
## Run ungoogled-chromium scripts
# Patch prune list and domain substitution
# TODO some pruned binaries are excluded since they will cause android build to fail
patch -p1 --ignore-whitespace -i patches/android-prune-domain-fix.patch --no-backup-if-mismatch
patch -p1 --ignore-whitespace -i patches/android-prune-fix.patch --no-backup-if-mismatch
# Remove the cache file if exists
cache_file="domsubcache.tar.gz"
if [[ -f ${cache_file} ]] ; then
@ -106,17 +106,14 @@ cp safe_browsing_proto_files/webprotect.pb.h src/components/safe_browsing/proto/
# This is Sylvain Beucler's libre Android rebuild
sdk_link="https://android-rebuilds.beuc.net/dl/bundles/android-sdk_user.9.0.0_r21_linux-x86.zip"
sdk_tools_link="https://android-rebuilds.beuc.net/dl/repository/sdk-repo-linux-tools-26.1.1.zip"
ndk_link="https://android-rebuilds.beuc.net/dl/bundles/android-ndk-r18b-linux-x86_64.tar.bz2"
ndk_link="https://android-rebuilds.beuc.net/dl/repository/android-ndk-r20b-linux-x86_64.tar.bz2"
mkdir android-rebuilds
mkdir android-sdk
mkdir android-ndk
cd android-rebuilds && { curl -O ${sdk_link} ; curl -O ${sdk_tools_link} ; curl -O ${ndk_link} ; cd -; }
unzip -qqo android-rebuilds/android-sdk_user.9.0.0_r21_linux-x86.zip -d android-sdk
unzip -qqo android-rebuilds/sdk-repo-linux-tools-26.1.1.zip -d android-sdk/android-sdk_user.9.0.0_r21_linux-x86
tar xjf android-rebuilds/android-ndk-r18b-linux-x86_64.tar.bz2 -C android-ndk
# remove data_space.h, patch native_window.h
mv android-ndk/android-ndk-r18b/sysroot/usr/include/android/data_space.h android-ndk/android-ndk-r18b/sysroot/usr/include/android/data_space.h.bak
patch -p1 --ignore-whitespace -i patches/ndk-native-window.patch --no-backup-if-mismatch
tar xjf android-rebuilds/android-ndk-r20b-linux-x86_64.tar.bz2 -C android-ndk
# Create symbol links to sdk folders
# The rebuild sdk has a different folder structure from the checked out version, so it is easier to create symbol links
@ -141,12 +138,12 @@ popd
# remove ndk folders
DIRECTORY="src/third_party/android_ndk"
gn_file="BUILD.gn"
cp -a "${DIRECTORY}/${gn_file}" android-ndk/android-ndk-r18b
cp -ar "${DIRECTORY}/toolchains/llvm/prebuilt/linux-x86_64" android-ndk/android-ndk-r18b/toolchains/llvm/prebuilt # Need libgcc.a otherwise compilation will fail
cp -a "${DIRECTORY}/${gn_file}" android-ndk/android-ndk-r20b
cp -ar "${DIRECTORY}/toolchains/llvm/prebuilt/linux-x86_64" android-ndk/android-ndk-r20b/toolchains/llvm/prebuilt # Need libgcc.a otherwise compilation will fail
pushd "${DIRECTORY}"
cd ..
rm -rf android_ndk
ln -s ../../android-ndk/android-ndk-r18b android_ndk
ln -s ../../android-ndk/android-ndk-r20b android_ndk
popd
@ -203,10 +200,11 @@ popd
## Configure output folder
cd src
pushd src
mkdir -p out/Default
cat ../ungoogled-chromium/flags.gn ../android_flags.gn ../android_flags.release.gn > out/Default/args.gn
tools/gn/out/gn gen out/Default --fail-on-unused-args
popd
## Set compiler flags
@ -215,6 +213,11 @@ export NM=${NM:=llvm-nm}
export CC=${CC:=clang}
export CXX=${CXX:=clang++}
# Patch build/android/gyp/javac.py
patch -p1 --ignore-whitespace -i patches/ignore-aidl-assertion-error.patch --no-backup-if-mismatch
## Build
/usr/bin/ninja -C out/Default ${target}
/usr/bin/ninja -C out/Default ${webview_target}
pushd src
/usr/bin/ninja -C out/Default ${monochrome_target}
/usr/bin/ninja -C out/Default ${monochrome_webview_target}
popd

+ 2315
- 532
domain_sub_2.list
File diff suppressed because it is too large
View File


+ 17
- 3
misc/android_studio_setup.sh View File

@ -1,12 +1,12 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=77.0.3865.90
chromium_version=79.0.3945.117
target=monochrome_public_apk
#target=system_webview_apk
# Create symbol links to gn, depot-tools
cd src
pushd src
pushd buildtools/linux64
ln -s ../../tools/gn/out/gn
popd
@ -14,6 +14,7 @@ popd
pushd third_party
ln -s ../../depot_tools
popd
popd
## Set compiler flags
export AR=${AR:=llvm-ar}
@ -21,7 +22,14 @@ export NM=${NM:=llvm-nm}
export CC=${CC:=clang}
export CXX=${CXX:=clang++}
## Genarate gn file
pushd src/tools/gn
build/gen.py
/usr/bin/ninja -C out gn
popd
# Need different GN flags than a release build
pushd src
output_folder=out/Debug_apk
mkdir -p ${output_folder}
cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
@ -31,9 +39,11 @@ tools/gn/out/gn gen ${output_folder} --fail-on-unused-args
# Compile apk
ninja -C ${output_folder} ${target}
popd
###
# Develop folder
pushd src
output_folder=out/Debug
mkdir -p ${output_folder}
cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
@ -42,5 +52,9 @@ cat ../android_flags.debug.gn ../android_flags.gn > ${output_folder}/args.gn
tools/gn/out/gn gen ${output_folder} --fail-on-unused-args
# Generate gradle files
# autoninja needs a patch to remove the usage of vpython; also need psutil package
# patch generate_gradle.py to use system ninja instead of depot_tools
pushd ..
patch -p1 --ignore-whitespace -i patches/generate_gradle.patch --no-backup-if-mismatch
popd
python build/android/gradle/generate_gradle.py --target //chrome/android:${target} --output-directory ${output_folder}
popd

+ 1
- 1
misc/misc.sh View File

@ -31,7 +31,7 @@ touch "../${substitution_list_temp}"
while read line
do
line="$(echo "$line" | cut -d '#' -f1)"
grep -RIl --include="*.gn" --include="*.gni" --include="*.proto" --include="*.def" --include="*.jinja" --include="*.jinja2" --include="*.xml" --include="*.css" --include="*.htm" --include="*.html" --include="*.xhtml" --include="*.js" --include="*.json" --include="*.json5" --include="*.jsonp" --include="*.py" --include="*.java" --include="*.h" --include="*.c" --include="*.cc" --include="*.cpp" --include="*.m" --include="*.mm" --include="*.asm" --include="*.rb" --include="*.mojom" --include="*.hlsl" --include="*.am" --include="*.map" --include="*.go" --include="*.aidl" --include="*.ac" --include="*.m4" --include="*.idl" --include="*.fidl" --include="*.yaml" --include="*.nc" --include="*.el" --include="*.tcl" -P "$line" . | grep -v -E '/\.git/|/android_sdk/|/android_tools/' >> "../${substitution_list_temp}"
grep -RIl --include="*.gn" --include="*.gni" --include="*.proto" --include="*.def" --include="*.jinja" --include="*.jinja2" --include="*.xml" --include="*.css" --include="*.htm" --include="*.html" --include="*.xhtml" --include="*.js" --include="*.json" --include="*.json5" --include="*.jsonp" --include="*.py" --include="*.java" --include="*.h" --include="*.c" --include="*.cc" --include="*.cpp" --include="*.m" --include="*.mm" --include="*.asm" --include="*.rb" --include="*.mojom" --include="*.hlsl" --include="*.am" --include="*.map" --include="*.go" --include="*.aidl" --include="*.ac" --include="*.m4" --include="*.idl" --include="*.fidl" --include="*.yaml" --include="*.nc" --include="*.el" --include="*.tcl" -P "$line" . | grep -v -E '/\.git/|/android_sdk/|/test/|/android_tools/' >> "../${substitution_list_temp}"
done < ../ungoogled-chromium/domain_regex.list
# Not working correctly? awk '{!seen[$0]++};END{for(i in seen) if(seen[i]==1)print i}' "../${substitution_list_temp}" > "../${substitution_list_2}"
sort -u "../${substitution_list_temp}" | uniq > "../${substitution_list_2}"


+ 1
- 2
patches/Bromite/Remove-SMS-integration.patch View File

@ -6,12 +6,11 @@ Subject: Remove SMS integration
content/public/android/BUILD.gn | 2 -
.../org/chromium/content/browser/sms/Wrappers.java | 74 ----------------------
2 files changed, 76 deletions(-)
delete mode 100644 content/public/android/java/src/org/chromium/content/browser/sms/Wrappers.java
diff --git a/content/public/android/BUILD.gn b/content/public/android/BUILD.gn
--- a/content/public/android/BUILD.gn
+++ b/content/public/android/BUILD.gn
@@ -231,8 +231,6 @@ android_library("content_java") {
@@ -232,8 +232,6 @@ android_library("content_java") {
"java/src/org/chromium/content/browser/selection/SmartSelectionClient.java",
"java/src/org/chromium/content/browser/selection/SmartSelectionMetricsLogger.java",
"java/src/org/chromium/content/browser/selection/SmartSelectionProvider.java",


+ 0
- 481
patches/Bromite/Remove-play-dependency-for-module-installer.patch View File

@ -1,481 +0,0 @@
From: csagan5 <[email protected]>
Date: Sat, 2 Nov 2019 16:27:51 +0100
Subject: Remove play dependency for module installer
---
.../FakeModuleInstallerBackend.java | 16 +-
.../module_installer/ModuleInstallerImpl.java | 150 ---------------
.../PlayCoreModuleInstallerBackend.java | 210 +--------------------
3 files changed, 10 insertions(+), 366 deletions(-)
diff --git a/components/module_installer/android/java/src/org/chromium/components/module_installer/FakeModuleInstallerBackend.java b/components/module_installer/android/java/src/org/chromium/components/module_installer/FakeModuleInstallerBackend.java
--- a/components/module_installer/android/java/src/org/chromium/components/module_installer/FakeModuleInstallerBackend.java
+++ b/components/module_installer/android/java/src/org/chromium/components/module_installer/FakeModuleInstallerBackend.java
@@ -7,9 +7,6 @@ package org.chromium.components.module_installer;
import android.content.Context;
import android.content.pm.PackageManager;
-import com.google.android.play.core.splitcompat.SplitCompat;
-import com.google.android.play.core.splitcompat.ingestion.Verifier;
-
import org.chromium.base.BuildInfo;
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
@@ -132,18 +129,7 @@ class FakeModuleInstallerBackend extends ModuleInstallerBackend {
return false;
}
- // Check that the module's signature matches Chrome's.
- try {
- Verifier verifier = new Verifier(context);
- if (!verifier.verifySplits()) {
- return false;
- }
- } catch (IOException | PackageManager.NameNotFoundException e) {
- return false;
- }
-
- // Tell SplitCompat to do a full emulation of the module.
- return SplitCompat.fullInstall(context);
+ return false;
}
private File joinPaths(String... paths) {
diff --git a/components/module_installer/android/java/src/org/chromium/components/module_installer/ModuleInstallerImpl.java b/components/module_installer/android/java/src/org/chromium/components/module_installer/ModuleInstallerImpl.java
--- a/components/module_installer/android/java/src/org/chromium/components/module_installer/ModuleInstallerImpl.java
+++ b/components/module_installer/android/java/src/org/chromium/components/module_installer/ModuleInstallerImpl.java
@@ -11,9 +11,6 @@ import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Build;
import android.text.TextUtils;
-import com.google.android.play.core.splitcompat.SplitCompat;
-import com.google.android.play.core.splitinstall.SplitInstallManagerFactory;
-
import org.chromium.base.BuildInfo;
import org.chromium.base.CommandLine;
import org.chromium.base.ContextUtils;
@@ -57,152 +54,5 @@ import java.util.TreeSet;
sInstance = moduleInstaller;
}
- @Override
- public void init() {
- try (Timer ignored1 = new Timer()) {
- if (sAppContextSplitCompatted) return;
- // SplitCompat.install may copy modules into Chrome's internal folder or clean them up.
- try (StrictModeContext ignored = StrictModeContext.allowDiskWrites()) {
- SplitCompat.install(ContextUtils.getApplicationContext());
- sAppContextSplitCompatted = true;
- }
- // SplitCompat.install may add emulated modules. Thus, update crash keys.
- updateCrashKeys();
- }
- }
-
- @Override
- public void initActivity(Activity activity) {
- try (Timer ignored = new Timer()) {
- // SplitCompat#install should always be run for the application first before it is run
- // for any activities.
- init();
- SplitCompat.installActivity(activity);
- }
- }
-
- @Override
- public void recordModuleAvailability() {
- try (Timer ignored = new Timer()) {
- getBackend().recordModuleAvailability();
- }
- }
-
- @Override
- public void recordStartupTime() {
- getBackend().recordStartupTime(Timer.getTotalTime());
- }
-
- @Override
- public void updateCrashKeys() {
- try (Timer ignored = new Timer()) {
- Context context = ContextUtils.getApplicationContext();
-
- // Get modules that are fully installed as split APKs (excluding base which is always
- // installed). Tree set to have ordered and, thus, deterministic results.
- Set<String> fullyInstalledModules = new TreeSet<>();
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- // Split APKs are only supported on Android L+.
- try {
- PackageInfo packageInfo = context.getPackageManager().getPackageInfo(
- BuildInfo.getInstance().packageName, 0);
- if (packageInfo.splitNames != null) {
- fullyInstalledModules.addAll(Arrays.asList(packageInfo.splitNames));
- }
- } catch (NameNotFoundException e) {
- throw new RuntimeException(e);
- }
- }
-
- // Create temporary split install manager to retrieve both fully installed and emulated
- // modules. Then remove fully installed ones to get emulated ones only. Querying the
- // installed modules can only be done if splitcompat has already been called. Otherwise,
- // emulation of later modules won't work. If splitcompat has not been called no modules
- // are emulated. Therefore, use an empty set in that case.
- Set<String> emulatedModules = new TreeSet<>();
- if (sAppContextSplitCompatted) {
- emulatedModules.addAll(
- SplitInstallManagerFactory.create(context).getInstalledModules());
- emulatedModules.removeAll(fullyInstalledModules);
- }
-
- CrashKeys.getInstance().set(
- CrashKeyIndex.INSTALLED_MODULES, encodeCrashKeyValue(fullyInstalledModules));
- CrashKeys.getInstance().set(
- CrashKeyIndex.EMULATED_MODULES, encodeCrashKeyValue(emulatedModules));
- }
- }
-
- @Override
- public void install(String moduleName, OnModuleInstallFinishedListener onFinishedListener) {
- try (Timer ignored = new Timer()) {
- ThreadUtils.assertOnUiThread();
-
- if (!mModuleNameListenerMap.containsKey(moduleName)) {
- mModuleNameListenerMap.put(moduleName, new LinkedList<>());
- }
- List<OnModuleInstallFinishedListener> onFinishedListeners =
- mModuleNameListenerMap.get(moduleName);
- onFinishedListeners.add(onFinishedListener);
- if (onFinishedListeners.size() > 1) {
- // Request is already running.
- return;
- }
- getBackend().install(moduleName);
- }
- }
-
- @Override
- public void installDeferred(String moduleName) {
- try (Timer ignored = new Timer()) {
- ThreadUtils.assertOnUiThread();
- getBackend().installDeferred(moduleName);
- }
- }
-
- private void onFinished(boolean success, List<String> moduleNames) {
- // Add timer to this private method since it is passed as a callback.
- try (Timer ignored = new Timer()) {
- ThreadUtils.assertOnUiThread();
-
- mActivityObserver.onModuleInstalled();
-
- for (String moduleName : moduleNames) {
- List<OnModuleInstallFinishedListener> onFinishedListeners =
- mModuleNameListenerMap.get(moduleName);
- if (onFinishedListeners == null) continue;
-
- for (OnModuleInstallFinishedListener listener : onFinishedListeners) {
- listener.onFinished(success);
- }
- mModuleNameListenerMap.remove(moduleName);
- }
-
- if (mModuleNameListenerMap.isEmpty()) {
- mBackend.close();
- mBackend = null;
- }
-
- updateCrashKeys();
- }
- }
-
- private ModuleInstallerBackend getBackend() {
- if (mBackend == null) {
- ModuleInstallerBackend.OnFinishedListener listener = this::onFinished;
- mBackend = CommandLine.getInstance().hasSwitch(FAKE_FEATURE_MODULE_INSTALL)
- ? new FakeModuleInstallerBackend(listener)
- : new PlayCoreModuleInstallerBackend(listener);
- }
- return mBackend;
- }
-
- private String encodeCrashKeyValue(Set<String> moduleNames) {
- if (moduleNames.isEmpty()) return "<none>";
- // Values with dots are interpreted as URLs. Some module names have dots in them. Make sure
- // they don't get sanitized.
- return TextUtils.join(",", moduleNames).replace('.', '$');
- }
-
private ModuleInstallerImpl() {}
}
diff --git a/components/module_installer/android/java/src/org/chromium/components/module_installer/PlayCoreModuleInstallerBackend.java b/components/module_installer/android/java/src/org/chromium/components/module_installer/PlayCoreModuleInstallerBackend.java
--- a/components/module_installer/android/java/src/org/chromium/components/module_installer/PlayCoreModuleInstallerBackend.java
+++ b/components/module_installer/android/java/src/org/chromium/components/module_installer/PlayCoreModuleInstallerBackend.java
@@ -7,15 +7,6 @@ package org.chromium.components.module_installer;
import android.content.SharedPreferences;
import android.util.SparseLongArray;
-import com.google.android.play.core.splitinstall.SplitInstallException;
-import com.google.android.play.core.splitinstall.SplitInstallManager;
-import com.google.android.play.core.splitinstall.SplitInstallManagerFactory;
-import com.google.android.play.core.splitinstall.SplitInstallRequest;
-import com.google.android.play.core.splitinstall.SplitInstallSessionState;
-import com.google.android.play.core.splitinstall.SplitInstallStateUpdatedListener;
-import com.google.android.play.core.splitinstall.model.SplitInstallErrorCode;
-import com.google.android.play.core.splitinstall.model.SplitInstallSessionStatus;
-
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.metrics.CachedMetrics.EnumeratedHistogramSample;
@@ -33,14 +24,13 @@ import java.util.Set;
* Backend that uses the Play Core SDK to download a module from Play and install it subsequently.
*/
/* package */ class PlayCoreModuleInstallerBackend
- extends ModuleInstallerBackend implements SplitInstallStateUpdatedListener {
+ extends ModuleInstallerBackend {
private static class InstallTimes {
public final boolean mIsCached;
public final SparseLongArray mInstallTimes = new SparseLongArray();
public InstallTimes(boolean isCached) {
mIsCached = isCached;
- mInstallTimes.put(SplitInstallSessionStatus.UNKNOWN, System.currentTimeMillis());
}
}
@@ -50,7 +40,6 @@ import java.util.Set;
private static final String KEY_MODULES_DEFERRED_REQUESTED_PREVIOUSLY =
"key_modules_deferred_requested_previously";
private final Map<String, InstallTimes> mInstallTimesMap = new HashMap<>();
- private final SplitInstallManager mManager;
private boolean mIsClosed;
// FeatureModuleInstallStatus defined in //tools/metrics/histograms/enums.xml.
@@ -90,183 +79,31 @@ import java.util.Set;
// Keep this one at the end and increment appropriately when adding new status.
private static final int AVAILABILITY_STATUS_COUNT = 3;
- /** Records via UMA all modules that have been requested and are currently installed. */
- @Override
- /* package */ void recordModuleAvailability() {
- SharedPreferences prefs = ContextUtils.getAppSharedPreferences();
- Set<String> requestedModules = new HashSet<>();
- requestedModules.addAll(
- prefs.getStringSet(KEY_MODULES_ONDEMAND_REQUESTED_PREVIOUSLY, new HashSet<>()));
- requestedModules.addAll(
- prefs.getStringSet(KEY_MODULES_DEFERRED_REQUESTED_PREVIOUSLY, new HashSet<>()));
- Set<String> installedModules = mManager.getInstalledModules();
-
- for (String name : requestedModules) {
- EnumeratedHistogramSample sample = new EnumeratedHistogramSample(
- "Android.FeatureModules.AvailabilityStatus." + name, AVAILABILITY_STATUS_COUNT);
- if (installedModules.contains(name)) {
- sample.record(AVAILABILITY_STATUS_INSTALLED_REQUESTED);
- } else {
- sample.record(AVAILABILITY_STATUS_REQUESTED);
- }
- }
-
- for (String name : installedModules) {
- if (!requestedModules.contains(name)) {
- // Module appeared without being requested. Weird.
- EnumeratedHistogramSample sample = new EnumeratedHistogramSample(
- "Android.FeatureModules.AvailabilityStatus." + name,
- AVAILABILITY_STATUS_COUNT);
- sample.record(AVAILABILITY_STATUS_INSTALLED_UNREQUESTED);
- }
- }
- }
-
- @Override
- /* package */ void recordStartupTime(long durationMs) {
- TimesHistogramSample sample =
- new TimesHistogramSample("Android.FeatureModules.StartupTime");
- sample.record(durationMs);
- }
-
/* package */ PlayCoreModuleInstallerBackend(OnFinishedListener listener) {
super(listener);
- // MUST call init before creating a SplitInstallManager.
- ModuleInstaller.getInstance().init();
- mManager = SplitInstallManagerFactory.create(ContextUtils.getApplicationContext());
- mManager.registerListener(this);
}
@Override
- public void install(String moduleName) {
+ public void close() {
assert !mIsClosed;
-
- // Record start time in order to later report the install duration via UMA. We want to make
- // a difference between modules that have been requested first before and after the last
- // Chrome start. Modules that have been requested before may install quicker as they may be
- // installed form cache. To do this, we use shared prefs to track modules previously
- // requested. Additionally, storing requested modules helps us to record module install
- // status at next Chrome start.
- assert !mInstallTimesMap.containsKey(moduleName);
- mInstallTimesMap.put(moduleName,
- new InstallTimes(storeModuleRequested(
- moduleName, KEY_MODULES_ONDEMAND_REQUESTED_PREVIOUSLY)));
-
- SplitInstallRequest request =
- SplitInstallRequest.newBuilder().addModule(moduleName).build();
-
- mManager.startInstall(request).addOnFailureListener(exception -> {
- int status = exception instanceof SplitInstallException
- ? getHistogramCode(((SplitInstallException) exception).getErrorCode())
- : INSTALL_STATUS_UNKNOWN_REQUEST_ERROR;
- Log.e(TAG, "Failed to request module '%s': error code %s", moduleName, status);
- // If we reach this error condition |onStateUpdate| won't be called. Thus, call
- // |onFinished| here.
- finish(false, Collections.singletonList(moduleName), status);
- });
+ mIsClosed = true;
}
@Override
- public void installDeferred(String moduleName) {
- assert !mIsClosed;
- mManager.deferredInstall(Collections.singletonList(moduleName));
- storeModuleRequested(moduleName, KEY_MODULES_DEFERRED_REQUESTED_PREVIOUSLY);
+ /* package */ void recordModuleAvailability() {
+ SharedPreferences prefs = ContextUtils.getAppSharedPreferences();
}
@Override
- public void close() {
- assert !mIsClosed;
- mManager.unregisterListener(this);
- mIsClosed = true;
+ /* package */ void recordStartupTime(long durationMs) {
}
@Override
- public void onStateUpdate(SplitInstallSessionState state) {
- assert !mIsClosed;
- Log.i(TAG, "Status for modules '%s' updated to %d", state.moduleNames(), state.status());
- switch (state.status()) {
- case SplitInstallSessionStatus.DOWNLOADING:
- case SplitInstallSessionStatus.INSTALLING:
- case SplitInstallSessionStatus.INSTALLED:
- for (String name : state.moduleNames()) {
- mInstallTimesMap.get(name).mInstallTimes.put(
- state.status(), System.currentTimeMillis());
- }
- if (state.status() == SplitInstallSessionStatus.INSTALLED) {
- finish(true, state.moduleNames(), INSTALL_STATUS_SUCCESS);
- }
- break;
- // DOWNLOADED only gets sent if SplitCompat is not enabled. That's an error.
- // SplitCompat should always be enabled.
- case SplitInstallSessionStatus.DOWNLOADED:
- case SplitInstallSessionStatus.CANCELED:
- case SplitInstallSessionStatus.FAILED:
- int status;
- if (state.status() == SplitInstallSessionStatus.DOWNLOADED) {
- status = INSTALL_STATUS_NO_SPLITCOMPAT;
- } else if (state.status() == SplitInstallSessionStatus.CANCELED) {
- status = INSTALL_STATUS_CANCELLATION;
- } else {
- status = getHistogramCode(state.errorCode());
- }
- Log.e(TAG, "Failed to install modules '%s': error code %s", state.moduleNames(),
- status);
- finish(false, state.moduleNames(), status);
- break;
- }
- }
-
- private void finish(boolean success, List<String> moduleNames, int eventId) {
- for (String name : moduleNames) {
- RecordHistogram.recordEnumeratedHistogram(
- "Android.FeatureModules.InstallStatus." + name, eventId, INSTALL_STATUS_COUNT);
- if (success) {
- recordInstallTimes(name);
- }
- }
- onFinished(success, moduleNames);
+ public void install(String moduleName) {
}
- /**
- * Gets the UMA code based on a SplitInstall error code
- * @param errorCode The error code
- * @return int The User Metric Analysis code
- */
- private int getHistogramCode(@SplitInstallErrorCode int errorCode) {
- switch (errorCode) {
- case SplitInstallErrorCode.ACCESS_DENIED:
- return INSTALL_STATUS_ACCESS_DENIED;
- case SplitInstallErrorCode.ACTIVE_SESSIONS_LIMIT_EXCEEDED:
- return INSTALL_STATUS_ACTIVE_SESSIONS_LIMIT_EXCEEDED;
- case SplitInstallErrorCode.API_NOT_AVAILABLE:
- return INSTALL_STATUS_API_NOT_AVAILABLE;
- case SplitInstallErrorCode.INCOMPATIBLE_WITH_EXISTING_SESSION:
- return INSTALL_STATUS_INCOMPATIBLE_WITH_EXISTING_SESSION;
- case SplitInstallErrorCode.INSUFFICIENT_STORAGE:
- return INSTALL_STATUS_INSUFFICIENT_STORAGE;
- case SplitInstallErrorCode.INVALID_REQUEST:
- return INSTALL_STATUS_INVALID_REQUEST;
- case SplitInstallErrorCode.MODULE_UNAVAILABLE:
- return INSTALL_STATUS_MODULE_UNAVAILABLE;
- case SplitInstallErrorCode.NETWORK_ERROR:
- return INSTALL_STATUS_NETWORK_ERROR;
- case SplitInstallErrorCode.NO_ERROR:
- return INSTALL_STATUS_NO_ERROR;
- case SplitInstallErrorCode.SERVICE_DIED:
- return INSTALL_STATUS_SERVICE_DIED;
- case SplitInstallErrorCode.SESSION_NOT_FOUND:
- return INSTALL_STATUS_SESSION_NOT_FOUND;
- case SplitInstallErrorCode.SPLITCOMPAT_COPY_ERROR:
- return INSTALL_STATUS_SPLITCOMPAT_COPY_ERROR;
- case SplitInstallErrorCode.SPLITCOMPAT_EMULATION_ERROR:
- return INSTALL_STATUS_SPLITCOMPAT_EMULATION_ERROR;
- case SplitInstallErrorCode.SPLITCOMPAT_VERIFICATION_ERROR:
- return INSTALL_STATUS_SPLITCOMPAT_VERIFICATION_ERROR;
- case SplitInstallErrorCode.INTERNAL_ERROR:
- return INSTALL_STATUS_INTERNAL_ERROR;
- default:
- return INSTALL_STATUS_UNKNOWN_SPLITINSTALL_ERROR;
- }
+ @Override
+ public void installDeferred(String moduleName) {
}
/**
@@ -286,33 +123,4 @@ import java.util.Set;
editor.apply();
return modulesRequestedPreviously.contains(moduleName);
}
-
- /** Records via UMA module install times divided into install steps. */
- private void recordInstallTimes(String moduleName) {
- recordInstallTime(moduleName, "", SplitInstallSessionStatus.UNKNOWN,
- SplitInstallSessionStatus.INSTALLED);
- recordInstallTime(moduleName, ".PendingDownload", SplitInstallSessionStatus.UNKNOWN,
- SplitInstallSessionStatus.DOWNLOADING);
- recordInstallTime(moduleName, ".Download", SplitInstallSessionStatus.DOWNLOADING,
- SplitInstallSessionStatus.INSTALLING);
- recordInstallTime(moduleName, ".Installing", SplitInstallSessionStatus.INSTALLING,
- SplitInstallSessionStatus.INSTALLED);
- }
-
- private void recordInstallTime(
- String moduleName, String histogramSubname, int startKey, int endKey) {
- assert mInstallTimesMap.containsKey(moduleName);
- InstallTimes installTimes = mInstallTimesMap.get(moduleName);
- if (installTimes.mInstallTimes.get(startKey) == 0
- || installTimes.mInstallTimes.get(endKey) == 0) {
- // Time stamps for install times have not been stored. Don't record anything to not skew
- // data.
- return;
- }
- RecordHistogram.recordLongTimesHistogram(
- String.format("Android.FeatureModules.%sInstallDuration%s.%s",
- installTimes.mIsCached ? "Cached" : "Uncached", histogramSubname,
- moduleName),
- installTimes.mInstallTimes.get(endKey) - installTimes.mInstallTimes.get(startKey));
- }
}
--
2.11.0

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

@ -11,7 +11,7 @@ Subject: kill Auth
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHelper.java
@@ -10,10 +10,6 @@ import android.content.Context;
@@ -11,10 +11,6 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.support.annotation.Nullable;
@ -22,7 +22,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/SigninHe
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.VisibleForTesting;
@@ -74,23 +70,7 @@ public class SigninHelper {
@@ -73,23 +69,7 @@ public class SigninHelper {
@Override
public List<String> getAccountChangeEvents(
Context context, int index, String accountName) {


+ 35
- 214
patches/Unobtainium/kill-GCM.patch View File

@ -6,15 +6,12 @@ Subject: kill GCM
chrome/android/BUILD.gn | 1 -
chrome/android/chrome_java_sources.gni | 6 -
chrome/android/java/AndroidManifest.xml | 64 -------
.../chrome/browser/BackgroundSyncLauncher.java | 97 ----------
.../chrome/browser/ChromeBackgroundService.java | 1 -
.../ChromeBackgroundTaskFactory.java | 3 -
.../invalidation/InvalidationController.java | 8 -
.../browser/ntp/snippets/SnippetsLauncher.java | 44 -----
.../browser/ntp/snippets/SnippetsLauncher.java | 45 +----
.../browser/services/gcm/GCMBackgroundTask.java | 2 +-
.../gcm/InvalidationGcmUpstreamSender.java | 18 --
components/background_task_scheduler/BUILD.gn | 1 -
.../BackgroundTaskSchedulerGcmNetworkManager.java | 206 +--------------------
.../BackgroundTaskSchedulerGcmNetworkManager.java | 208 +--------------------
components/gcm_driver/android/BUILD.gn | 1 -
components/gcm_driver/instance_id/android/BUILD.gn | 1 -
.../gcm_driver/instance_id/InstanceIDBridge.java | 52 +-----
@ -22,12 +19,12 @@ Subject: kill GCM
third_party/cacheinvalidation/BUILD.gn | 6 -
.../client/contrib/MultiplexingGcmListener.java | 91 +--------
.../android2/channel/AndroidNetworkChannel.java | 6 +-
19 files changed, 9 insertions(+), 600 deletions(-)
16 files changed, 10 insertions(+), 496 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -379,7 +379,6 @@ android_library("chrome_java") {
@@ -370,7 +370,6 @@ android_library("chrome_java") {
"//third_party/android_deps:com_google_protobuf_protobuf_lite_java",
"//third_party/android_deps:javax_inject_javax_inject_java",
"//third_party/android_media:android_media_java",
@ -38,7 +35,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java_sources.gni
--- a/chrome/android/chrome_java_sources.gni
+++ b/chrome/android/chrome_java_sources.gni
@@ -19,7 +19,6 @@ chrome_java_sources = [
@@ -16,7 +16,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/ChromeActivity.java",
"java/src/org/chromium/chrome/browser/ChromeActivitySessionTracker.java",
"java/src/org/chromium/chrome/browser/ChromeApplication.java",
@ -46,7 +43,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java
"java/src/org/chromium/chrome/browser/ChromeBackupAgent.java",
"java/src/org/chromium/chrome/browser/ChromeBackupWatcher.java",
"java/src/org/chromium/chrome/browser/ChromeBaseAppCompatActivity.java",
@@ -1424,11 +1423,6 @@ chrome_java_sources = [
@@ -1438,11 +1437,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/services/AndroidEduAndChildAccountHelper.java",
"java/src/org/chromium/chrome/browser/services/AndroidEduOwnerCheckCallback.java",
"java/src/org/chromium/chrome/browser/services/GoogleServicesManager.java",
@ -61,7 +58,7 @@ diff --git a/chrome/android/chrome_java_sources.gni b/chrome/android/chrome_java
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
--- a/chrome/android/java/AndroidManifest.xml
+++ b/chrome/android/java/AndroidManifest.xml
@@ -85,22 +85,17 @@ by a child template that "extends" this file.
@@ -81,22 +81,17 @@ by a child template that "extends" this file.
<permission android:name="{{ manifest_package }}.permission.CHILD_SERVICE" android:protectionLevel="signature" />
<permission android:name="{{ manifest_package }}.permission.READ_WRITE_BOOKMARK_FOLDERS" android:protectionLevel="signatureOrSystem" />
<permission android:name="{{ manifest_package }}.TOS_ACKED" android:protectionLevel="signatureOrSystem" />
@ -84,7 +81,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>
<uses-permission android:name="com.google.android.apps.now.CURRENT_ACCOUNT_ACCESS" />
@@ -1087,45 +1082,6 @@ by a child template that "extends" this file.
@@ -1038,50 +1033,9 @@ by a child template that "extends" this file.
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -128,10 +125,6 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
- android:exported="false"/>
-
<!-- Notification service for sync. -->
<meta-data android:name="ipc.invalidation.ticl.listener_service_class"
android:value="org.chromium.chrome.browser.invalidation.ChromeInvalidationClientService"/>
@@ -1137,8 +1093,6 @@ by a child template that "extends" this file.
</service>
<service android:name="com.google.ipc.invalidation.ticl.android2.TiclService"
android:exported="false"/>
- <service android:name="com.google.ipc.invalidation.ticl.android2.channel.AndroidMessageSenderService"
@ -139,7 +132,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<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"
@@ -1165,24 +1119,6 @@ by a child template that "extends" this file.
@@ -1108,24 +1062,6 @@ by a child template that "extends" this file.
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -164,152 +157,6 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<service android:name="org.chromium.chrome.browser.prerender.ChromePrerenderService"
android:exported="true"
tools:ignore="ExportedService" />
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java b/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/BackgroundSyncLauncher.java
@@ -8,10 +8,6 @@ import android.content.Context;
import android.content.SharedPreferences;
import android.os.StrictMode;
-import com.google.android.gms.gcm.GcmNetworkManager;
-import com.google.android.gms.gcm.OneoffTask;
-import com.google.android.gms.gcm.Task;
-
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.VisibleForTesting;
@@ -37,8 +33,6 @@ public class BackgroundSyncLauncher {
// BackgroundSyncLauncherAndroid, if any. If it is non-null then the browser is running.
private static BackgroundSyncLauncher sInstance;
- private GcmNetworkManager mScheduler;
-
/**
* Disables the automatic use of the GCMNetworkManager. When disabled, the methods which
* interact with GCM can still be used, but will not be called automatically on creation, or by
@@ -123,30 +117,6 @@ public class BackgroundSyncLauncher {
@VisibleForTesting
@CalledByNative
protected void launchBrowserIfStopped(final boolean shouldLaunch, final long minDelayMs) {
- mLaunchBrowserIfStoppedTask = new AsyncTask<Void>() {
- @Override
- protected Void doInBackground() {
- SharedPreferences prefs = ContextUtils.getAppSharedPreferences();
- prefs.edit()
- .putBoolean(PREF_BACKGROUND_SYNC_LAUNCH_NEXT_ONLINE, shouldLaunch)
- .apply();
- return null;
- }
- @Override
- protected void onPostExecute(Void params) {
- if (sGCMEnabled) {
- if (shouldLaunch) {
- RecordHistogram.recordBooleanHistogram(
- "BackgroundSync.LaunchTask.ScheduleSuccess",
- scheduleLaunchTask(mScheduler, minDelayMs));
- } else {
- RecordHistogram.recordBooleanHistogram(
- "BackgroundSync.LaunchTask.CancelSuccess",
- removeScheduledTasks(mScheduler));
- }
- }
- }
- }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
}
/**
@@ -158,7 +128,6 @@ public class BackgroundSyncLauncher {
}
protected BackgroundSyncLauncher() {
- mScheduler = GcmNetworkManager.getInstance(ContextUtils.getApplicationContext());
launchBrowserIfStopped(false, 0);
}
@@ -187,72 +156,6 @@ public class BackgroundSyncLauncher {
return !sGCMEnabled;
}
- private static boolean scheduleLaunchTask(GcmNetworkManager scheduler, long minDelayMs) {
- // Google Play Services may not be up to date, if the application was not installed through
- // the Play Store. In this case, scheduling the task will fail silently.
- final long minDelaySecs = minDelayMs / 1000;
- OneoffTask oneoff = new OneoffTask.Builder()
- .setService(ChromeBackgroundService.class)
- .setTag(TASK_TAG)
- // We have to set a non-zero execution window here
- .setExecutionWindow(minDelaySecs, minDelaySecs + 1)
- .setRequiredNetwork(Task.NETWORK_STATE_CONNECTED)
- .setPersisted(true)
- .setUpdateCurrent(true)
- .build();
- try {
- scheduler.schedule(oneoff);
- } catch (IllegalArgumentException e) {
- // Disable GCM for the remainder of this session.
- setGCMEnabled(false);
- // Return false so that the failure will be logged.
- return false;
- }
- return true;
- }
-
- private static boolean removeScheduledTasks(GcmNetworkManager scheduler) {
- // Third-party code causes broadcast to touch disk. http://crbug.com/614679
- StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
- try {
- scheduler.cancelTask(TASK_TAG, ChromeBackgroundService.class);
- } catch (IllegalArgumentException e) {
- // This occurs when BackgroundSyncLauncherService is not found in the application
- // manifest. This should not happen in code that reaches here, but has been seen in
- // the past. See https://crbug.com/548314
- // Disable GCM for the remainder of this session.
- setGCMEnabled(false);
- // Return false so that the failure will be logged.
- return false;
- } finally {
- StrictMode.setThreadPolicy(oldPolicy);
- }
- return true;
- }
-
- /**
- * Reschedule any required background sync tasks, if they have been removed due to an
- * application upgrade.
- *
- * This method checks the saved preferences, and reschedules the sync tasks as appropriate
- * to match the preferences.
- * This method is static so that it can be run without actually instantiating a
- * BackgroundSyncLauncher.
- */
- protected static void rescheduleTasksOnUpgrade(final Context context) {
- final GcmNetworkManager scheduler = GcmNetworkManager.getInstance(context);
- BackgroundSyncLauncher.ShouldLaunchCallback callback = shouldLaunch -> {
- if (shouldLaunch) {
- // It's unclear what time the sync event was supposed to fire, so fire
- // without delay and let the browser reschedule if necessary.
- // TODO(iclelland): If this fails, report the failure via UMA (not now,
- // since the browser is not running, but on next startup.)
- scheduleLaunchTask(scheduler, 0);
- }
- };
- BackgroundSyncLauncher.shouldLaunchBrowserIfStopped(callback);
- }
-
@VisibleForTesting
static void setGCMEnabled(boolean enabled) {
sGCMEnabled = enabled;
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeBackgroundService.java
@@ -113,7 +113,6 @@ public class ChromeBackgroundService extends GcmTaskService {
@VisibleForTesting
protected void rescheduleBackgroundSyncTasksOnUpgrade() {
- BackgroundSyncLauncher.rescheduleTasksOnUpgrade(this);
}
private void handleSnippetsOnBrowserUpgraded() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/background_task_scheduler/ChromeBackgroundTaskFactory.java
@ -330,32 +177,6 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/background_task
case TaskIds.OFFLINE_PAGES_BACKGROUND_JOB_ID:
return new OfflineBackgroundTask();
case TaskIds.OFFLINE_PAGES_PREFETCH_JOB_ID:
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java b/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/invalidation/InvalidationController.java
@@ -10,8 +10,6 @@ import android.os.Build;
import android.os.Handler;
import android.os.SystemClock;
-import com.google.ipc.invalidation.ticl.android2.channel.AndroidGcmController;
-
import org.chromium.base.ApplicationState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ContextUtils;
@@ -193,13 +191,7 @@ public class InvalidationController implements ApplicationStatus.ApplicationStat
* Registers for Google Cloud Messaging (GCM) for Invalidations.
*/
private void ensureGcmIsInitialized() {
- if (mGcmInitialized) return;
mGcmInitialized = true;
- PostTask.postTask(TaskTraits.BEST_EFFORT_MAY_BLOCK, () -> {
- boolean useGcmUpstream = true;
- AndroidGcmController.get(ContextUtils.getApplicationContext())
- .initializeGcm(useGcmUpstream);
- });
}
@VisibleForTesting
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsLauncher.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsLauncher.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsLauncher.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsLauncher.java
@ -388,12 +209,12 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/Sn
protected SnippetsLauncher() {
checkGCM();
+ mGCMEnabled = false;
- mScheduler = GcmNetworkManager.getInstance(ContextUtils.getApplicationContext());
+ mGCMEnabled = false;
}
private void checkGCM() {
@@ -89,32 +81,7 @@ public class SnippetsLauncher {
@@ -89,32 +82,7 @@ public class SnippetsLauncher {
}
}
@ -426,7 +247,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/Sn
}
@CalledByNative
@@ -127,23 +94,12 @@ public class SnippetsLauncher {
@@ -127,23 +95,12 @@ public class SnippetsLauncher {
.edit()
.putBoolean(PREF_IS_SCHEDULED, isScheduled)
.apply();
@ -453,7 +274,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/Sn
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java
@@ -41,7 +41,7 @@ public class GCMBackgroundTask implements BackgroundTask {
@@ -42,7 +42,7 @@ public class GCMBackgroundTask implements BackgroundTask {
return false;
}
@ -465,15 +286,15 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/GC
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java
@@ -13,7 +13,6 @@ import android.support.annotation.MainThread;
import android.support.annotation.Nullable;
import android.util.Log;
@@ -14,7 +14,6 @@ import android.util.Log;
import androidx.annotation.MainThread;
import androidx.annotation.Nullable;
-import com.google.android.gms.gcm.GoogleCloudMessaging;
import com.google.ipc.invalidation.ticl.android2.channel.GcmUpstreamSenderService;
import org.chromium.base.ContextUtils;
@@ -26,9 +25,6 @@ import org.chromium.components.signin.OAuth2TokenService;
@@ -28,9 +27,6 @@ import org.chromium.components.signin.OAuth2TokenService;
import org.chromium.components.sync.SyncConstants;
import org.chromium.content_public.browser.UiThreadTaskTraits;
@ -483,7 +304,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/services/gcm/In
/**
* Sends Upstream messages for Invalidations using GCM.
*/
@@ -87,20 +83,6 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
@@ -92,20 +88,6 @@ public class InvalidationGcmUpstreamSender extends GcmUpstreamSenderService {
* This function runs on a thread pool executor thread.
*/
private void sendUpstreamMessage(String to, Bundle data, String token, Context context) {
@ -518,9 +339,9 @@ diff --git a/components/background_task_scheduler/BUILD.gn b/components/backgrou
diff --git a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java
--- a/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java
+++ b/components/background_task_scheduler/android/java/src/org/chromium/components/background_task_scheduler/BackgroundTaskSchedulerGcmNetworkManager.java
@@ -8,14 +8,6 @@ import android.content.Context;
import android.os.Bundle;
import android.support.annotation.NonNull;
@@ -9,14 +9,6 @@ import android.os.Bundle;
import androidx.annotation.NonNull;
-import com.google.android.gms.common.ConnectionResult;
-import com.google.android.gms.common.GoogleApiAvailability;
@ -533,7 +354,7 @@ diff --git a/components/background_task_scheduler/android/java/src/org/chromium/
import org.chromium.base.Log;
import org.chromium.base.ThreadUtils;
import org.chromium.base.VisibleForTesting;
@@ -42,212 +34,14 @@ class BackgroundTaskSchedulerGcmNetworkManager implements BackgroundTaskSchedule
@@ -43,212 +35,14 @@ class BackgroundTaskSchedulerGcmNetworkManager implements BackgroundTaskSchedule
sClock = clock;
}
@ -750,18 +571,18 @@ diff --git a/components/background_task_scheduler/android/java/src/org/chromium/
diff --git a/components/gcm_driver/android/BUILD.gn b/components/gcm_driver/android/BUILD.gn
--- a/components/gcm_driver/android/BUILD.gn
+++ b/components/gcm_driver/android/BUILD.gn
@@ -14,7 +14,6 @@ android_library("gcm_driver_java") {
deps = [
@@ -15,7 +15,6 @@ android_library("gcm_driver_java") {
"//base:base_java",
"//base:jni_java",
"//content/public/android:content_java",
- "//third_party/android_sdk:android_gcm_java",
"//third_party/jsr-305:jsr_305_javalib",
]
annotation_processor_deps = [ "//base/android/jni_generator:jni_processor" ]
diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm_driver/instance_id/android/BUILD.gn
--- a/components/gcm_driver/instance_id/android/BUILD.gn
+++ b/components/gcm_driver/instance_id/android/BUILD.gn
@@ -28,7 +28,6 @@ android_library("instance_id_driver_java") {
@@ -31,7 +31,6 @@ android_library("instance_id_driver_java") {
java_files = [
"java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java",
@ -772,7 +593,7 @@ diff --git a/components/gcm_driver/instance_id/android/BUILD.gn b/components/gcm
diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
--- a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
+++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
@@ -28,7 +28,6 @@ public class InstanceIDBridge {
@@ -29,7 +29,6 @@ public class InstanceIDBridge {
* Underlying InstanceIDWithSubtype. May be shared by multiple InstanceIDBridges. Must be
* initialized on a background thread.
*/
@ -780,7 +601,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
private static boolean sBlockOnAsyncTasksForTesting;
@@ -73,7 +72,7 @@ public class InstanceIDBridge {
@@ -74,7 +73,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<String>() {
@Override
protected String doBackgroundWork() {
@ -789,7 +610,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(String id) {
@@ -88,7 +87,7 @@ public class InstanceIDBridge {
@@ -90,7 +89,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Long>() {
@Override
protected Long doBackgroundWork() {
@ -798,7 +619,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Long creationTime) {
@@ -113,24 +112,7 @@ public class InstanceIDBridge {
@@ -116,24 +115,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<String>() {
@Override
protected String doBackgroundWork() {
@ -824,7 +645,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(String token) {
@@ -146,21 +128,7 @@ public class InstanceIDBridge {
@@ -150,21 +132,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Boolean>() {
@Override
protected Boolean doBackgroundWork() {
@ -847,7 +668,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Boolean success) {
@@ -175,12 +143,7 @@ public class InstanceIDBridge {
@@ -180,12 +148,7 @@ public class InstanceIDBridge {
new BridgeAsyncTask<Boolean>() {
@Override
protected Boolean doBackgroundWork() {
@ -861,7 +682,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
}
@Override
protected void sendResultToNative(Boolean success) {
@@ -219,11 +182,6 @@ public class InstanceIDBridge {
@@ -215,11 +178,6 @@ public class InstanceIDBridge {
@Override
@SuppressWarnings("NoSynchronizedThisCheck") // Only used/accessible by native.
protected Result doInBackground() {
@ -876,10 +697,10 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
diff --git a/components/sync/android/BUILD.gn b/components/sync/android/BUILD.gn
--- a/components/sync/android/BUILD.gn
+++ b/components/sync/android/BUILD.gn
@@ -11,7 +11,6 @@ android_library("sync_java") {
@@ -12,7 +12,6 @@ android_library("sync_java") {
"//components/signin/core/browser/android:java",
"//net/android:net_java",
"//third_party/android_deps:com_android_support_support_annotations_java",
"//third_party/android_deps:androidx_annotation_annotation_java",
- "//third_party/android_sdk:android_gcm_java",
"//third_party/cacheinvalidation:cacheinvalidation_javalib",
"//third_party/cacheinvalidation:cacheinvalidation_proto_java",


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

@ -10,7 +10,7 @@ Subject: kill Location, fall back to system
diff --git a/services/device/geolocation/BUILD.gn b/services/device/geolocation/BUILD.gn
--- a/services/device/geolocation/BUILD.gn
+++ b/services/device/geolocation/BUILD.gn
@@ -136,7 +136,6 @@ if (is_android) {
@@ -145,7 +145,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",


+ 2
- 2
patches/Unobtainium/kill-Translate.patch View File

@ -9,7 +9,7 @@ Subject: kill Translate
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -24,6 +24,7 @@ import org.chromium.chrome.browser.datareduction.DataReductionProxyUma;
@@ -25,6 +25,7 @@ import org.chromium.chrome.browser.datareduction.DataReductionProxyUma;
import org.chromium.chrome.browser.metrics.UmaUtils;
import org.chromium.chrome.browser.net.spdyproxy.DataReductionProxySettings;
import org.chromium.chrome.browser.search_engines.TemplateUrlServiceFactory;
@ -17,7 +17,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstR
import org.chromium.chrome.browser.searchwidget.SearchWidgetProvider;
import org.chromium.ui.base.LocalizationUtils;
@@ -137,6 +138,8 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa
@@ -138,6 +139,8 @@ public class FirstRunActivity extends FirstRunActivityBase implements FirstRunPa
if (mPostNativePageSequenceCreated) return;
mFirstRunFlowSequencer.onNativeInitialized(mFreProperties);


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

@ -10,7 +10,7 @@ Subject: [PATCH 20/30] disable media router media remoting by default
diff --git a/src/chrome/browser/profiles/profile.cc b/src/chrome/browser/profiles/profile.cc
--- a/chrome/browser/profiles/profile.cc
+++ b/chrome/browser/profiles/profile.cc
@@ -223,7 +223,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -231,7 +231,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
prefs::kMediaRouterFirstRunFlowAcknowledged,
false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);


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

@ -40,7 +40,7 @@ diff --git a/src/chrome/browser/media/router/media_router_feature.cc b/src/chrom
diff --git a/src/chrome/browser/profiles/profile_impl.cc b/src/chrome/browser/profiles/profile_impl.cc
--- a/chrome/browser/profiles/profile_impl.cc
+++ b/chrome/browser/profiles/profile_impl.cc
@@ -445,7 +445,7 @@ void ProfileImpl::RegisterProfilePrefs(
@@ -421,7 +421,7 @@ void ProfileImpl::RegisterProfilePrefs(
registry->RegisterStringPref(
prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);


patches/android-prune-domain-fix.patch → patches/android-prune-fix.patch View File

@ -4,23 +4,23 @@ author: Wengling Chen <[email protected]>
--- a/ungoogled-chromium/pruning.list
+++ b/ungoogled-chromium/pruning.list
@@ -13,7 +13,6 @@ base/test/data/pe_image/pe_image_test_32.dll
@@ -14,7 +14,6 @@ base/test/data/pe_image/pe_image_test_32.dll
base/test/data/pe_image/pe_image_test_64.dll
base/test/data/pe_image/pe_image_test_arm64.dll
build/android/CheckInstallApk-debug.apk
-build/android/chromium-debug.keystore
build/android/tests/symbolize/liba.so
build/android/tests/symbolize/libb.so
build/linux/sysroot_scripts/debian-archive-sid-stable.gpg
@@ -3584,7 +3583,6 @@ third_party/angle/third_party/glmark2/src/data/models/cat.3ds
third_party/angle/third_party/glmark2/src/data/models/cube.3ds
third_party/angle/third_party/glmark2/src/data/models/horse.3ds
third_party/angle/third_party/vulkan-loader/src/loader/loader.aps
build/linux/sysroot_scripts/debian_archive_unstable.gpg
@@ -3612,7 +3611,6 @@ third_party/angle/third_party/vulkan-tools/src/external/x64/lib/vulkan-1.lib
third_party/angle/third_party/vulkan-tools/src/external/x86/lib/vulkan-1.lib
third_party/angle/third_party/vulkan-validation-layers/src/external/x64/lib/vulkan-1.lib
third_party/angle/third_party/vulkan-validation-layers/src/external/x86/lib/vulkan-1.lib
-third_party/bazel/desugar/Desugar-runtime.jar
third_party/blink/manual_tests/WebKitSite.webarchive
third_party/blink/manual_tests/accessibility/resources/AppletTest.class
third_party/blink/manual_tests/plugins/test.swf
@@ -13335,12 +13333,9 @@ third_party/hunspell/fuzz/bdict_corpus/en-US-7-1.bdic
@@ -13434,12 +13432,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

+ 20
- 0
patches/generate_gradle.patch View File

@ -0,0 +1,20 @@
From: Wengling Chen <[email protected]>
Date: Thu, 09 Jan 2020 23:27:56 -0500
Subject: Use system ninja
---
src/build/android/gradle/generate_gradle.py | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/build/android/gradle/generate_gradle.py b/src/build/android/gradle/generate_gradle.py
--- a/src/build/android/gradle/generate_gradle.py
+++ b/src/build/android/gradle/generate_gradle.py
@@ -126,7 +126,7 @@ def _RunGnGen(output_dir, args=None):
def _RunNinja(output_dir, args):
cmd = [
- os.path.join(_DEPOT_TOOLS_PATH, 'autoninja'),
+ 'ninja',
'-C',
output_dir,
]

+ 20
- 0
patches/ignore-aidl-assertion-error.patch View File

@ -0,0 +1,20 @@
From: Wengling Chen <[email protected]>
Date: Fri, 10 Jan 2020 22:24:48 -0500
Subject: Ignore assertion error on aidl.srcjar
---
src/build/android/gyp/javac.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/build/android/gyp/javac.py b/src/build/android/gyp/javac.py
--- a/src/build/android/gyp/javac.py
+++ b/src/build/android/gyp/javac.py
@@ -236,7 +236,7 @@ def _ProcessInfo(java_file, package_name, class_names, source, chromium_code):
for class_name in class_names:
yield '{}.{}'.format(package_name, class_name)
# Skip aidl srcjars since they don't indent code correctly.
- if '_aidl.srcjar' in source:
+ if 'aidl.srcjar' in source:
continue
assert not chromium_code or len(class_names) == 1, (
'Chromium java files must only have one class: {}'.format(source))

+ 0
- 14
patches/ndk-native-window.patch View File

@ -1,14 +0,0 @@
description: remove reference to data_space.h due to a ENUM redefined error
author: Wengling Chen <[email protected]>
--- a/android-ndk/android-ndk-r18b/sysroot/usr/include/android/native_window.h
+++ b/android-ndk/android-ndk-r18b/sysroot/usr/include/android/native_window.h
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
-#include <android/data_space.h>
+//#include <android/data_space.h>
#include <android/hardware_buffer.h>
#include <android/rect.h>

+ 3
- 1
patches/series View File

@ -2,6 +2,8 @@ src-fix/android-rlz-fix-missing-variable.patch
src-fix/fix-null-mInstanceID.patch
src-fix/fix-closure-compiler-minify-error.patch
src-fix/fix-unkown-warning-clang-9.patch
src-fix/fix-safe-browsing-prefs.patch
src-fix/fix-wrong-macro-kSigninAllowedOnNextStartup.patch
Vanadium/0020-disable-media-router-media-remoting-by-default.patch
Vanadium/0021-disable-media-router-by-default.patch
Unobtainium/kill-Auth.patch
@ -21,6 +23,6 @@ ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.vision-co
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.flags-com.google.android.gms.location.places-com.google.android.gms.stats.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.gms.common-auth-signin-dynamic-com.google.android.gms.tasks.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.patch
ungoogled-chromium-android/Remove-dependency-on-com.google.android.play.core.splitcompat-com.google.android.play.core.splitinstall.patch
ungoogled-chromium-android/disable-context-search-by-default.patch
Bromite/Remove-SMS-integration.patch
Bromite/Remove-play-dependency-for-module-installer.patch

+ 1
- 1
patches/src-fix/fix-null-mInstanceID.patch View File

@ -1,7 +1,7 @@
diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
--- a/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
+++ b/components/gcm_driver/instance_id/android/java/src/org/chromium/components/gcm_driver/instance_id/InstanceIDBridge.java
@@ -124,7 +124,10 @@ public class InstanceIDBridge {
@@ -127,7 +127,10 @@ public class InstanceIDBridge {
SubscriptionFlagManager.buildSubscriptionUniqueId(
mSubtype, authorizedEntity),
flags);


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

@ -0,0 +1,83 @@
From: Wengling Chen <[email protected]>
Date: Fri, 10 Jan 2020 18:01:56 -0500
Subject: Fix build error caused by the removal of safe_browsing_prefs.h
---
android_webview/browser/aw_browser_context.cc | 2 +-
.../browser/safe_browsing/aw_safe_browsing_blocking_page.cc | 9 ++++-----
chrome/browser/android/preferences/pref_service_bridge.cc | 5 +----
weblayer/browser/profile_impl.cc | 2 --
4 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/android_webview/browser/aw_browser_context.cc b/android_webview/browser/aw_browser_context.cc
--- a/android_webview/browser/aw_browser_context.cc
+++ b/android_webview/browser/aw_browser_context.cc
@@ -227,7 +227,7 @@ base::FilePath AwBrowserContext::GetContextStoragePath() {
// static
void AwBrowserContext::RegisterPrefs(PrefRegistrySimple* registry) {
- safe_browsing::RegisterProfilePrefs(registry);
+ // safe_browsing::RegisterProfilePrefs(registry);
// Register the Autocomplete Data Retention Policy pref.
// The default value '0' represents the latest Chrome major version on which
diff --git a/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc b/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc
--- a/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc
+++ b/android_webview/browser/safe_browsing/aw_safe_browsing_blocking_page.cc
@@ -101,12 +101,11 @@ void AwSafeBrowsingBlockingPage::ShowBlockingPage(
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions display_options =
BaseSafeBrowsingErrorUI::SBErrorDisplayOptions(
IsMainPageLoadBlocked(unsafe_resources),
- safe_browsing::IsExtendedReportingOptInAllowed(*pref_service),
+ false,
browser_context->IsOffTheRecord(),
- safe_browsing::IsExtendedReportingEnabled(*pref_service),
- safe_browsing::IsExtendedReportingPolicyManaged(*pref_service),
- pref_service->GetBoolean(
- ::prefs::kSafeBrowsingProceedAnywayDisabled),
+ false,
+ false,
+ false,
false, // should_open_links_in_new_tab
false, // always_show_back_to_safety
"cpn_safe_browsing_wv"); // help_center_article_link
diff --git a/chrome/browser/android/preferences/pref_service_bridge.cc b/chrome/browser/android/preferences/pref_service_bridge.cc
--- a/chrome/browser/android/preferences/pref_service_bridge.cc
+++ b/chrome/browser/android/preferences/pref_service_bridge.cc
@@ -441,16 +441,13 @@ static jboolean JNI_PrefServiceBridge_GetSearchSuggestManaged(
static jboolean JNI_PrefServiceBridge_GetSafeBrowsingExtendedReportingEnabled(
JNIEnv* env,
const JavaParamRef<jobject>& obj) {
- return safe_browsing::IsExtendedReportingEnabled(*GetPrefService());
+ return false;
}
static void JNI_PrefServiceBridge_SetSafeBrowsingExtendedReportingEnabled(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
jboolean enabled) {
- safe_browsing::SetExtendedReportingPrefAndMetric(
- GetPrefService(), enabled,
- safe_browsing::SBER_OPTIN_SITE_ANDROID_SETTINGS);
}
static jboolean JNI_PrefServiceBridge_GetSafeBrowsingExtendedReportingManaged(
diff --git a/weblayer/browser/profile_impl.cc b/weblayer/browser/profile_impl.cc
--- a/weblayer/browser/profile_impl.cc
+++ b/weblayer/browser/profile_impl.cc
@@ -15,7 +15,6 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/pref_service_factory.h"
-#include "components/safe_browsing/common/safe_browsing_prefs.h"
#include "components/user_prefs/user_prefs.h"
#include "components/web_cache/browser/web_cache_manager.h"
#include "content/public/browser/browser_context.h"
@@ -202,7 +201,6 @@ class ProfileImpl::BrowserContextImpl : public content::BrowserContext {
// Registers the preferences that WebLayer accesses.
void RegisterPrefs(PrefRegistrySimple* pref_registry) {
- safe_browsing::RegisterProfilePrefs(pref_registry);
}
ProfileImpl* const profile_impl_;

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

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


+ 54
- 0
patches/src-fix/fix-wrong-macro-kSigninAllowedOnNextStartup.patch View File

@ -0,0 +1,54 @@
From: Wengling Chen <[email protected]>
Date: Fri, 10 Jan 2020 23:04:00 -0500
Subject: Fix wrong macro definition related to kSigninAllowedOnNextStartup
---
chrome/browser/policy/browser_signin_policy_handler.cc | 12 ------------
.../policy/configuration_policy_handler_list_factory.cc | 6 ------
2 files changed, 18 deletions(-)
diff --git a/chrome/browser/policy/browser_signin_policy_handler.cc b/chrome/browser/policy/browser_signin_policy_handler.cc
--- a/chrome/browser/policy/browser_signin_policy_handler.cc
+++ b/chrome/browser/policy/browser_signin_policy_handler.cc
@@ -44,24 +44,12 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(const PolicyMap& policies,
FALLTHROUGH;
case BrowserSigninMode::kEnabled:
prefs->SetValue(
-#if defined(OS_ANDROID)
- // The new kSigninAllowedOnNextStartup pref is only used on Desktop.
- // Keep the old kSigninAllowed pref for Android until the policy is
- // fully deprecated in M71 and can be removed.
-#else
prefs::kSigninAllowedOnNextStartup,
-#endif
base::Value(true));
break;
case BrowserSigninMode::kDisabled:
prefs->SetValue(
-#if defined(OS_ANDROID)
- // The new kSigninAllowedOnNextStartup pref is only used on Desktop.
- // Keep the old kSigninAllowed pref for Android until the policy is
- // fully deprecated in M71 and can be removed.
-#else
prefs::kSigninAllowedOnNextStartup,
-#endif
base::Value(false));
break;
}
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
--- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc
+++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -1398,13 +1398,7 @@ std::unique_ptr<ConfigurationPolicyHandlerList> BuildHandlerList(
base::Value::Type::BOOLEAN));
signin_legacy_policies.push_back(std::make_unique<SimplePolicyHandler>(
key::kSigninAllowed,
-#if defined(OS_ANDROID)
- // The new kSigninAllowedOnNextStartup pref is only used on Desktop.
- // Keep the old kSigninAllowed pref for Android until the policy is
- // fully deprecated in M71 and can be removed.
-#else
prefs::kSigninAllowedOnNextStartup,
-#endif
base::Value::Type::BOOLEAN));
handlers->AddHandler(std::make_unique<LegacyPoliciesDeprecatingPolicyHandler>(
std::move(signin_legacy_policies),

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

@ -16,7 +16,7 @@ Subject: Remove dependency on com.google.android.gms.auth
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -267,7 +267,6 @@ android_library("chrome_java") {
@@ -258,7 +258,6 @@ android_library("chrome_java") {
":thumbnail_cache_entry_proto_java",
":update_proto_java",
":usage_stats_proto_java",
@ -27,7 +27,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
diff --git a/components/signin/core/browser/android/BUILD.gn b/components/signin/core/browser/android/BUILD.gn
--- a/components/signin/core/browser/android/BUILD.gn
+++ b/components/signin/core/browser/android/BUILD.gn
@@ -15,7 +15,6 @@ generate_jni("jni_headers") {
@@ -16,7 +16,6 @@ generate_jni("jni_headers") {
android_library("java") {
deps = [
@ -156,10 +156,11 @@ diff --git a/content/public/android/java/src/org/chromium/content/browser/sms/Sm
diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.gn
--- a/third_party/android_deps/BUILD.gn
+++ b/third_party/android_deps/BUILD.gn
@@ -772,50 +772,6 @@ android_aar_prebuilt("com_android_support_viewpager_java") {
@@ -802,50 +802,6 @@ android_aar_prebuilt("com_android_support_viewpager_java") {
]
}
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("google_play_services_auth_java") {
- aar_path = "libs/com_google_android_gms_play_services_auth/play-services-auth-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_auth/com_google_android_gms_play_services_auth.info"
@ -203,10 +204,9 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
- strip_drawables = true
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("google_play_services_base_java") {
aar_path = "libs/com_google_android_gms_play_services_base/play-services-base-15.0.1.aar"
info_path = "libs/com_google_android_gms_play_services_base/com_google_android_gms_play_services_base.info"
diff --git a/third_party/robolectric/BUILD.gn b/third_party/robolectric/BUILD.gn
--- a/third_party/robolectric/BUILD.gn
+++ b/third_party/robolectric/BUILD.gn


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

@ -23,13 +23,13 @@ Subject: Remove dependency on com.google.android.gms.cast
.../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 | 32 ------
21 files changed, 26 insertions(+), 775 deletions(-)
third_party/android_deps/BUILD.gn | 33 ------
21 files changed, 26 insertions(+), 776 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -269,8 +269,6 @@ android_library("chrome_java") {
@@ -260,8 +260,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",
@ -38,7 +38,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"$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",
@@ -692,8 +690,6 @@ junit_binary("chrome_junit_tests") {
@@ -657,8 +655,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",
@ -47,7 +47,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"$google_play_services_package:google_play_services_fido_java",
"//base:base_java",
"//base:base_java_test_support",
@@ -794,8 +790,6 @@ android_library("chrome_test_java") {
@@ -763,8 +759,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",
@ -121,9 +121,9 @@ diff --git a/chrome/android/features/media_router/java/src/org/chromium/chrome/b
diff --git a/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaSink.java b/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaSink.java
--- a/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaSink.java
+++ b/chrome/android/features/media_router/java/src/org/chromium/chrome/browser/media/router/MediaSink.java
@@ -8,41 +8,24 @@ import android.support.annotation.Nullable;
import android.support.v7.media.MediaRouter;
import android.support.v7.media.MediaRouter.RouteInfo;
@@ -9,41 +9,24 @@ import android.support.v7.media.MediaRouter.RouteInfo;
import androidx.annotation.Nullable;
-import com.google.android.gms.cast.CastDevice;
-
@ -165,7 +165,7 @@ diff --git a/chrome/android/features/media_router/java/src/org/chromium/chrome/b
}
/**
@@ -52,17 +35,8 @@ public class MediaSink {