Small improvement

pull/169/head
M66B 6 years ago
parent e51278ed0f
commit 7fcb883786

@ -689,16 +689,16 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
final PowerManager.WakeLock wlMessage = pm.newWakeLock( final PowerManager.WakeLock wlMessage = pm.newWakeLock(
PowerManager.PARTIAL_WAKE_LOCK, BuildConfig.APPLICATION_ID + ":account." + account.id + ".message"); 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 { try {
wlAccount.acquire(); 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; long ago = new Date().getTime() - lastLost;
if (ago < RECONNECT_BACKOFF) if (ago < RECONNECT_BACKOFF)
try { try {

Loading…
Cancel
Save