More whack-a-mole in AttachmentDownloadService
Bug: 5115008 Change-Id: I6e5236e08331cfd6a9a11868d97bf5caaf68f6fe
This commit is contained in:
parent
36aef9fb74
commit
433b0ed9fe
@ -336,9 +336,11 @@ public class AttachmentDownloadService extends Service implements Runnable {
|
||||
}
|
||||
|
||||
// Don't prefetch if background downloading is disallowed
|
||||
if (!mConnectivityManager.isBackgroundDataAllowed()) return;
|
||||
EmailConnectivityManager ecm = mConnectivityManager;
|
||||
if (ecm == null) return;
|
||||
if (!ecm.isBackgroundDataAllowed()) return;
|
||||
// Don't prefetch unless we're on a WiFi network
|
||||
if (mConnectivityManager.getActiveNetworkType() != ConnectivityManager.TYPE_WIFI) {
|
||||
if (ecm.getActiveNetworkType() != ConnectivityManager.TYPE_WIFI) {
|
||||
return;
|
||||
}
|
||||
// Then, try opportunistic download of appropriate attachments
|
||||
|
Loading…
Reference in New Issue
Block a user