Commit fed00e61 authored by Min Qin's avatar Min Qin Committed by Commit Bot

make intent extra a Uri instead of String when launching it

DownloadProvider sets the extra as Uri. Chrome should also do the same
so the security team can handle them properly.

BUG=899105

Change-Id: I264ed29c9a9f7c730531116ab4261e2de71481b9
Reviewed-on: https://chromium-review.googlesource.com/c/1302099Reviewed-by: default avatarDavid Trainor <dtrainor@chromium.org>
Commit-Queue: Min Qin <qinmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#603207}
parent 0d095129
......@@ -150,8 +150,10 @@ public class MediaViewerUtils {
public static void setOriginalUrlAndReferralExtraToIntent(
Intent intent, String originalUrl, String referrer) {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) return;
if (originalUrl != null) intent.putExtra(Intent.EXTRA_ORIGINATING_URI, originalUrl);
if (referrer != null) intent.putExtra(Intent.EXTRA_REFERRER, referrer);
if (originalUrl != null) {
intent.putExtra(Intent.EXTRA_ORIGINATING_URI, Uri.parse(originalUrl));
}
if (referrer != null) intent.putExtra(Intent.EXTRA_REFERRER, Uri.parse(originalUrl));
}
/**
......
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