Bug 1295639 - TwoLinePageRow: Use stripAboutReaderUrl() instead of getUrlFromAboutReader(). r=ahunt a=ritu
authorSebastian Kaspari <s.kaspari@gmail.com>
Wed, 24 Aug 2016 12:14:35 +0200
changeset 347920 5f96fd50606040db113865523e80ba5848f1ac96
parent 347919 e17961c6b9ae20b89f931ee24430d563847d265d
child 347921 7034b14c71ba4cfa4ffa1e4160d449e0e816d734
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahunt, ritu
bugs1295639
milestone50.0a2
Bug 1295639 - TwoLinePageRow: Use stripAboutReaderUrl() instead of getUrlFromAboutReader(). r=ahunt a=ritu 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
mobile/android/base/java/org/mozilla/gecko/home/TwoLinePageRow.java
--- 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,