From 2233ff5df035abf5d5863b8692cc0831d820f9d9 Mon Sep 17 00:00:00 2001 From: klzgrad Date: Wed, 4 May 2022 14:58:47 +0800 Subject: [PATCH] prefs: Disable Android JNI --- src/components/prefs/BUILD.gn | 2 +- src/components/prefs/pref_service.cc | 4 ++-- src/components/prefs/pref_service.h | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/prefs/BUILD.gn b/src/components/prefs/BUILD.gn index 5f95e3b711..b4fb1694f0 100644 --- a/src/components/prefs/BUILD.gn +++ b/src/components/prefs/BUILD.gn @@ -58,7 +58,7 @@ component("prefs") { public_deps = [ "//base" ] - if (is_android) { + if (false) { sources += [ "android/pref_service_android.cc", "android/pref_service_android.h", diff --git a/src/components/prefs/pref_service.cc b/src/components/prefs/pref_service.cc index 2a0810a9b8..6be842c5aa 100644 --- a/src/components/prefs/pref_service.cc +++ b/src/components/prefs/pref_service.cc @@ -33,7 +33,7 @@ #include "components/prefs/value_map_pref_store.h" #endif -#if BUILDFLAG(IS_ANDROID) +#if 0 #include "components/prefs/android/pref_service_android.h" #endif @@ -508,7 +508,7 @@ void PrefService::RemovePrefObserverAllPrefs(PrefObserver* obs) { pref_notifier_->RemovePrefObserverAllPrefs(obs); } -#if BUILDFLAG(IS_ANDROID) +#if 0 base::android::ScopedJavaLocalRef PrefService::GetJavaObject() { if (!pref_service_android_) { pref_service_android_ = std::make_unique(this); diff --git a/src/components/prefs/pref_service.h b/src/components/prefs/pref_service.h index 74da1aa468..27ef352525 100644 --- a/src/components/prefs/pref_service.h +++ b/src/components/prefs/pref_service.h @@ -32,7 +32,7 @@ #include "components/prefs/pref_value_store.h" #include "components/prefs/prefs_export.h" -#if BUILDFLAG(IS_ANDROID) +#if 0 #include "base/android/scoped_java_ref.h" #endif @@ -41,7 +41,7 @@ class PrefNotifierImpl; class PrefObserver; class PrefRegistry; class PrefStore; -#if BUILDFLAG(IS_ANDROID) +#if 0 class PrefServiceAndroid; #endif @@ -421,7 +421,7 @@ class COMPONENTS_PREFS_EXPORT PrefService { void RemoveStandaloneBrowserPref(const std::string& path); #endif -#if BUILDFLAG(IS_ANDROID) +#if 0 base::android::ScopedJavaLocalRef GetJavaObject(); #endif @@ -542,7 +542,7 @@ class COMPONENTS_PREFS_EXPORT PrefService { // of registered preferences are. mutable PreferenceMap prefs_map_; -#if BUILDFLAG(IS_ANDROID) +#if 0 // Manage and fetch the java object that wraps this PrefService on // android. std::unique_ptr pref_service_android_;