Browse Source

Update to 76.0.3809.87

tags/76.0.3809.87-1
wchen342 2 years ago
parent
commit
55c44fd663
Signed by: wchen342 GPG Key ID: 720B70365E800508
27 changed files with 1026 additions and 547 deletions
  1. +14
    -20
      build.sh
  2. +577
    -127
      domain_sub_2.list
  3. +1
    -1
      misc/android_studio_setup.sh
  4. +1
    -1
      patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch
  5. +2
    -2
      patches/Vanadium/0021-disable-media-router-by-default.patch
  6. +11
    -15
      patches/aapt2-param.patch
  7. +4
    -4
      patches/android-prune-domain-fix.patch
  8. +29
    -0
      patches/debug-disable-fatal-checks.patch
  9. +17
    -0
      patches/series
  10. +0
    -0
      patches/src-fix/android-rlz-fix-missing-variable.patch
  11. +15
    -0
      patches/src-fix/fix-null-mInstanceID.patch
  12. +40
    -0
      patches/src-fix/fix-redefinition-error.patch
  13. +2
    -2
      patches/ungoogled-chromium-android/change_package_name.patch
  14. +0
    -0
      patches/ungoogled-chromium-android/linker-android-support-remove.patch
  15. +0
    -10
      patches/ungoogled-chromium-android/patches.list
  16. +0
    -19
      patches/ungoogled-chromium-android/remove-desugar-runtime.patch
  17. +36
    -47
      patches/ungoogled-chromium-android/remove-gcm-client.patch
  18. +108
    -47
      patches/ungoogled-chromium-android/remove-gms-auth.patch
  19. +40
    -48
      patches/ungoogled-chromium-android/remove-gms-base-tasks.patch
  20. +21
    -39
      patches/ungoogled-chromium-android/remove-gms-cast.patch
  21. +30
    -64
      patches/ungoogled-chromium-android/remove-gms-fido-iid-instantapps-location.patch
  22. +10
    -11
      patches/ungoogled-chromium-android/remove-gms-flags-places-stats.patch
  23. +37
    -41
      patches/ungoogled-chromium-android/remove-gms-gcm.patch
  24. +28
    -46
      patches/ungoogled-chromium-android/remove-gms-vision-clearcut-phenotype.patch
  25. +2
    -2
      patches/ungoogled-chromium-android/remove-play-core.patch
  26. +0
    -1
      patches/ungoogled-chromium-android/uncheck-fre-send-report.patch
  27. +1
    -0
      pruning_2.list

+ 14
- 20
build.sh View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -eux -o pipefail
chromium_version=75.0.3770.142
chromium_version=76.0.3809.87
target=monochrome_public_apk
# Required tools: python2, python3, ninja, git, clang, lld, llvm, curl
@ -89,16 +89,7 @@ python3 ungoogled-chromium/utils/patches.py apply src ungoogled-chromium/patches
python3 ungoogled-chromium/utils/domain_substitution.py apply -r ungoogled-chromium/domain_regex.list -f ungoogled-chromium/domain_substitution.list -c ${cache_file} src
## Extra fixes for Chromium source
# Fix an error in chrome/browser/android/rlz/rlz_ping_handler.cc: line 79, -rlz_lib::kFinancialServer +"about:blank"
patch -p1 --ignore-whitespace -i patches/android-rlz-fix-missing-variable.patch --no-backup-if-mismatch
# Change package/App name
# patch src/chrome/android/BUILD.gn, src/chrome/android/java/res_chromium/values/channel_constants.xml
patch -p1 --ignore-whitespace -i patches/change_package_name.patch --no-backup-if-mismatch
# Workaround for a building failure caused by safe browsing. The file is pre-generated with safe_browsing_mode=2. See https://github.com/nikolowry/bromite-builder/issues/1
# x86
mkdir -p src/out/Default/gen/chrome/common/safe_browsing
cp download_file_types.pb.h src/out/Default/gen/chrome/common/safe_browsing
# arm/arm64
cp download_file_types.pb.h src/chrome/common/safe_browsing/download_file_types.pb.h
@ -120,11 +111,11 @@ mv android-ndk/android-ndk-r18b/sysroot/usr/include/android/data_space.h android
patch -p1 --ignore-whitespace -i patches/ndk-native-window.patch --no-backup-if-mismatch
# 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
# rm -rf src/third_party/android_sdk # The folder is not used
pushd src/third_party/android_build_tools
rm -rf aapt2
ln -s ../../../android-sdk/android-sdk_user.9.0.0_r21_linux-x86/build-tools/android-9 aapt2
popd
# Old aapt no longer works. Need to use Maven version until a rebuild of SDK 29 exists.
#pushd src/third_party/android_build_tools
#rm -rf aapt2
#ln -s ../../../android-sdk/android-sdk_user.9.0.0_r21_linux-x86/build-tools/android-9 aapt2
#popd
DIRECTORY="src/third_party/android_sdk/public"
if [[ -d "$DIRECTORY" ]]; then
rm -rf "$DIRECTORY"
@ -169,8 +160,14 @@ popd
# Additional Source Patches
# TODO use patches.py instead
patch -p1 --ignore-whitespace -i patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch --no-backup-if-mismatch
patch -p1 --ignore-whitespace -i patches/Vanadium/0021-disable-media-router-by-default.patch --no-backup-if-mismatch
## Extra fixes for Chromium source
#patch -p1 --ignore-whitespace -i patches/android-rlz-fix-missing-variable.patch --no-backup-if-mismatch # Fix an error in chrome/browser/android/rlz/rlz_ping_handler.cc
#patch -p1 --ignore-whitespace -i patches/fix-redefinition-error.patch --no-backup-if-mismatch # Fix a redefinition error
#patch -p1 --ignore-whitespace -i patches/change_package_name.patch --no-backup-if-mismatch # Change package/App name
#patch -p1 --ignore-whitespace -i patches/Vanadium/0020-disable-media-router-media-remoting-by-default.patch --no-backup-if-mismatch
#patch -p1 --ignore-whitespace -i patches/Vanadium/0021-disable-media-router-by-default.patch --no-backup-if-mismatch
#patch -p1 --ignore-whitespace -i patches/linker-android-support-remove.patch --no-backup-if-mismatch
#patch -p1 --ignore-whitespace -i patches/aapt2-param.patch --no-backup-if-mismatch
## Second pruning list
pruning_list_2="pruning_2.list"
python3 ungoogled-chromium/utils/prune_binaries.py src ${pruning_list_2} || true
@ -192,9 +189,6 @@ popd
## Configure output folder
# patch build/config/android/BUILD.gn, build/android/gyp/compile_resources.py
patch -p1 --ignore-whitespace -i patches/linker-android-support-remove.patch --no-backup-if-mismatch
patch -p1 --ignore-whitespace -i patches/aapt2-param.patch --no-backup-if-mismatch
cd src
mkdir -p out/Default
cat ../ungoogled-chromium/flags.gn ../android_flags.gn > out/Default/args.gn


+ 577
- 127
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=75.0.3770.142
chromium_version=76.0.3809.87
target=monochrome_public_apk
# Create symbol links to gn, depot-tools


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

@ -11,7 +11,7 @@ diff --git a/src/chrome/browser/profiles/profile.cc b/src/chrome/browser/profile
index e56624c60f42..dc2479bc4ad0 100644
--- a/src/chrome/browser/profiles/profile.cc
+++ b/src/chrome/browser/profiles/profile.cc
@@ -218,7 +218,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
@@ -210,7 +210,7 @@ void Profile::RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) {
prefs::kMediaRouterFirstRunFlowAcknowledged,
false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);


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

