|
|
|
@ -64,6 +64,8 @@ import com.sun.mail.imap.IMAPStore;
|
|
|
|
|
import com.sun.mail.imap.protocol.IMAPProtocol;
|
|
|
|
|
import com.sun.mail.imap.protocol.IMAPResponse;
|
|
|
|
|
|
|
|
|
|
import net.openid.appauth.AuthState;
|
|
|
|
|
|
|
|
|
|
import org.json.JSONObject;
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
@ -2356,7 +2358,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
|
|
|
|
|
|
|
|
|
|
if (!account.isTransient(this)) {
|
|
|
|
|
Long expirationTime = iservice.getAccessTokenExpirationTime();
|
|
|
|
|
if (expirationTime != null && expirationTime < trigger) {
|
|
|
|
|
if (expirationTime != null &&
|
|
|
|
|
expirationTime < trigger &&
|
|
|
|
|
expirationTime > new Date().getTime()) {
|
|
|
|
|
expirationTime += AuthState.EXPIRY_TIME_TOLERANCE_MS;
|
|
|
|
|
EntityLog.log(this, EntityLog.Type.Debug, "Expedite keep alive" +
|
|
|
|
|
" from " + new Date(trigger) + " to " + new Date(expirationTime));
|
|
|
|
|
trigger = expirationTime;
|
|
|
|
|