Bug 1388396: Use IconRequestBuilder.forActivityStream in AS UI. r=sebastian draft
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 11 Sep 2017 17:27:22 -0700 (2017-09-12)
changeset 664261 b2d8fbf5692b6259176e18f7fc4d72c194210240
parent 664260 46dadbeed206e7cf8666c1c6e97300a3f6c40c23
child 664262 31b39d30c9b682a9f998add9b47d6743375d0c99
push id79654
push usermichael.l.comella@gmail.com
push dateWed, 13 Sep 2017 20:23:12 +0000 (2017-09-13)
reviewerssebastian
bugs1388396
milestone57.0a1
Bug 1388396: Use IconRequestBuilder.forActivityStream in AS UI. r=sebastian MozReview-Commit-ID: jLVtXk0hJZ
mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/StreamOverridablePageIconLayout.java
mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/TopSitesCard.java
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/StreamOverridablePageIconLayout.java
+++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/StreamOverridablePageIconLayout.java
@@ -73,16 +73,17 @@ public class StreamOverridablePageIconLa
                     .centerCrop()
                     .into(imageView);
         } else {
             setUIMode(UIMode.FAVICON_IMAGE);
 
             ongoingFaviconLoad = Icons.with(getContext())
                     .pageUrl(pageURL)
                     .skipNetwork()
+                    .forActivityStream()
                     .build()
                     .execute(this);
         }
     }
 
     @Override
     public void onIconResponse(final IconResponse response) {
         faviconView.updateImage(response);
--- a/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/TopSitesCard.java
+++ b/mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/topsites/TopSitesCard.java
@@ -101,16 +101,17 @@ import java.util.concurrent.Future;
             // Sometimes we get top sites without or with an empty URL - even though we do not allow
             // this anywhere in our UI. However with 'sync' we are not in full control of the data.
             // Whenever the URL is empty or null we just clear a potentially previously set icon.
             faviconView.clearImage();
         } else {
             ongoingIconLoad = Icons.with(itemView.getContext())
                     .pageUrl(topSite.getUrl())
                     .skipNetwork()
+                    .forActivityStream()
                     .build()
                     .execute(this);
         }
 
         final Drawable pinDrawable;
         if (topSite.isPinned()) {
             pinDrawable = DrawableUtil.tintDrawable(itemView.getContext(), R.drawable.as_pin, Color.WHITE);
         } else {