Commit 558aba33 authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Move HyperlinkPreference to about_settings

HyperlinkPreference is only used by About Chrome > Legal information
settings screen, and is not going to be modularized as a shared
component (see https://crbug.com/1044685#c1), so moving it alongside
the code where it's used.

Bug: 1044685
Change-Id: Icbd6f9cee42800bbd217b59816c1c49470f79a23
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210664Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#770754}
parent 339f2b44
...@@ -62,6 +62,7 @@ chrome_java_sources = [ ...@@ -62,6 +62,7 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/about_settings/AboutChromePreferenceOSVersion.java", "java/src/org/chromium/chrome/browser/about_settings/AboutChromePreferenceOSVersion.java",
"java/src/org/chromium/chrome/browser/about_settings/AboutChromeSettings.java", "java/src/org/chromium/chrome/browser/about_settings/AboutChromeSettings.java",
"java/src/org/chromium/chrome/browser/about_settings/AboutSettingsBridge.java", "java/src/org/chromium/chrome/browser/about_settings/AboutSettingsBridge.java",
"java/src/org/chromium/chrome/browser/about_settings/HyperlinkPreference.java",
"java/src/org/chromium/chrome/browser/about_settings/LegalInformationSettings.java", "java/src/org/chromium/chrome/browser/about_settings/LegalInformationSettings.java",
"java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java", "java/src/org/chromium/chrome/browser/accessibility/FontSizePrefs.java",
"java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java", "java/src/org/chromium/chrome/browser/accessibility/settings/AccessibilitySettings.java",
...@@ -1387,7 +1388,6 @@ chrome_java_sources = [ ...@@ -1387,7 +1388,6 @@ chrome_java_sources = [
"java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java", "java/src/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java",
"java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java", "java/src/org/chromium/chrome/browser/services/gcm/GcmUma.java",
"java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java", "java/src/org/chromium/chrome/browser/services/gcm/InvalidationGcmUpstreamSender.java",
"java/src/org/chromium/chrome/browser/settings/HyperlinkPreference.java",
"java/src/org/chromium/chrome/browser/settings/MainSettings.java", "java/src/org/chromium/chrome/browser/settings/MainSettings.java",
"java/src/org/chromium/chrome/browser/settings/SettingsActivity.java", "java/src/org/chromium/chrome/browser/settings/SettingsActivity.java",
"java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java", "java/src/org/chromium/chrome/browser/settings/SettingsLauncherImpl.java",
......
...@@ -6,19 +6,19 @@ ...@@ -6,19 +6,19 @@
<PreferenceScreen <PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<org.chromium.chrome.browser.settings.HyperlinkPreference <org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="open_source_license" android:key="open_source_license"
android:title="@string/open_source_license_title" android:title="@string/open_source_license_title"
app:url="@string/open_source_license_url" /> app:url="@string/open_source_license_url" />
<org.chromium.chrome.browser.settings.HyperlinkPreference <org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="google_terms_of_service" android:key="google_terms_of_service"
android:title="@string/google_terms_of_service_title" android:title="@string/google_terms_of_service_title"
app:url="@string/google_terms_of_service_url" /> app:url="@string/google_terms_of_service_url" />
<org.chromium.chrome.browser.settings.HyperlinkPreference <org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="chrome_additional_terms_of_service" android:key="chrome_additional_terms_of_service"
android:title="@string/chrome_additional_terms_of_service_title" android:title="@string/chrome_additional_terms_of_service_title"
app:url="@string/chrome_additional_terms_of_service_url" /> app:url="@string/chrome_additional_terms_of_service_url" />
<org.chromium.chrome.browser.settings.HyperlinkPreference <org.chromium.chrome.browser.about_settings.HyperlinkPreference
android:key="privacy_notice" android:key="privacy_notice"
android:title="@string/privacy_notice_title" android:title="@string/privacy_notice_title"
app:url="@string/chrome_privacy_notice_url" /> app:url="@string/chrome_privacy_notice_url" />
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
package org.chromium.chrome.browser.settings; package org.chromium.chrome.browser.about_settings;
import android.content.Context; import android.content.Context;
import android.content.res.TypedArray; import android.content.res.TypedArray;
...@@ -19,13 +19,11 @@ import org.chromium.ui.base.LocalizationUtils; ...@@ -19,13 +19,11 @@ import org.chromium.ui.base.LocalizationUtils;
* A preference that navigates to an URL. * A preference that navigates to an URL.
*/ */
public class HyperlinkPreference extends Preference { public class HyperlinkPreference extends Preference {
private final int mUrlResId; private final int mUrlResId;
public HyperlinkPreference(Context context, AttributeSet attrs) { public HyperlinkPreference(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.HyperlinkPreference, 0, 0);
R.styleable.HyperlinkPreference, 0, 0);
mUrlResId = a.getResourceId(R.styleable.HyperlinkPreference_url, 0); mUrlResId = a.getResourceId(R.styleable.HyperlinkPreference_url, 0);
a.recycle(); a.recycle();
setSingleLineTitle(false); setSingleLineTitle(false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment