Refactoring

This commit is contained in:
M66B 2019-04-12 09:00:27 +02:00
parent db3f4160d3
commit f9880b5a0d
1 changed files with 6 additions and 2 deletions

View File

@ -205,8 +205,7 @@ public class ServiceSynchronize extends LifecycleService {
break; break;
case "reset": case "reset":
lastLost = 0; onReset();
onReload("reset");
break; break;
case "oneshot_start": case "oneshot_start":
@ -277,6 +276,11 @@ public class ServiceSynchronize extends LifecycleService {
} }
} }
private void onReset() {
lastLost = 0;
onReload("reset");
}
private void onOneshot(boolean start) { private void onOneshot(boolean start) {
AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE); AlarmManager am = (AlarmManager) getSystemService(Context.ALARM_SERVICE);