Bug 1310622 - Display the item as-is but do not load an icon if we do not have a page URL r=sebastian
authorNevin Chen <cnevinchen@gmail.com>
Tue, 13 Dec 2016 13:18:55 +0800
changeset 328786 a271a9a042013cc1bbb5036f396159aee79df983
parent 328785 482e54376042ed35d176c5499fd1cf725d16ee08
child 328787 b30209ce54bc18a0590a589e4544bc15cfa2bfc8
push id85546
push userkwierso@gmail.com
push dateWed, 11 Jan 2017 02:36:30 +0000
treeherdermozilla-inbound@c5bce4cd684a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1310622
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1310622 - Display the item as-is but do not load an icon if we do not have a page URL r=sebastian MozReview-Commit-ID: Ij9VS5NvMAs
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
@@ -264,17 +264,19 @@ public class TwoLinePageRow extends Line
         if (mOngoingIconLoad != null) {
             mOngoingIconLoad.cancel(true);
         }
 
         // 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 = ReaderModeUtils.stripAboutReaderUrl(url);
 
-        if (bookmarkId < BrowserContract.Bookmarks.FAKE_PARTNER_BOOKMARKS_START) {
+        if (TextUtils.isEmpty(pageURL)) {
+            // If url is empty, display the item as-is but do not load an icon if we do not have a page URL (bug 1310622)
+        } else if (bookmarkId < BrowserContract.Bookmarks.FAKE_PARTNER_BOOKMARKS_START) {
             mOngoingIconLoad = Icons.with(getContext())
                     .pageUrl(pageURL)
                     .skipNetwork()
                     .privileged(true)
                     .icon(IconDescriptor.createGenericIcon(
                             PartnerBookmarksProviderProxy.getUriForIcon(getContext(), bookmarkId).toString()))
                     .build()
                     .execute(mFavicon.createIconCallback());