mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-27 16:33:47 +00:00
parent
d11d15d771
commit
32583890f6
2 changed files with 0 additions and 17 deletions
|
@ -3308,22 +3308,6 @@ class Core {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private long maxIdle = 0;
|
|
||||||
private long lastActivity = 0;
|
|
||||||
|
|
||||||
synchronized void activity() {
|
|
||||||
long now = SystemClock.elapsedRealtime();
|
|
||||||
if (lastActivity > 0 && now - lastActivity > maxIdle) {
|
|
||||||
maxIdle = now - lastActivity;
|
|
||||||
Log.i("Max idle=" + (maxIdle / 1000));
|
|
||||||
}
|
|
||||||
lastActivity = now;
|
|
||||||
}
|
|
||||||
|
|
||||||
long getMaxIdle() {
|
|
||||||
return maxIdle;
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
|
|
|
@ -1020,7 +1020,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
||||||
while (ifolder.isOpen() && state.isRunning() && state.isRecoverable()) {
|
while (ifolder.isOpen() && state.isRunning() && state.isRecoverable()) {
|
||||||
Log.i(folder.name + " do idle");
|
Log.i(folder.name + " do idle");
|
||||||
ifolder.idle(false);
|
ifolder.idle(false);
|
||||||
state.activity();
|
|
||||||
}
|
}
|
||||||
} catch (Throwable ex) {
|
} catch (Throwable ex) {
|
||||||
Log.e(folder.name, ex);
|
Log.e(folder.name, ex);
|
||||||
|
|
Loading…
Reference in a new issue