mirror of https://github.com/M66B/FairEmail.git
Fail-safe
This commit is contained in:
parent
7710722b0a
commit
bc811325ab
|
@ -343,7 +343,8 @@ class ImageHelper {
|
||||||
lld.setLevel(1);
|
lld.setLevel(1);
|
||||||
|
|
||||||
boolean slow = true;
|
boolean slow = true;
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
|
||||||
|
try {
|
||||||
// 2G GSM ~14.4 Kbps
|
// 2G GSM ~14.4 Kbps
|
||||||
// G GPRS ~26.8 Kbps
|
// G GPRS ~26.8 Kbps
|
||||||
// E EDGE ~108.8 Kbps
|
// E EDGE ~108.8 Kbps
|
||||||
|
@ -359,6 +360,8 @@ class ImageHelper {
|
||||||
int kbps = caps.getLinkDownstreamBandwidthKbps();
|
int kbps = caps.getLinkDownstreamBandwidthKbps();
|
||||||
slow = (kbps < SLOW_CONNECTION);
|
slow = (kbps < SLOW_CONNECTION);
|
||||||
}
|
}
|
||||||
|
} catch (Throwable ex) {
|
||||||
|
Log.e(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExecutorService executor = (slow ? executor_1 : executor_n);
|
ExecutorService executor = (slow ? executor_1 : executor_n);
|
||||||
|
|
Loading…
Reference in New Issue