1.解决时间回退未立刻发生请求问题

This commit is contained in:
2026-03-05 19:17:06 +08:00
parent 53dbef8f48
commit 4ae70fd9ef

View File

@@ -167,6 +167,10 @@ public class SystemService extends Service implements AppnetCallback, NetStateCh
handler.sendEmptyMessageDelayed(WHAT_PERIODIC_REQUEST, 60 * 60 * 1000);
return;
}
if(currentTime<lastSuccessTime){
handler.sendEmptyMessage(WHAT_PERIODIC_REQUEST);
return;
}
long nextRequestTime = lastSuccessTime + REQUEST_INTERVAL;
long delay = Math.max(0, nextRequestTime - currentTime);