Commit 7c5eb6f1 authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

Use Activity context for HyperlinkPreference

On the Legal Information settings page, in order for the links to share
the same activity and correctly display the app icon in the recent apps
view, unwrap the context to get the activity context.

Bug: 1001485
Change-Id: I9275b837e1b86c0b90a6a6716be8a4295a357d67
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1807181Reviewed-by: default avatarPatrick Noland <pnoland@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697267}
parent f8f331c5
...@@ -17,6 +17,7 @@ import org.chromium.base.ApiCompatibilityUtils; ...@@ -17,6 +17,7 @@ import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.chrome.R; import org.chromium.chrome.R;
import org.chromium.chrome.browser.customtabs.CustomTabActivity; import org.chromium.chrome.browser.customtabs.CustomTabActivity;
import org.chromium.ui.base.LocalizationUtils; import org.chromium.ui.base.LocalizationUtils;
import org.chromium.ui.base.WindowAndroid;
/** /**
* A preference that navigates to an URL. * A preference that navigates to an URL.
...@@ -40,7 +41,7 @@ public class HyperlinkPreference extends Preference { ...@@ -40,7 +41,7 @@ public class HyperlinkPreference extends Preference {
@Override @Override
protected void onClick() { protected void onClick() {
CustomTabActivity.showInfoPage(getContext(), CustomTabActivity.showInfoPage(WindowAndroid.activityFromContext(getContext()),
LocalizationUtils.substituteLocalePlaceholder(getContext().getString(mUrlResId))); LocalizationUtils.substituteLocalePlaceholder(getContext().getString(mUrlResId)));
} }
......
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