Closed Bug 1390203 Opened 3 years ago Closed 2 years ago

Only grab highlights images on wifi

Categories

(Firefox for Android :: Awesomescreen, enhancement, P1)

All
Android
enhancement

Tracking

()

RESOLVED FIXED
Firefox 57
Iteration:
1.28
Tracking Status
firefox57 --- fixed

People

(Reporter: mcomella, Assigned: mcomella)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [mobileAS] 1.28)

Attachments

(2 files)

We originally wanted to get these images from Gecko if we had them so we don't download multiple large images (bug 1322501). However, we weren't sure if it was really important so we filed a bug to identify how large these images were (bug 1388415).

However, we don't want to invest time in that stream of bugs so we're going to take a shortcut and only grab these images on wifi.
These bugs add the code to download the image.
Depends on: 1301718, 1390356
Assignee: nobody → michael.l.comella
Comment on attachment 8899928 [details]
Bug 1390203: Only get highlight images on wifi.

https://reviewboard.mozilla.org/r/171264/#review176410

LGTM.

::: mobile/android/base/java/org/mozilla/gecko/activitystream/homepanel/stream/StreamOverridablePageIconLayout.java:65
(Diff revision 1)
> +        final NetworkUtils.ConnectionType connectionType = NetworkUtils.getConnectionType(
> +                (ConnectivityManager) getContext().getSystemService(Context.CONNECTIVITY_SERVICE));
> +        if (connectionType == NetworkUtils.ConnectionType.WIFI &&
> +                !TextUtils.isEmpty(overrideImageURL)) {

nit: Is it time for a NetworkUtils.isWiFi method? :)
Attachment #8899928 - Flags: review?(s.kaspari) → review+
Iteration: --- → 1.28
Whiteboard: [mobileAS] → [mobileAS] 1.28
Priority: P2 → P1
> nit: Is it time for a NetworkUtils.isWiFi method? :)

lol, yeah, maybe.
Attachment #8899928 - Flags: review+ → review?(s.kaspari)
Comment on attachment 8900052 [details]
Bug 1390203: Add NetworkUtils.isWifi.

https://reviewboard.mozilla.org/r/171392/#review176856
Attachment #8900052 - Flags: review?(s.kaspari) → review+
Comment on attachment 8899928 [details]
Bug 1390203: Only get highlight images on wifi.

https://reviewboard.mozilla.org/r/171264/#review176858
Attachment #8899928 - Flags: review?(s.kaspari) → review+
Pushed by michael.l.comella@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/772283005b0d
Add NetworkUtils.isWifi. r=sebastian
https://hg.mozilla.org/integration/autoland/rev/b1779a4ff84a
Only get highlight images on wifi. r=sebastian
I had to back out bug 1390356, and these patches made changes the same files so had to be backed out in https://hg.mozilla.org/integration/autoland/rev/54d1572562d1
Flags: needinfo?(michael.l.comella)
Flags: needinfo?(michael.l.comella)
Pushed by michael.l.comella@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/c3726830fb8d
Add NetworkUtils.isWifi. r=sebastian
https://hg.mozilla.org/integration/autoland/rev/30602859cba7
Only get highlight images on wifi. r=sebastian
https://hg.mozilla.org/mozilla-central/rev/c3726830fb8d
https://hg.mozilla.org/mozilla-central/rev/30602859cba7
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
You need to log in before you can comment on or make changes to this bug.