@ -12,7 +12,7 @@ diff --git a/src/chrome/browser/media/router/media_router_feature.cc b/src/chrom
index 9c42d30ecd22..e773dd54ad9e 100644
--- a/src/chrome/browser/media/router/media_router_feature.cc
+++ b/src/chrome/browser/media/router/media_router_feature.cc
@@ -56,17 +56,16 @@ const PrefService::Preference* GetMediaRouterPref(
@@ -58,17 +58,16 @@ const PrefService::Preference* GetMediaRouterPref(
bool MediaRouterEnabled(content::BrowserContext* context) {
#if defined(OS_ANDROID) || BUILDFLAG(ENABLE_EXTENSIONS)
@ -42,7 +42,7 @@ diff --git a/src/chrome/browser/profiles/profile_impl.cc b/src/chrome/browser/pr
index 86ffb0c6cfc3..e32f0e7b83fe 100644
--- a/src/chrome/browser/profiles/profile_impl.cc
+++ b/src/chrome/browser/profiles/profile_impl.cc
@@ -443,7 +443,7 @@ void ProfileImpl::RegisterProfilePrefs(
@@ -435,7 +435,7 @@ void ProfileImpl::RegisterProfilePrefs(
registry->RegisterStringPref(
prefs::kPrintPreviewDefaultDestinationSelectionRules, std::string());
registry->RegisterBooleanPref(prefs::kForceEphemeralProfiles, false);


+ 11
- 15
patches/aapt2-param.patch View File

@ -3,18 +3,14 @@ author: Wengling Chen <[email protected]>
--- a/src/build/android/gyp/compile_resources.py
+++ b/src/build/android/gyp/compile_resources.py
@@ -831,11 +831,11 @@
optimize_command = [
options.aapt2_path,
'optimize',
- '--enable-resource-obfuscation',
+ #'--enable-resource-obfuscation',
'-o',
output,
- '--resources-config-path',
- gen_config_path,
+ #'--resources-config-path',
+ #gen_config_path,
unoptimized_apk_path,
]
build_utils.CheckOutput(
@@ -788,8 +788,8 @@
optimize_command += [
'--enable-resource-obfuscation',
- '--resources-config-path',
- gen_config_path,
+ #'--resources-config-path',
+ #gen_config_path,
]
if options.short_resource_paths:

+ 4
- 4
patches/android-prune-domain-fix.patch View File

@ -20,15 +20,15 @@ author: Wengling Chen <[email protected]>
--- a/ungoogled-chromium/pruning.list
+++ b/ungoogled-chromium/pruning.list
@@ -12,7 +12,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
@@ -3509,7 +3508,6 @@
@@ -3553,7 +3552,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
@ -36,7 +36,7 @@ author: Wengling Chen <[email protected]>
third_party/blink/manual_tests/WebKitSite.webarchive
third_party/blink/manual_tests/accessibility/resources/AppletTest.class
third_party/blink/manual_tests/plugins/test.swf
@@ -13238,11 +13236,8 @@
@@ -13288,11 +13286,8 @@ 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


+ 29
- 0
patches/debug-disable-fatal-checks.patch View File

@ -0,0 +1,29 @@
---
components/search_engines/search_terms_data.cc | 2 +-
services/network/network_context.cc | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/components/search_engines/search_terms_data.cc b/components/search_engines/search_terms_data.cc
--- a/components/search_engines/search_terms_data.cc
+++ b/components/search_engines/search_terms_data.cc
@@ -21,7 +21,7 @@ std::string SearchTermsData::GoogleBaseURLValue() const {
std::string SearchTermsData::GoogleBaseSuggestURLValue() const {
// Start with the Google base URL.
const GURL base_url(GoogleBaseURLValue());
- DCHECK(base_url.is_valid());
+ //DCHECK(base_url.is_valid());
GURL::Replacements repl;
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -961,7 +961,7 @@ void NetworkContext::QueueReport(const std::string& type,
const GURL& url,
const base::Optional<std::string>& user_agent,
base::Value body) {
- NOTREACHED();
+ //NOTREACHED();
}
void NetworkContext::QueueSignedExchangeReport(

+ 17
- 0
patches/series View File

@ -0,0 +1,17 @@
src/android-rlz-fix-missing-variable.patch
src/fix-redefinition-error.patch
src/fix-null-mInstanceID.patch
ungoogled-chromium-android/change_package_name.patch
Vanadium/0020-disable-media-router-media-remoting-by-default.patch
Vanadium/0021-disable-media-router-by-default.patch
ungoogled-chromium-android/linker-android-support-remove.patch
ungoogled-chromium-android/remove-gcm-client.patch
ungoogled-chromium-android/remove-gms-gcm.patch
ungoogled-chromium-android/remove-gms-auth.patch
ungoogled-chromium-android/remove-gms-cast.patch
ungoogled-chromium-android/remove-gms-fido-iid-instantapps-location.patch
ungoogled-chromium-android/remove-gms-vision-clearcut-phenotype.patch
ungoogled-chromium-android/remove-gms-flags-places-stats.patch
ungoogled-chromium-android/remove-gms-base-tasks.patch
ungoogled-chromium-android/remove-play-core.patch
ungoogled-chromium-android/uncheck-fre-send-report.patch

patches/android-rlz-fix-missing-variable.patch → patches/src-fix/android-rlz-fix-missing-variable.patch View File


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

@ -0,0 +1,15 @@
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
@@ -116,7 +116,10 @@ public class InstanceIDBridge {
LazySubscriptionsManager.buildSubscriptionUniqueId(
mSubtype, authorizedEntity),
isLazy);
- return mInstanceID.getToken(authorizedEntity, scope, extras);
+ if (mInstanceID != null)
+ return mInstanceID.getToken(authorizedEntity, scope, extras);
+ else
+ return "";
} catch (IOException ex) {
return "";
}

+ 40
- 0
patches/src-fix/fix-redefinition-error.patch View File

@ -0,0 +1,40 @@
Fix a redefinition error in unnamed namespace.
author: Wengling Chen <[email protected]>
diff --git a/chrome/browser/android/favicon_helper.cc b/chrome/browser/android/favicon_helper.cc
--- a/src/chrome/browser/android/favicon_helper.cc
+++ b/src/chrome/browser/android/favicon_helper.cc
@@ -80,17 +80,13 @@ void OnEnsureIconIsAvailableFinished(
env, j_availability_callback, newly_available);
}
-sync_sessions::OpenTabsUIDelegate* GetOpenTabsUIDelegate(Profile* profile) {
- sync_sessions::SessionSyncService* session_sync_service =
- SessionSyncServiceFactory::GetInstance()->GetForProfile(profile);
- DCHECK(session_sync_service);
- return session_sync_service->GetOpenTabsUIDelegate();
-}
-
scoped_refptr<base::RefCountedMemory> GetSyncedFaviconForPageURL(
Profile* profile,
const GURL& page_url) {
- sync_sessions::OpenTabsUIDelegate* open_tabs = GetOpenTabsUIDelegate(profile);
+ sync_sessions::SessionSyncService* session_sync_service =
+ SessionSyncServiceFactory::GetInstance()->GetForProfile(profile);
+ DCHECK(session_sync_service);
+ sync_sessions::OpenTabsUIDelegate* open_tabs = session_sync_service->GetOpenTabsUIDelegate();
return open_tabs ? open_tabs->GetSyncedFaviconForPageURL(page_url.spec())
: nullptr;
}
@@ -173,7 +169,10 @@ jboolean FaviconHelper::GetForeignFaviconImageForURL(
GURL page_url(ConvertJavaStringToUTF8(env, j_page_url));
- sync_sessions::OpenTabsUIDelegate* open_tabs = GetOpenTabsUIDelegate(profile);
+ sync_sessions::SessionSyncService* session_sync_service =
+ SessionSyncServiceFactory::GetInstance()->GetForProfile(profile);
+ DCHECK(session_sync_service);
+ sync_sessions::OpenTabsUIDelegate* open_tabs = session_sync_service->GetOpenTabsUIDelegate();
// TODO(victorvianna): Consider passing icon types to the API.
favicon_request_handler_.GetRawFaviconForPageURL(
page_url, static_cast<int>(j_desired_size_in_pixel),

patches/change_package_name.patch → patches/ungoogled-chromium-android/change_package_name.patch View File

@ -3,8 +3,8 @@ author: Wengling Chen <[email protected]>
--- a/src/chrome/android/BUILD.gn
+++ b/src/chrome/android/BUILD.gn
@@ -38,8 +38,8 @@
import("//chrome/android/features/vr/vr_module_tmpl.gni")
@@ -42,8 +42,8 @@
import("//chrome/android/features/devtools/devtools_module_tmpl.gni")
}
-manifest_package = "org.chromium.chrome"

patches/linker-android-support-remove.patch → patches/ungoogled-chromium-android/linker-android-support-remove.patch View File


+ 0
- 10
patches/ungoogled-chromium-android/patches.list View File

@ -1,10 +0,0 @@
remove-gcm-client.patch
remove-gms-gcm.patch
remove-gms-auth.patch
remove-gms-cast.patch
remove-gms-fido-iid-instantapps-location.patch
remove-gms-vision-clearcut-phenotype.patch
remove-gms-flags-places-stats.patch
remove-gms-base-tasks.patch
remove-play-core.patch
uncheck-fre-send-report.patch

+ 0
- 19
patches/ungoogled-chromium-android/remove-desugar-runtime.patch View File

@ -1,19 +0,0 @@
Remove dependencies on desugar-runtime.jar. Don't work yet.
author: Wengling Chen <[email protected]>
---
third_party/bazel/desugar/BUILD.gn | 5 -----
1 file changed, 5 deletions(-)
diff --git a/third_party/bazel/desugar/BUILD.gn b/third_party/bazel/desugar/BUILD.gn
--- a/third_party/bazel/desugar/BUILD.gn
+++ b/third_party/bazel/desugar/BUILD.gn
@@ -5,8 +5,3 @@
import("//build/config/android/rules.gni")
# Provides runtime support for desugar transformations.
-java_prebuilt("desugar_runtime_java") {
- supports_android = true
- jar_path = "Desugar-runtime.jar"
- no_build_hooks = true
-}

+ 36
- 47
patches/ungoogled-chromium-android/remove-gcm-client.patch View File

@ -8,16 +8,16 @@ author: Wengling Chen <[email protected]>
components/sync/android/BUILD.gn | 1 -
third_party/android_sdk/BUILD.gn | 3 -
third_party/cacheinvalidation/BUILD.gn | 1 -
.../external/client/android2/AndroidManifest.xml | 35 --------
.../client/contrib/MultiplexingGcmListener.java | 93 +---------------------
.../channel/AndroidMessageReceiverService.java | 17 ----
.../external/client/android2/AndroidManifest.xml | 35 ----------
.../client/contrib/MultiplexingGcmListener.java | 79 +---------------------
.../channel/AndroidMessageReceiverService.java | 17 -----
.../channel/AndroidMessageSenderService.java | 3 +-
10 files changed, 5 insertions(+), 160 deletions(-)
10 files changed, 5 insertions(+), 146 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -343,7 +343,6 @@ android_library("chrome_java") {
@@ -361,7 +361,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",
@ -84,15 +84,15 @@ diff --git a/third_party/android_sdk/BUILD.gn b/third_party/android_sdk/BUILD.gn
- android_java_prebuilt("android_gcm_java") {
- jar_path = "//third_party/android_sdk/public/extras/google/gcm/gcm-client/dist/gcm.jar"
- }
android_java_prebuilt("emma_device_java") {
java_prebuilt("emma_device_java") {
jar_path = "//third_party/android_sdk/public/tools/lib/emma_device.jar"
include_java_resources = true
diff --git a/third_party/cacheinvalidation/BUILD.gn b/third_party/cacheinvalidation/BUILD.gn
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -141,7 +141,6 @@ if (is_android) {
"$google_play_services_package:google_play_services_iid_java",
@@ -142,7 +142,6 @@ if (is_android) {
"$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
- "//third_party/android_sdk:android_gcm_java",
]
@ -194,12 +194,10 @@ diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/
/**
* Convenience base class for client implementations. It provides base classes for a broadcast
* receiver and an intent service that work together to handle events from the
@@ -260,85 +245,11 @@ public class MultiplexingGcmListener extends GCMBaseIntentService {
/** Logger. */
private static final Logger logger = AndroidLogger.forTag("MplexGcmListener");
@@ -262,59 +247,6 @@ public class MultiplexingGcmListener extends GCMBaseIntentService {
// All onYYY methods work by constructing an appropriate Intent and broadcasting it.
- // All onYYY methods work by constructing an appropriate Intent and broadcasting it.
-
- @Override
- protected void onMessage(Context context, Intent intent) {
- Intent newIntent = new Intent();
@ -253,34 +251,25 @@ diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/
- sendBroadcast(intent);
- }
-
- /**
- * Registers with GCM if not already registered. Also verifies that the device supports GCM
- * and that the manifest is correctly configured. Returns the existing registration id, if one
- * exists, or the empty string if one does not.
- *
- * @throws UnsupportedOperationException if the device does not have all GCM dependencies
- * @throws IllegalStateException if the manifest is not correctly configured
- */
- public static String initializeGcm(Context context) {
- AndroidChannelPreferences.setGcmChannelType(context, GcmChannelType.DEFAULT);
- GCMRegistrar.checkDevice(context);
- GCMRegistrar.checkManifest(context);
- final String regId = GCMRegistrar.getRegistrationId(context);
- if (regId.isEmpty()) {
- GCMRegistrar.register(context, readSenderIdsFromManifestOrDie(context));
- }
- return regId;
- }
-
/**
* Returns the GCM sender ids from {@link #GCM_SENDER_IDS_METADATA_KEY} or throws a
* {@code RuntimeException} if they are not defined.
* Registers with GCM if not already registered. Also verifies that the device supports GCM
* and that the manifest is correctly configured. Returns the existing registration id, if one
@@ -324,14 +256,7 @@ public class MultiplexingGcmListener extends GCMBaseIntentService {
* @throws IllegalStateException if the manifest is not correctly configured
*/
-
+
static String[] readSenderIdsFromManifestOrDie(Context context) {
try {
ServiceInfo serviceInfo = context.getPackageManager().getServiceInfo(
public static String initializeGcm(Context context) {
- AndroidChannelPreferences.setGcmChannelType(GcmChannelType.DEFAULT);
- GCMRegistrar.checkDevice(context);
- GCMRegistrar.checkManifest(context);
- final String regId = GCMRegistrar.getRegistrationId(context);
- if (regId.isEmpty()) {
- GCMRegistrar.register(context, readSenderIdsFromManifestOrDie(context));
- }
- return regId;
+ return "";
}
/**
diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageReceiverService.java b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageReceiverService.java
--- a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageReceiverService.java
+++ b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android2/channel/AndroidMessageReceiverService.java
@ -324,12 +313,12 @@ diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/
import com.google.ipc.invalidation.common.GcmSharedConstants;
import com.google.ipc.invalidation.external.client.SystemResources.Logger;
import com.google.ipc.invalidation.external.client.android.service.AndroidLogger;
@@ -396,7 +395,7 @@ public class AndroidMessageSenderService extends IntentService {
// No client key when using old style registration id.
clientKey = "";
try {
- registrationId = GCMRegistrar.getRegistrationId(context);
@@ -395,7 +394,7 @@ public class AndroidMessageSenderService extends IntentService {
// No client key when using old style registration id.
clientKey = "";
try {
- registrationId = GCMRegistrar.getRegistrationId(context);
+ registrationId = null;
} catch (RuntimeException exception) {
// GCMRegistrar#getRegistrationId occasionally throws a runtime exception. Catching the
// exception rather than crashing.
} catch (RuntimeException exception) {
// GCMRegistrar#getRegistrationId occasionally throws a runtime exception. Catching the
// exception rather than crashing.

+ 108
- 47
patches/ungoogled-chromium-android/remove-gms-auth.patch View File

@ -3,21 +3,23 @@ author: Wengling Chen <[email protected]>
---
chrome/android/BUILD.gn | 1 -
.../chrome/browser/signin/SigninHelper.java | 21 --------
.../chrome/browser/signin/SigninHelper.java | 21 ---------
components/background_task_scheduler/BUILD.gn | 1 -
components/signin/core/browser/android/BUILD.gn | 1 -
.../components/signin/AccountIdProvider.java | 19 +------
.../signin/SystemAccountManagerDelegate.java | 52 ++-----------------
third_party/android_deps/BUILD.gn | 60 ----------------------
.../components/signin/AccountIdProvider.java | 19 +-------
.../signin/SystemAccountManagerDelegate.java | 52 ++--------------------
content/public/android/BUILD.gn | 1 -
.../org/chromium/content/browser/SmsReceiver.java | 37 +--------------
third_party/android_deps/BUILD.gn | 44 ------------------
third_party/robolectric/BUILD.gn | 1 -
8 files changed, 5 insertions(+), 151 deletions(-)
10 files changed, 6 insertions(+), 172 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -249,7 +249,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
@@ -263,7 +263,6 @@ android_library("chrome_java") {
":thumbnail_cache_entry_proto_java",
":update_proto_java",
":usage_stats_proto_java",
- "$google_play_services_package:google_play_services_auth_base_java",
"$google_play_services_package:google_play_services_base_java",
@ -220,45 +222,105 @@ diff --git a/components/signin/core/browser/android/java/src/org/chromium/compon
}
// No permission is needed on 23+ and Chrome always has MANAGE_ACCOUNTS permission on lower APIs
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
@@ -52,7 +52,6 @@ action("generate_sandboxed_service_srcjar") {
android_library("content_java") {
deps = [
":content_java_resources",
- "$google_play_services_package:google_play_services_auth_api_phone_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",
diff --git a/content/public/android/java/src/org/chromium/content/browser/SmsReceiver.java b/content/public/android/java/src/org/chromium/content/browser/SmsReceiver.java
--- a/content/public/android/java/src/org/chromium/content/browser/SmsReceiver.java
+++ b/content/public/android/java/src/org/chromium/content/browser/SmsReceiver.java
@@ -9,12 +9,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
-import com.google.android.gms.auth.api.phone.SmsRetriever;
-import com.google.android.gms.auth.api.phone.SmsRetrieverClient;
-import com.google.android.gms.common.api.CommonStatusCodes;
-import com.google.android.gms.common.api.Status;
-import com.google.android.gms.tasks.Task;
-
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.base.annotations.CalledByNative;
@@ -45,9 +39,6 @@ public class SmsReceiver extends BroadcastReceiver {
// If this broadcast receiver becomes more heavyweight, we should make
// this registration expire after the SMS message is received.
if (DEBUG) Log.d(TAG, "Registering intent filters.");
- IntentFilter filter = new IntentFilter();
- filter.addAction(SmsRetriever.SMS_RETRIEVED_ACTION);
- context.registerReceiver(this, filter);
}
@CalledByNative
@@ -72,43 +63,17 @@ public class SmsReceiver extends BroadcastReceiver {
return;
}
- if (!SmsRetriever.SMS_RETRIEVED_ACTION.equals(intent.getAction())) {
- return;
- }
-
if (intent.getExtras() == null) {
return;
}
- final Status status;
-
- try {
- status = (Status) intent.getParcelableExtra(SmsRetriever.EXTRA_STATUS);
- } catch (Throwable e) {
- if (DEBUG) Log.d(TAG, "Error getting parceable");
- return;
- }
-
- switch (status.getStatusCode()) {
- case CommonStatusCodes.SUCCESS:
- String message = intent.getExtras().getString(SmsRetriever.EXTRA_SMS_MESSAGE);
- if (DEBUG) Log.d(TAG, "Got message: %s!", message);
- nativeOnReceive(mSmsProviderAndroid, message);
- break;
- case CommonStatusCodes.TIMEOUT:
- if (DEBUG) Log.d(TAG, "Timeout");
- nativeOnTimeout(mSmsProviderAndroid);
- break;
- }
+ if (DEBUG) Log.d(TAG, "Error getting parceable");
}
@CalledByNative
private void listen() {
final Context context = ContextUtils.getApplicationContext();
- SmsRetrieverClient client = SmsRetriever.getClient(context);
- Task<Void> task = client.startSmsRetriever();
-
if (DEBUG) Log.d(TAG, "Installed task");
}
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
@@ -40,21 +40,6 @@ java_group("google_play_services_base_java") {
":com_google_android_gms_play_services_base_java",
]
}
-java_group("google_play_services_auth_base_java") {
- deps = [
- ":com_google_android_gms_play_services_auth_base_java",
- ]
-}
-java_group("google_play_services_auth_api_phone_java") {
- deps = [
- ":com_google_android_gms_play_services_auth_api_phone_java",
- ]
-}
-java_group("google_play_services_auth_java") {
- deps = [
- ":com_google_android_gms_play_services_auth_java",
- ]
-}
java_group("google_play_services_cast_java") {
deps = [
":com_google_android_gms_play_services_cast_java",
@@ -373,51 +358,6 @@ android_aar_prebuilt("com_android_support_support_v4_java") {
@@ -301,50 +301,6 @@ android_aar_prebuilt("com_android_support_support_v4_java") {
]
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_auth_java") {
-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"
- deps = [
- ":com_google_android_gms_play_services_auth_api_phone_java",
- ":com_google_android_gms_play_services_auth_base_java",
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_auth_api_phone_java",
- ":google_play_services_auth_base_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -266,14 +328,13 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt(
- "com_google_android_gms_play_services_auth_api_phone_java") {
-android_aar_prebuilt("google_play_services_auth_api_phone_java") {
- aar_path = "libs/com_google_android_gms_play_services_auth_api_phone/play-services-auth-api-phone-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_auth_api_phone/com_google_android_gms_play_services_auth_api_phone.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -281,13 +342,13 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_auth_base_java") {
-android_aar_prebuilt("google_play_services_auth_base_java") {
- aar_path = "libs/com_google_android_gms_play_services_auth_base/play-services-auth-base-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_auth_base/com_google_android_gms_play_services_auth_base.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -295,12 +356,12 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("com_google_android_gms_play_services_base_java") {
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"
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
@@ -944,7 +944,6 @@ java_library("shadows_play_services_java") {
@@ -938,7 +938,6 @@ java_library("shadows_play_services_java") {
":robolectric_shadowapi_java",
":robolectric_utils_java",
":shadows_core_java",


+ 40
- 48
patches/ungoogled-chromium-android/remove-gms-base-tasks.patch View File

@ -19,31 +19,32 @@ author: Wengling Chen <[email protected]>
components/background_task_scheduler/BUILD.gn | 9 ---
components/signin/core/browser/android/BUILD.gn | 2 -
.../signin/GmsAvailabilityException.java | 4 +-
content/public/android/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 -
.../shape_detection/FaceDetectionProviderImpl.java | 8 +--
third_party/android_deps/BUILD.gn | 53 --------------
third_party/android_deps/BUILD.gn | 38 ----------
third_party/cacheinvalidation/BUILD.gn | 1 -
third_party/robolectric/BUILD.gn | 2 -
26 files changed, 18 insertions(+), 280 deletions(-)
27 files changed, 18 insertions(+), 268 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -249,9 +249,6 @@ android_library("chrome_java") {
":partner_location_descriptor_proto_java",
@@ -263,9 +263,6 @@ android_library("chrome_java") {
":thumbnail_cache_entry_proto_java",
":update_proto_java",
":usage_stats_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:jni_java",
"//chrome/android/third_party/compositor_animator:compositor_animator_java",
@@ -611,8 +608,6 @@ junit_binary("chrome_junit_tests") {
"//chrome/android/features/keyboard_accessory:public_java",
@@ -632,8 +629,6 @@ junit_binary("chrome_junit_tests") {
":chrome_java",
":chrome_junit_test_support",
":partner_location_descriptor_proto_java",
@ -52,7 +53,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -706,9 +701,6 @@ android_library("chrome_test_java") {
@@ -728,9 +723,6 @@ android_library("chrome_test_java") {
":browser_java_test_support",
":chrome_test_util_java",
":partner_location_descriptor_proto_java",
@ -61,7 +62,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android:app_hooks_java",
"//base/test:test_support_java",
diff --git a/chrome/android/features/media_router/BUILD.gn b/chrome/android/features/media_router/BUILD.gn
--- a/chrome/android/features/media_router/BUILD.gn
+++ b/chrome/android/features/media_router/BUILD.gn
@ -101,7 +102,7 @@ diff --git a/chrome/android/features/media_router/java/src/org/chromium/chrome/b
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
@@ -886,15 +886,6 @@ by a child template that "extends" this file.
@@ -865,15 +865,6 @@ by a child template that "extends" this file.
</intent-filter>
</activity>
@ -510,7 +511,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/gcore/GoogleApi
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateStatusProvider.java
@@ -16,8 +16,6 @@ import android.support.annotation.NonNull;
@@ -19,8 +19,6 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.text.TextUtils;
@ -519,7 +520,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omaha/UpdateSta
import org.chromium.base.ActivityState;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.ApplicationStatus.ActivityStateListener;
@@ -428,13 +426,7 @@ public class UpdateStatusProvider implements ActivityStateListener {
@@ -463,13 +461,7 @@ public class UpdateStatusProvider implements ActivityStateListener {
}
private boolean isGooglePlayStoreAvailable(Context context) {
@ -559,7 +560,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/Pre
diff --git a/chrome/test/android/BUILD.gn b/chrome/test/android/BUILD.gn
--- a/chrome/test/android/BUILD.gn
+++ b/chrome/test/android/BUILD.gn
@@ -67,8 +67,6 @@ android_library("chrome_java_test_support") {
@@ -102,8 +102,6 @@ android_library("chrome_java_test_support") {
"javatests/src/org/chromium/chrome/test/util/TranslateUtil.java",
]
deps = [
@ -633,10 +634,23 @@ diff --git a/components/signin/core/browser/android/java/src/org/chromium/compon
+ return false;
}
}
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
@@ -52,9 +52,6 @@ action("generate_sandboxed_service_srcjar") {
android_library("content_java") {
deps = [
":content_java_resources",
- "$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",
"//components/download/public/common:public_java",
"//device/bluetooth:java",
diff --git a/device/BUILD.gn b/device/BUILD.gn
--- a/device/BUILD.gn
+++ b/device/BUILD.gn
@@ -430,8 +430,6 @@ if (is_android) {
@@ -381,8 +381,6 @@ if (is_android) {
junit_binary("device_junit_tests") {
java_files = [ "gamepad/android/junit/src/org/chromium/device/gamepad/GamepadMappingsTest.java" ]
deps = [
@ -648,7 +662,7 @@ diff --git a/device/BUILD.gn b/device/BUILD.gn
diff --git a/remoting/android/client_java_tmpl.gni b/remoting/android/client_java_tmpl.gni
--- a/remoting/android/client_java_tmpl.gni
+++ b/remoting/android/client_java_tmpl.gni
@@ -95,9 +95,6 @@ template("remoting_android_client_java_tmpl") {
@@ -100,9 +100,6 @@ template("remoting_android_client_java_tmpl") {
if (defined(invoker.play_services_package)) {
deps += [
@ -661,7 +675,7 @@ diff --git a/remoting/android/client_java_tmpl.gni b/remoting/android/client_jav
diff --git a/services/BUILD.gn b/services/BUILD.gn
--- a/services/BUILD.gn
+++ b/services/BUILD.gn
@@ -100,8 +100,6 @@ if (is_android) {
@@ -97,8 +97,6 @@ if (is_android) {
"shape_detection/android/junit/src/org/chromium/shape_detection/BitmapUtilsTest.java",
]
deps = [
@ -670,7 +684,7 @@ diff --git a/services/BUILD.gn b/services/BUILD.gn
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -129,8 +127,6 @@ if (is_android) {
@@ -126,8 +124,6 @@ if (is_android) {
"shape_detection/android/javatests/src/org/chromium/shape_detection/TextDetectionImplTest.java",
]
deps = [
@ -731,39 +745,17 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect
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
@@ -25,21 +25,6 @@ java_group("android_support_v7_appcompat_java") {
}
# Aliases
-java_group("google_play_services_basement_java") {
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ]
-}
-java_group("google_play_services_tasks_java") {
- deps = [
- ":com_google_android_gms_play_services_tasks_java",
- ]
-}
-java_group("google_play_services_base_java") {
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ]
-}
# The dependencies below are used by chromecast internal.
java_group("android_support_v7_preference_java") {
@@ -318,44 +303,6 @@ android_aar_prebuilt("com_android_support_support_v4_java") {
@@ -301,44 +301,6 @@ android_aar_prebuilt("com_android_support_support_v4_java") {
]
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_base_java") {
-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"
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_basement_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -771,7 +763,7 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_basement_java") {
-android_aar_prebuilt("google_play_services_basement_java") {
- aar_path = "libs/com_google_android_gms_play_services_basement/play-services-basement-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_basement/com_google_android_gms_play_services_basement.info"
- deps = [
@ -784,11 +776,11 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_tasks_java") {
-android_aar_prebuilt("google_play_services_tasks_java") {
- aar_path = "libs/com_google_android_gms_play_services_tasks/play-services-tasks-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_tasks/com_google_android_gms_play_services_tasks.info"
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ":google_play_services_basement_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -802,17 +794,17 @@ diff --git a/third_party/cacheinvalidation/BUILD.gn b/third_party/cacheinvalidat
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -137,7 +137,6 @@ if (is_android) {
emma_never_instrument = true
jacoco_never_instrument = true
deps = [
":cacheinvalidation_proto_java",
- "$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
]
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
@@ -944,8 +944,6 @@ java_library("shadows_play_services_java") {
@@ -938,8 +938,6 @@ java_library("shadows_play_services_java") {
":robolectric_shadowapi_java",
":robolectric_utils_java",
":shadows_core_java",


+ 21
- 39
patches/ungoogled-chromium-android/remove-gms-cast.patch View File

@ -4,11 +4,11 @@ author: Wengling Chen <[email protected]>
---
chrome/android/BUILD.gn | 6 --
chrome/android/features/media_router/BUILD.gn | 2 -
.../browser/media/router/CastSessionUtil.java | 35 ------
.../browser/media/router/CastSessionUtil.java | 35 -------
.../chrome/browser/media/router/MediaSink.java | 44 +-------
.../browser/media/router/MediaStatusBridge.java | 40 ++-----
.../router/caf/BaseNotificationController.java | 46 --------
.../media/router/caf/BaseSessionController.java | 117 +--------------------
.../router/caf/BaseNotificationController.java | 46 ---------
.../media/router/caf/BaseSessionController.java | 115 +--------------------
.../router/caf/CafBaseMediaRouteProvider.java | 103 +-----------------
.../media/router/caf/CafMediaRouteProvider.java | 16 ---
.../media/router/caf/CafMessageHandler.java | 97 +----------------
@ -22,13 +22,13 @@ author: Wengling Chen <[email protected]>
.../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 | 43 --------
21 files changed, 27 insertions(+), 787 deletions(-)
third_party/android_deps/BUILD.gn | 32 ------
21 files changed, 26 insertions(+), 775 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -251,8 +251,6 @@ android_library("chrome_java") {
@@ -265,8 +265,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 @@ 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",
@@ -617,8 +615,6 @@ junit_binary("chrome_junit_tests") {
@@ -638,8 +636,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 @@ 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",
@@ -715,8 +711,6 @@ android_library("chrome_test_java") {
@@ -737,8 +733,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",
@ -1428,7 +1428,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<!-- Note: All activities directly or indirectly derived from ChromeActivity
must specify android:hardwareAccelerated="false".
@@ -848,16 +842,6 @@ by a child template that "extends" this file.
@@ -827,16 +821,6 @@ by a child template that "extends" this file.
</intent-filter>
</activity>
@ -1445,7 +1445,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<!-- 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"
@@ -1256,18 +1240,6 @@ android:value="true" />
@@ -1229,18 +1213,6 @@ android:value="true" />
android:value="org.chromium.content_public.browser.SmartClipProvider"/>
{% block extra_application_definitions %}
@ -1478,37 +1478,20 @@ diff --git a/chrome/test/android/cast_emulator/BUILD.gn b/chrome/test/android/ca
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
@@ -40,16 +40,6 @@ java_group("google_play_services_base_java") {
":com_google_android_gms_play_services_base_java",
]
}
-java_group("google_play_services_cast_java") {
- deps = [
- ":com_google_android_gms_play_services_cast_java",
- ]
-}
-java_group("google_play_services_cast_framework_java") {
- deps = [
- ":com_google_android_gms_play_services_cast_framework_java",
- ]
-}
java_group("google_play_services_iid_java") {
deps = [
":com_google_android_gms_play_services_iid_java",
@@ -384,39 +374,6 @@ android_aar_prebuilt("com_google_android_gms_play_services_basement_java") {
@@ -327,38 +327,6 @@ android_aar_prebuilt("google_play_services_basement_java") {
input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ]
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_cast_java") {
-android_aar_prebuilt("google_play_services_cast_java") {
- aar_path = "libs/com_google_android_gms_play_services_cast/play-services-cast-16.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_cast/com_google_android_gms_play_services_cast.info"
- deps = [
- ":com_android_support_mediarouter_v7_java",
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_flags_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_flags_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -1516,16 +1499,15 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt(
- "com_google_android_gms_play_services_cast_framework_java") {
-android_aar_prebuilt("google_play_services_cast_framework_java") {
- aar_path = "libs/com_google_android_gms_play_services_cast_framework/play-services-cast-framework-16.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_cast_framework/com_google_android_gms_play_services_cast_framework.info"
- deps = [
- ":com_android_support_mediarouter_v7_java",
- ":com_android_support_recyclerview_v7_java",
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_cast_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_cast_java",
- ]
-
- # Removing all resources from cast framework as they are unused bloat.
@ -1533,5 +1515,5 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("com_google_android_gms_play_services_fido_java") {
android_aar_prebuilt("google_play_services_fido_java") {
aar_path = "libs/com_google_android_gms_play_services_fido/play-services-fido-15.0.1.aar"

+ 30
- 64
patches/ungoogled-chromium-android/remove-gms-fido-iid-instantapps-location.patch View File

@ -10,15 +10,15 @@ author: Wengling Chen <[email protected]>
device/BUILD.gn | 1 -
services/device/geolocation/BUILD.gn | 1 -
.../geolocation/LocationProviderGmsCore.java | 103 +--------------------
third_party/android_deps/BUILD.gn | 78 ----------------
third_party/android_deps/BUILD.gn | 58 ------------
third_party/cacheinvalidation/BUILD.gn | 1 -
.../client/android2/AndroidManifestUpdatedGcm.xml | 3 -
11 files changed, 9 insertions(+), 275 deletions(-)
11 files changed, 9 insertions(+), 255 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -251,8 +251,6 @@ android_library("chrome_java") {
@@ -265,8 +265,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",
@ -27,7 +27,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//base:jni_java",
@@ -615,7 +613,6 @@ junit_binary("chrome_junit_tests") {
@@ -636,7 +634,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",
@ -35,7 +35,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -711,8 +708,6 @@ android_library("chrome_test_java") {
@@ -733,8 +730,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",
@ -47,7 +47,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java
@@ -572,7 +572,6 @@ public class ExternalNavigationHandler {
@@ -574,7 +574,6 @@ public class ExternalNavigationHandler {
if (shouldProxyForInstantApps) {
RecordHistogram.recordEnumeratedHistogram("Android.InstantApps.DirectInstantAppsIntent",
AiaIntent.SERP, AiaIntent.NUM_ENTRIES);
@ -55,7 +55,7 @@ diff --git a/chrome/android/java/src/org/chromium/chrome/browser/externalnav/Ext
} else if (isDirectInstantAppsIntent) {
// For security reasons, we disable all intent:// URLs to Instant Apps that are
// not coming from SERP.
@@ -581,8 +580,6 @@ public class ExternalNavigationHandler {
@@ -583,8 +582,6 @@ public class ExternalNavigationHandler {
AiaIntent.OTHER, AiaIntent.NUM_ENTRIES);
return OverrideUrlLoadingResult.NO_OVERRIDE;
} else {
@ -285,7 +285,7 @@ diff --git a/components/gcm_driver/instance_id/android/java/src/org/chromium/com
diff --git a/device/BUILD.gn b/device/BUILD.gn
--- a/device/BUILD.gn
+++ b/device/BUILD.gn
@@ -432,7 +432,6 @@ if (is_android) {
@@ -383,7 +383,6 @@ if (is_android) {
deps = [
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -457,52 +457,18 @@ diff --git a/services/device/geolocation/android/java/src/org/chromium/device/ge
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
@@ -40,21 +40,6 @@ java_group("google_play_services_base_java") {
":com_google_android_gms_play_services_base_java",
]
}
-java_group("google_play_services_iid_java") {
- deps = [
- ":com_google_android_gms_play_services_iid_java",
- ]
-}
-java_group("google_play_services_instantapps_java") {
- deps = [
- ":com_google_android_gms_play_services_instantapps_java",
- ]
-}
-java_group("google_play_services_location_java") {
- deps = [
- ":com_google_android_gms_play_services_location_java",
- ]
-}
java_group("google_play_services_vision_java") {
deps = [
":com_google_android_gms_play_services_vision_java",
@@ -65,11 +50,6 @@ java_group("google_play_services_vision_common_java") {
":com_google_android_gms_play_services_vision_common_java",
]
}
-java_group("google_play_services_fido_java") {
- deps = [
- ":com_google_android_gms_play_services_fido_java",
- ]
-}
# The dependencies below are used by chromecast internal.
java_group("android_support_v7_preference_java") {
@@ -374,64 +354,6 @@ android_aar_prebuilt("com_google_android_gms_play_services_basement_java") {
@@ -327,64 +327,6 @@ android_aar_prebuilt("google_play_services_basement_java") {
input_jars_paths = [ "$android_sdk/optional/org.apache.http.legacy.jar" ]
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_fido_java") {
-android_aar_prebuilt("google_play_services_fido_java") {
- aar_path = "libs/com_google_android_gms_play_services_fido/play-services-fido-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_fido/com_google_android_gms_play_services_fido.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -510,14 +476,14 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_iid_java") {
-android_aar_prebuilt("google_play_services_iid_java") {
- aar_path = "libs/com_google_android_gms_play_services_iid/play-services-iid-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_iid/com_google_android_gms_play_services_iid.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_stats_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_stats_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -525,13 +491,13 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_instantapps_java") {
-android_aar_prebuilt("google_play_services_instantapps_java") {
- aar_path = "libs/com_google_android_gms_play_services_instantapps/play-services-instantapps-16.0.0.aar"
- info_path = "libs/com_google_android_gms_play_services_instantapps/com_google_android_gms_play_services_instantapps.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -539,14 +505,14 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_location_java") {
-android_aar_prebuilt("google_play_services_location_java") {
- aar_path = "libs/com_google_android_gms_play_services_location/play-services-location-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_location/com_google_android_gms_play_services_location.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_places_placereport_java",
- ":com_google_android_gms_play_services_tasks_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_places_placereport_java",
- ":google_play_services_tasks_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -554,19 +520,19 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("com_google_android_gms_play_services_tasks_java") {
android_aar_prebuilt("google_play_services_tasks_java") {
aar_path = "libs/com_google_android_gms_play_services_tasks/play-services-tasks-15.0.1.aar"
diff --git a/third_party/cacheinvalidation/BUILD.gn b/third_party/cacheinvalidation/BUILD.gn
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -137,7 +137,6 @@ if (is_android) {
emma_never_instrument = true
jacoco_never_instrument = true
deps = [
":cacheinvalidation_proto_java",
- "$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
]
diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
--- a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
+++ b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml


+ 10
- 11
patches/ungoogled-chromium-android/remove-gms-flags-places-stats.patch View File

@ -2,18 +2,18 @@ Remove dependency on com.google.android.gms.flags, com.google.android.gms.locati
author: Wengling Chen <[email protected]>
---
third_party/android_deps/BUILD.gn | 50 ---------------------------------------
1 file changed, 50 deletions(-)
third_party/android_deps/BUILD.gn | 49 ---------------------------------------
1 file changed, 49 deletions(-)
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
@@ -591,56 +591,6 @@ android_aar_prebuilt("com_android_support_transition_java") {
@@ -574,55 +574,6 @@ android_aar_prebuilt("com_android_support_transition_java") {
deps += [ ":com_android_support_support_fragment_java" ]
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_flags_java") {
-android_aar_prebuilt("google_play_services_flags_java") {
- aar_path = "libs/com_google_android_gms_play_services_flags/play-services-flags-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_flags/com_google_android_gms_play_services_flags.info"
-
@ -21,8 +21,8 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
- # //tools/android/roll/android_deps/build.gradle.
- visibility = [ ":*" ]
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -30,8 +30,7 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt(
- "com_google_android_gms_play_services_places_placereport_java") {
-android_aar_prebuilt("google_play_services_places_placereport_java") {
- aar_path = "libs/com_google_android_gms_play_services_places_placereport/play-services-places-placereport-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_places_placereport/com_google_android_gms_play_services_places_placereport.info"
-
@ -39,7 +38,7 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
- # //tools/android/roll/android_deps/build.gradle.
- visibility = [ ":*" ]
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ":google_play_services_basement_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -47,7 +46,7 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_stats_java") {
-android_aar_prebuilt("google_play_services_stats_java") {
- aar_path = "libs/com_google_android_gms_play_services_stats/play-services-stats-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_stats/com_google_android_gms_play_services_stats.info"
-
@ -55,7 +54,7 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
- # //tools/android/roll/android_deps/build.gradle.
- visibility = [ ":*" ]
- deps = [
- ":com_google_android_gms_play_services_basement_java",
- ":google_play_services_basement_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.


+ 37
- 41
patches/ungoogled-chromium-android/remove-gms-gcm.patch View File

@ -4,7 +4,7 @@ The snippets are already disabled in native codes, this will disable it on Java
author: Wengling Chen <[email protected]>
---
chrome/android/BUILD.gn | 2 -
chrome/android/BUILD.gn | 3 -
chrome/android/java/AndroidManifest.xml | 60 --------
.../chrome/browser/BackgroundSyncLauncher.java | 64 +-------
.../chrome/browser/ChromeBackgroundService.java | 96 +-----------
@ -15,18 +15,18 @@ author: Wengling Chen <[email protected]>
.../BackgroundTaskGcmTaskService.java | 53 +------
.../BackgroundTaskSchedulerFactory.java | 6 +-
.../BackgroundTaskSchedulerGcmNetworkManager.java | 164 +--------------------
third_party/android_deps/BUILD.gn | 20 ---
third_party/android_deps/BUILD.gn | 15 --
third_party/cacheinvalidation/BUILD.gn | 1 -
.../client/android2/AndroidManifestUpdatedGcm.xml | 20 ---
.../android2/channel/AndroidGcmController.java | 42 +-----
.../channel/AndroidInstanceIDListenerService.java | 13 +-
.../channel/GcmRegistrationTaskService.java | 89 +----------
17 files changed, 21 insertions(+), 737 deletions(-)
17 files changed, 21 insertions(+), 733 deletions(-)
diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
--- a/chrome/android/BUILD.gn
+++ b/chrome/android/BUILD.gn
@@ -255,7 +255,6 @@ android_library("chrome_java") {
@@ -269,7 +269,6 @@ android_library("chrome_java") {
"$google_play_services_package:google_play_services_cast_framework_java",
"$google_play_services_package:google_play_services_cast_java",
"$google_play_services_package:google_play_services_fido_java",
@ -34,7 +34,7 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
@@ -720,7 +719,6 @@ android_library("chrome_test_java") {
@@ -742,7 +741,6 @@ android_library("chrome_test_java") {
"$google_play_services_package:google_play_services_cast_framework_java",
"$google_play_services_package:google_play_services_cast_java",
"$google_play_services_package:google_play_services_fido_java",
@ -42,6 +42,14 @@ diff --git a/chrome/android/BUILD.gn b/chrome/android/BUILD.gn
"$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
"//base:base_java",
@@ -1582,7 +1580,6 @@ android_library("browser_java_test_support") {
]
deps = [
":chrome_java",
- "$google_play_services_package:google_play_services_gcm_java",
"//base:base_java",
"//base:base_java_test_support",
"//chrome/android/public/profiles: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
@ -68,7 +76,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" />
@@ -1079,43 +1074,6 @@ by a child template that "extends" this file.
@@ -1058,43 +1053,6 @@ by a child template that "extends" this file.
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|mcc|mnc|screenLayout|smallestScreenSize"
android:hardwareAccelerated="false" />
@ -112,7 +120,7 @@ diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/Andro
<!-- Notification service for sync. -->
<meta-data android:name="ipc.invalidation.ticl.listener_service_class"
android:value="org.chromium.chrome.browser.invalidation.ChromeInvalidationClientService"/>
@@ -1155,24 +1113,6 @@ by a child template that "extends" this file.
@@ -1134,24 +1092,6 @@ by a child template that "extends" this file.
android:exported="false"
android:permission="android.permission.BIND_JOB_SERVICE"/>
@ -907,31 +915,19 @@ diff --git a/components/background_task_scheduler/android/java/src/org/chromium/
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
@@ -75,11 +75,6 @@ java_group("google_play_services_instantapps_java") {
":com_google_android_gms_play_services_instantapps_java",
]
}
-java_group("google_play_services_gcm_java") {
- deps = [
- ":com_google_android_gms_play_services_gcm_java",
- ]
-}
java_group("google_play_services_location_java") {
deps = [
":com_google_android_gms_play_services_location_java",
@@ -496,21 +491,6 @@ android_aar_prebuilt("com_google_android_gms_play_services_fido_java") {
@@ -417,21 +417,6 @@ android_aar_prebuilt("google_play_services_fido_java") {
strip_drawables = true
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_gcm_java") {
-android_aar_prebuilt("google_play_services_gcm_java") {
- aar_path = "libs/com_google_android_gms_play_services_gcm/play-services-gcm-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_gcm/com_google_android_gms_play_services_gcm.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_iid_java",
- ":com_google_android_gms_play_services_stats_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_iid_java",
- ":google_play_services_stats_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -939,19 +935,19 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("com_google_android_gms_play_services_iid_java") {
android_aar_prebuilt("google_play_services_iid_java") {
aar_path = "libs/com_google_android_gms_play_services_iid/play-services-iid-15.0.1.aar"
diff --git a/third_party/cacheinvalidation/BUILD.gn b/third_party/cacheinvalidation/BUILD.gn
--- a/third_party/cacheinvalidation/BUILD.gn
+++ b/third_party/cacheinvalidation/BUILD.gn
@@ -137,7 +137,6 @@ if (is_android) {
emma_never_instrument = true
jacoco_never_instrument = true
deps = [
":cacheinvalidation_proto_java",
- "$google_play_services_package:google_play_services_gcm_java",
"$google_play_services_package:google_play_services_iid_java",
"$google_play_services_package:google_play_services_tasks_java",
"//third_party/android_protobuf:protobuf_nano_javalib",
"//base:base_java",
diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
--- a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
+++ b/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android2/AndroidManifestUpdatedGcm.xml
@ -1156,11 +1152,11 @@ diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/
-
- /** Stores the registration token and the current application version in Shared Preferences. */
- private void storeToken(String token) {
- AndroidChannelPreferences.setRegistrationToken(this, token);
- AndroidChannelPreferences.setAppVersion(
- this, CommonUtils.getPackageVersion(this, getPackageName()));
- // Send the updated token to the server.
- updateServer();
- AndroidChannelPreferences.setRegistrationToken(token);
- AndroidChannelPreferences.setAppVersion(
- CommonUtils.getPackageVersion(this, getPackageName()));
- // Send the updated token to the server.
- updateServer();
- }
-
- /** Sends a message to the server to update the GCM registration token. */
@ -1173,15 +1169,15 @@ diff --git a/third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/
- sendBuffered.putExtra(AndroidChannelConstants.MESSAGE_SENDER_SVC_GCM_REGID_CHANGE, ignoredData);
-
- // Select the sender service to use for upstream message.
- if (AndroidChannelPreferences.getGcmChannelType(this) == GcmChannelType.GCM_UPSTREAM) {
- String upstreamServiceClass = new AndroidTiclManifest(this).getGcmUpstreamServiceClass();
- if (upstreamServiceClass == null) {
- logger.warning("GcmUpstreamSenderService class not found.");
- return;
- }
- sendBuffered.setClassName(this, upstreamServiceClass);
- if (AndroidChannelPreferences.getGcmChannelType() == GcmChannelType.GCM_UPSTREAM) {
- String upstreamServiceClass = new AndroidTiclManifest(this).getGcmUpstreamServiceClass();
- if (upstreamServiceClass == null) {
- logger.warning("GcmUpstreamSenderService class not found.");
- return;
- }
- sendBuffered.setClassName(this, upstreamServiceClass);
- } else {
- sendBuffered.setClass(this, AndroidMessageSenderService.class);
- sendBuffered.setClass(this, AndroidMessageSenderService.class);
- }
- try {
- startService(sendBuffered);


+ 28
- 46
patches/ungoogled-chromium-android/remove-gms-vision-clearcut-phenotype.patch View File

@ -9,13 +9,13 @@ author: Wengling Chen <[email protected]>
.../org/chromium/shape_detection/BitmapUtils.java | 12 --
.../shape_detection/FaceDetectionImplGmsCore.java | 122 +--------------------
.../shape_detection/TextDetectionImpl.java | 59 +---------
third_party/android_deps/BUILD.gn | 77 -------------
8 files changed, 8 insertions(+), 366 deletions(-)
third_party/android_deps/BUILD.gn | 66 -----------
8 files changed, 8 insertions(+), 355 deletions(-)
diff --git a/services/BUILD.gn b/services/BUILD.gn
--- a/services/BUILD.gn
+++ b/services/BUILD.gn
@@ -102,8 +102,6 @@ if (is_android) {
@@ -99,8 +99,6 @@ if (is_android) {
deps = [
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -24,7 +24,7 @@ diff --git a/services/BUILD.gn b/services/BUILD.gn
"//base:base_java",
"//base:base_java_test_support",
"//base:base_junit_test_support",
@@ -133,8 +131,6 @@ if (is_android) {
@@ -130,8 +128,6 @@ if (is_android) {
deps = [
"$google_play_services_package:google_play_services_base_java",
"$google_play_services_package:google_play_services_basement_java",
@ -473,35 +473,18 @@ diff --git a/services/shape_detection/android/java/src/org/chromium/shape_detect
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
@@ -40,16 +40,6 @@ java_group("google_play_services_base_java") {
":com_google_android_gms_play_services_base_java",
]
}
-java_group("google_play_services_vision_java") {
- deps = [
- ":com_google_android_gms_play_services_vision_java",
- ]
-}
-java_group("google_play_services_vision_common_java") {
- deps = [
- ":com_google_android_gms_play_services_vision_common_java",
- ]
-}
# The dependencies below are used by chromecast internal.
java_group("android_support_v7_preference_java") {
@@ -366,36 +356,6 @@ android_aar_prebuilt("com_google_android_gms_play_services_tasks_java") {
@@ -339,35 +339,6 @@ android_aar_prebuilt("google_play_services_tasks_java") {
strip_drawables = true
}
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt("com_google_android_gms_play_services_vision_java") {
-android_aar_prebuilt("google_play_services_vision_java") {
- aar_path = "libs/com_google_android_gms_play_services_vision/play-services-vision-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_vision/com_google_android_gms_play_services_vision.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_vision_common_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_vision_common_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -509,15 +492,14 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
-}
-
-# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
-android_aar_prebuilt(
- "com_google_android_gms_play_services_vision_common_java") {
-android_aar_prebuilt("google_play_services_vision_common_java") {
- aar_path = "libs/com_google_android_gms_play_services_vision_common/play-services-vision-common-15.0.1.aar"
- info_path = "libs/com_google_android_gms_play_services_vision_common/com_google_android_gms_play_services_vision_common.info"
- deps = [
- ":com_google_android_gms_play_services_base_java",
- ":com_google_android_gms_play_services_basement_java",
- ":com_google_android_gms_play_services_clearcut_java",
- ":com_google_android_gms_play_services_flags_java",
- ":google_play_services_base_java",
- ":google_play_services_basement_java",
- ":google_play_services_clearcut_java",
- ":google_play_services_flags_java",
- ]
-
- # Removing drawables from GMS .aars as they are unused bloat.
@ -527,12 +509,12 @@ diff --git a/third_party/android_deps/BUILD.gn b/third_party/android_deps/BUILD.
# This is generated, do not edit. Update BuildConfigGenerator.groovy instead.
android_aar_prebuilt("com_google_ar_core_java") {
aar_path = "libs/com_google_ar_core/core-1.8.0.aar"
@@ -631,25 +591,6 @@ android_aar_prebuilt("com_android_support_transition_java") {
@@ -603,25 +574,6 @@ android_aar_prebuilt("com_android_support_transition_java") {