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
--- a/mobile/android/base/java/org/mozilla/gecko/home/TwoLinePageRow.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/TwoLinePageRow.java
@@ -269,17 +269,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());