зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1390203: Only get highlight images on wifi. r=sebastian
MozReview-Commit-ID: FtSDZ6Yu5Ql --HG-- extra : rebase_source : 186637c333da09e2619338d0ad3135418694d50d
This commit is contained in:
Родитель
eb539f8bed
Коммит
982859961f
|
@ -19,6 +19,7 @@ import org.mozilla.gecko.R;
|
|||
import org.mozilla.gecko.icons.IconCallback;
|
||||
import org.mozilla.gecko.icons.IconResponse;
|
||||
import org.mozilla.gecko.icons.Icons;
|
||||
import org.mozilla.gecko.util.NetworkUtils;
|
||||
import org.mozilla.gecko.widget.FaviconView;
|
||||
|
||||
import java.util.concurrent.Future;
|
||||
|
@ -58,7 +59,10 @@ public class StreamOverridablePageIconLayout extends FrameLayout implements Icon
|
|||
public void updateIcon(@NonNull final String pageURL, @Nullable final String overrideImageURL) {
|
||||
cancelPendingRequests();
|
||||
|
||||
if (!TextUtils.isEmpty(overrideImageURL)) {
|
||||
// We don't know how the large the non-favicon images could be (bug 1388415) so for now we're only going
|
||||
// to download them on wifi. Alternatively, we could get these from the Gecko cache (see below).
|
||||
if (NetworkUtils.isWifi(getContext()) &&
|
||||
!TextUtils.isEmpty(overrideImageURL)) {
|
||||
setUIMode(UIMode.NONFAVICON_IMAGE);
|
||||
|
||||
// TODO (bug 1322501): Optimization: since we've already navigated to these pages, there's a chance
|
||||
|
|
Загрузка…
Ссылка в новой задаче