81 lines
3.8 KiB
Diff
81 lines
3.8 KiB
Diff
From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
Date: Mon, 11 Nov 2019 23:09:48 +0100
|
|
Subject: Disable sync services menu entry
|
|
|
|
---
|
|
.../android/java/res/xml/main_preferences.xml | 11 ++---------
|
|
.../java/res/xml/privacy_preferences.xml | 5 -----
|
|
.../sync/settings/SyncSettingsUtils.java | 17 -----------------
|
|
3 files changed, 2 insertions(+), 31 deletions(-)
|
|
|
|
diff --git a/chrome/android/java/res/xml/main_preferences.xml b/chrome/android/java/res/xml/main_preferences.xml
|
|
--- a/chrome/android/java/res/xml/main_preferences.xml
|
|
+++ b/chrome/android/java/res/xml/main_preferences.xml
|
|
@@ -13,7 +13,8 @@
|
|
<PreferenceCategory
|
|
android:key="account_section"
|
|
android:order="1"
|
|
- android:title="@string/prefs_section_account"/>
|
|
+ android:title="@string/prefs_section_account"
|
|
+ app:isPreferenceVisible="false"/>
|
|
<PreferenceCategory
|
|
android:key="account_and_google_services_section"
|
|
android:order="2"
|
|
@@ -23,14 +24,6 @@
|
|
android:key="sign_in"
|
|
android:order="3"
|
|
android:title="@string/sign_in_to_chrome"/>
|
|
- <org.chromium.components.browser_ui.settings.ChromeBasePreference
|
|
- android:key="sync_and_services"
|
|
- android:order="4"
|
|
- android:layout="@layout/account_management_account_row"
|
|
- android:title="@string/prefs_sync_and_services"
|
|
- android:fragment="org.chromium.chrome.browser.sync.settings.SyncAndServicesSettings"/>
|
|
- <!-- manage_sync and google_services replace sync_and_services if MOBILE_IDENTITY_CONSISTENCY
|
|
- is enabled. -->
|
|
<org.chromium.components.browser_ui.settings.ChromeBasePreference
|
|
android:key="manage_sync"
|
|
android:order="5"
|
|
diff --git a/chrome/android/java/res/xml/privacy_preferences.xml b/chrome/android/java/res/xml/privacy_preferences.xml
|
|
--- a/chrome/android/java/res/xml/privacy_preferences.xml
|
|
+++ b/chrome/android/java/res/xml/privacy_preferences.xml
|
|
@@ -34,9 +34,4 @@
|
|
android:summary="@string/clear_browsing_data_summary"
|
|
android:fragment="org.chromium.chrome.browser.browsing_data.ClearBrowsingDataTabsFragment"
|
|
android:order="5"/>
|
|
- <org.chromium.components.browser_ui.settings.TextMessagePreference
|
|
- android:key="sync_and_services_link"
|
|
- android:summary="@string/privacy_sync_and_services_link_legacy"
|
|
- app:allowDividerBelow="false"
|
|
- android:order="7"/>
|
|
</PreferenceScreen>
|
|
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncSettingsUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncSettingsUtils.java
|
|
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncSettingsUtils.java
|
|
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/settings/SyncSettingsUtils.java
|
|
@@ -257,23 +257,6 @@ public class SyncSettingsUtils {
|
|
}
|
|
|
|
boolean syncEnabled = AndroidSyncSettings.get().isSyncEnabled();
|
|
- if (syncEnabled) {
|
|
- if (!profileSyncService.isSyncActive()) {
|
|
- return res.getString(R.string.sync_setup_progress);
|
|
- }
|
|
-
|
|
- if (profileSyncService.isPassphraseRequiredForPreferredDataTypes()) {
|
|
- return res.getString(R.string.sync_need_passphrase);
|
|
- }
|
|
-
|
|
- if (profileSyncService.isTrustedVaultKeyRequiredForPreferredDataTypes()) {
|
|
- return profileSyncService.isEncryptEverythingEnabled()
|
|
- ? context.getString(R.string.sync_error_card_title)
|
|
- : context.getString(R.string.sync_passwords_error_card_title);
|
|
- }
|
|
-
|
|
- return context.getString(R.string.sync_and_services_summary_sync_on);
|
|
- }
|
|
return context.getString(R.string.sync_is_disabled);
|
|
}
|
|
|
|
--
|
|
2.17.1
|
|
|