Bug 1295639 - TwoLinePageRow: Use stripAboutReaderUrl() instead of getUrlFromAboutReader(). r?ahunt
ReaderModeUtils.getUrlFromAboutReader() will return null if this is not a 100% valid reader mode
URL. However ReaderMoteUtils.stripAboutReaderUrl() will return the original URL if the reader mode
URL could not be "decoded".
MozReview-Commit-ID: J07Gkyq07JK
--- a/mobile/android/base/java/org/mozilla/gecko/home/TwoLinePageRow.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/TwoLinePageRow.java
@@ -291,17 +291,17 @@ public class TwoLinePageRow extends Line
}
// Blank the Favicon, so we don't show the wrong Favicon if we scroll and miss DB.
mFavicon.clearImage();
Favicons.cancelFaviconLoad(mLoadFaviconJobId);
// Displayed RecentTabsPanel URLs may refer to pages opened in reader mode, so we
// remove the about:reader prefix to ensure the Favicon loads properly.
- final String pageURL = AboutPages.isAboutReader(url) ? ReaderModeUtils.getUrlFromAboutReader(url) : url;
+ final String pageURL = ReaderModeUtils.stripAboutReaderUrl(url);
if (bookmarkId < BrowserContract.Bookmarks.FAKE_PARTNER_BOOKMARKS_START) {
mLoadFaviconJobId = Favicons.getSizedFavicon(
getContext(),
pageURL,
PartnerBookmarksProviderProxy.getUriForIcon(getContext(), bookmarkId).toString(),
Favicons.LoadType.PRIVILEGED,
Favicons.defaultFaviconSize,