LeOSium_webview/mulch/patches/0001-Vanadium/0064-disable-learn-more-lin...

39 lines
2.1 KiB
Diff
Raw Normal View History

2023-11-18 11:46:19 +01:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: A Mak <refragable@mailbox.org>
Date: Sat, 8 Aug 2020 11:17:59 -0700
Subject: [PATCH] disable learn more link in incognito new tab
---
.../chrome/browser/ntp/LegacyIncognitoDescriptionView.java | 4 ++--
.../chrome/browser/ntp/RevampedIncognitoDescriptionView.java | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java
index 517d82077141b..a26dc3e57a04e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/LegacyIncognitoDescriptionView.java
@@ -286,9 +286,9 @@ public class LegacyIncognitoDescriptionView
private void adjustLearnMore() {
final String subtitleText = getContext().getResources().getString(
R.string.new_tab_otr_subtitle_with_reading_list);
- boolean learnMoreInSubtitle = mWidthDp > WIDE_LAYOUT_THRESHOLD_DP;
+ boolean learnMoreInSubtitle = false;
- mLearnMore.setVisibility(learnMoreInSubtitle ? View.GONE : View.VISIBLE);
+ mLearnMore.setVisibility(View.GONE);
if (!learnMoreInSubtitle) {
// Revert to the original text.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java
index 4213e30ca7f72..3610c592e49fb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/RevampedIncognitoDescriptionView.java
@@ -264,6 +264,7 @@ public class RevampedIncognitoDescriptionView
mLearnMore.setText(formattedText);
mLearnMore.setMovementMethod(LinkMovementMethod.getInstance());
+ mLearnMore.setVisibility(View.GONE);
}
private boolean isNarrowScreen() {