From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Wed, 27 Jun 2018 01:32:28 +0200
Subject: Remove help menu item
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/android/java/res/menu/main_menu.xml | 3 ---
.../menu/save_password_preferences_action_bar_menu.xml | 1 +
.../org/chromium/chrome/browser/KeyboardShortcuts.java | 3 ---
.../chromium/chrome/browser/app/ChromeActivity.java | 10 ----------
.../settings/AutofillPaymentMethodsFragment.java | 1 +
.../autofill/settings/AutofillProfilesFragment.java | 1 +
.../browsing_data/ClearBrowsingDataFragment.java | 1 +
.../browser/customtabs/BaseCustomTabActivity.java | 2 +-
.../browser/directactions/MenuDirectActionHandler.java | 2 --
.../password_manager/settings/PasswordSettings.java | 1 +
.../browser/privacy/settings/PrivacySettings.java | 1 +
.../chrome/browser/settings/SettingsActivity.java | 1 +
.../browser/sync/settings/GoogleServicesSettings.java | 1 +
.../browser/sync/settings/ManageSyncSettings.java | 1 +
.../android/java/res/menu/prefeditor_editor_menu.xml | 1 +
.../autofill/options/AutofillOptionsFragment.java | 1 +
.../password_check/PasswordCheckFragmentView.java | 1 +
.../java/res/menu/credential_edit_action_bar_menu.xml | 3 ++-
.../settings/PreloadPagesSettingsFragmentBase.java | 1 +
.../PrivacySandboxSettingsBaseFragment.java | 1 +
.../settings/SafeBrowsingSettingsFragmentBase.java | 1 +
21 files changed, 18 insertions(+), 20 deletions(-)
diff --git a/chrome/android/java/res/menu/main_menu.xml b/chrome/android/java/res/menu/main_menu.xml
--- a/chrome/android/java/res/menu/main_menu.xml
+++ b/chrome/android/java/res/menu/main_menu.xml
@@ -155,9 +155,6 @@ found in the LICENSE file.
-
-
final Tab currentTab = getActivityTab();
- if (id == R.id.help_id) {
- String url = currentTab != null ? currentTab.getUrl().getSpec() : "";
- Profile profile = getTabModelSelector().isIncognitoSelected()
- ? Profile.getLastUsedRegularProfile().getPrimaryOTRProfile(
- /*createIfNeeded=*/true)
- : Profile.getLastUsedRegularProfile();
- startHelpAndFeedback(url, "MobileMenuFeedback", profile);
- return true;
- }
-
if (id == R.id.open_history_menu_id) {
// 'currentTab' could only be null when opening history from start surface, which is
// not available on tablet.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillPaymentMethodsFragment.java
@@ -89,6 +89,7 @@ public class AutofillPaymentMethodsFragment extends ChromeBaseSettingsFragment
MenuItem help =
menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help);
help.setIcon(R.drawable.ic_help_and_feedback);
+ help.setVisible(false);
}
@Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/autofill/settings/AutofillProfilesFragment.java
@@ -113,6 +113,7 @@ public class AutofillProfilesFragment extends ChromeBaseSettingsFragment
MenuItem help =
menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help);
help.setIcon(R.drawable.ic_help_and_feedback);
+ help.setVisible(false);
}
@Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/browsing_data/ClearBrowsingDataFragment.java
@@ -824,6 +824,7 @@ public abstract class ClearBrowsingDataFragment extends PreferenceFragmentCompat
help.setIcon(TraceEventVectorDrawableCompat.create(
getResources(), R.drawable.ic_help_and_feedback, getActivity().getTheme()));
help.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);
+ help.setVisible(false);
}
@Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
--- a/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/customtabs/BaseCustomTabActivity.java
@@ -580,7 +580,7 @@ public abstract class BaseCustomTabActivity extends ChromeActivity
diff --git a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/options/AutofillOptionsFragment.java b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/options/AutofillOptionsFragment.java
--- a/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/options/AutofillOptionsFragment.java
+++ b/chrome/browser/autofill/android/java/src/org/chromium/chrome/browser/autofill/options/AutofillOptionsFragment.java
@@ -81,6 +81,7 @@ public class AutofillOptionsFragment extends ChromeBaseSettingsFragment {
MenuItem help =
menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help);
help.setIcon(R.drawable.ic_help_and_feedback);
+ help.setVisible(false);
}
@Override
diff --git a/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java b/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java
--- a/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java
+++ b/chrome/browser/password_check/android/java/src/org/chromium/chrome/browser/password_check/PasswordCheckFragmentView.java
@@ -51,6 +51,7 @@ public class PasswordCheckFragmentView extends PreferenceFragmentCompat {
menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help);
help.setIcon(TraceEventVectorDrawableCompat.create(
getResources(), R.drawable.ic_help_and_feedback, getActivity().getTheme()));
+ help.setVisible(false);
}
@Override
diff --git a/chrome/browser/password_entry_edit/android/java/res/menu/credential_edit_action_bar_menu.xml b/chrome/browser/password_entry_edit/android/java/res/menu/credential_edit_action_bar_menu.xml
--- a/chrome/browser/password_entry_edit/android/java/res/menu/credential_edit_action_bar_menu.xml
+++ b/chrome/browser/password_entry_edit/android/java/res/menu/credential_edit_action_bar_menu.xml
@@ -21,5 +21,6 @@ found in the LICENSE file.
android:icon="@drawable/ic_help_and_feedback"
app:iconTint="@macro/default_icon_color"
android:title="@string/menu_help"
+ android:visibility="gone"
app:showAsAction="ifRoom"/>
-
\ No newline at end of file
+
diff --git a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentBase.java b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentBase.java
--- a/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentBase.java
+++ b/chrome/browser/prefetch/android/java/src/org/chromium/chrome/browser/prefetch/settings/PreloadPagesSettingsFragmentBase.java
@@ -34,6 +34,7 @@ public abstract class PreloadPagesSettingsFragmentBase extends ChromeBaseSetting
menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help);
help.setIcon(TraceEventVectorDrawableCompat.create(
getResources(), R.drawable.ic_help_and_feedback, getActivity().getTheme()));
+ help.setVisible(false);
}
@Override
diff --git a/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsBaseFragment.java b/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsBaseFragment.java
--- a/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsBaseFragment.java
+++ b/chrome/browser/privacy_sandbox/android/java/src/org/chromium/chrome/browser/privacy_sandbox/PrivacySandboxSettingsBaseFragment.java
@@ -80,6 +80,7 @@ public abstract class PrivacySandboxSettingsBaseFragment
menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help);
help.setIcon(TraceEventVectorDrawableCompat.create(
getResources(), R.drawable.ic_help_and_feedback, getActivity().getTheme()));
+ help.setVisible(false);
}
@Override
diff --git a/chrome/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings/SafeBrowsingSettingsFragmentBase.java b/chrome/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings/SafeBrowsingSettingsFragmentBase.java
--- a/chrome/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings/SafeBrowsingSettingsFragmentBase.java
+++ b/chrome/browser/safe_browsing/android/java/src/org/chromium/chrome/browser/safe_browsing/settings/SafeBrowsingSettingsFragmentBase.java
@@ -66,6 +66,7 @@ public abstract class SafeBrowsingSettingsFragmentBase extends ChromeBaseSetting
menu.add(Menu.NONE, R.id.menu_id_targeted_help, Menu.NONE, R.string.menu_help);
help.setIcon(TraceEventVectorDrawableCompat.create(
getResources(), R.drawable.ic_help_and_feedback, getActivity().getTheme()));
+ help.setVisible(false);
}
@Override
--
2.25.1