Bug 1310622 - Display the item as-is but do not load an icon if we do not have a page URL. r=sebastian, a=jcristau
authorNevin Chen <cnevinchen@gmail.com>
Tue, 13 Dec 2016 13:18:55 +0800
changeset 353670 e8678c828e53f1d111d2c84cf980eb7fafba9c56
parent 353669 ada364f7fa71a42a7f8bf5bcbc4b557b4681a9e3
child 353671 742559e3393fb7dd29e2a1072a583fbaace1c2c7
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian, jcristau
bugs1310622
milestone52.0a2
Bug 1310622 - Display the item as-is but do not load an icon if we do not have a page URL. r=sebastian, a=jcristau 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
@@ -262,17 +262,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());