mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 14:11:00 +00:00
Refactoring
This commit is contained in:
parent
245ce11e21
commit
4706b58232
1 changed files with 13 additions and 13 deletions
|
@ -2517,19 +2517,6 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
private long lastLost = 0;
|
||||
private ExecutorService queue = Executors.newSingleThreadExecutor(Helper.backgroundThreadFactory);
|
||||
|
||||
@Override
|
||||
public void onCapabilitiesChanged(Network network, NetworkCapabilities capabilities) {
|
||||
try {
|
||||
if (!started) {
|
||||
EntityLog.log(ServiceSynchronize.this, "Network " + network + " capabilities " + capabilities);
|
||||
if (suitableNetwork())
|
||||
queue_reload(true, "connect " + network);
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAvailable(Network network) {
|
||||
try {
|
||||
|
@ -2543,6 +2530,19 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCapabilitiesChanged(Network network, NetworkCapabilities capabilities) {
|
||||
try {
|
||||
if (!started) {
|
||||
EntityLog.log(ServiceSynchronize.this, "Network " + network + " capabilities " + capabilities);
|
||||
if (suitableNetwork())
|
||||
queue_reload(true, "connect " + network);
|
||||
}
|
||||
} catch (Throwable ex) {
|
||||
Log.e(ex);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLost(Network network) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue