Small improvement

This commit is contained in:
M66B 2019-12-09 12:43:43 +01:00
parent e51278ed0f
commit 7fcb883786
1 changed files with 7 additions and 7 deletions

View File

@ -689,16 +689,16 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
final PowerManager.WakeLock wlMessage = pm.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, BuildConfig.APPLICATION_ID + ":account." + account.id + ".message");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (account.notify)
account.createNotificationChannel(ServiceSynchronize.this);
else
account.deleteNotificationChannel(ServiceSynchronize.this);
}
try {
wlAccount.acquire();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (account.notify)
account.createNotificationChannel(ServiceSynchronize.this);
else
account.deleteNotificationChannel(ServiceSynchronize.this);
}
long ago = new Date().getTime() - lastLost;
if (ago < RECONNECT_BACKOFF)
try {