mirror of https://github.com/M66B/FairEmail.git
Added purge wakelock
This commit is contained in:
parent
08601f84d1
commit
1940e45799
|
@ -1360,7 +1360,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
|
|
||||||
forced = true;
|
forced = true;
|
||||||
|
|
||||||
Runnable purge = new Runnable() {
|
final Runnable purge = new Runnable() {
|
||||||
private Long lastQuota = null;
|
private Long lastQuota = null;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1369,6 +1369,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
wlFolder.acquire();
|
||||||
|
|
||||||
// Get quota
|
// Get quota
|
||||||
if (iservice.hasCapability("QUOTA")) {
|
if (iservice.hasCapability("QUOTA")) {
|
||||||
long now = new Date().getTime();
|
long now = new Date().getTime();
|
||||||
|
@ -1405,6 +1407,8 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
((IMAPStore) istore).emptyConnectionPool(false);
|
((IMAPStore) istore).emptyConnectionPool(false);
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(ex);
|
Log.e(ex);
|
||||||
|
} finally {
|
||||||
|
wlFolder.release();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue