diff --git a/sonic-android/sdk/src/main/java/com/tencent/sonic/sdk/SonicDataHelper.java b/sonic-android/sdk/src/main/java/com/tencent/sonic/sdk/SonicDataHelper.java index cea3849..de5999a 100644 --- a/sonic-android/sdk/src/main/java/com/tencent/sonic/sdk/SonicDataHelper.java +++ b/sonic-android/sdk/src/main/java/com/tencent/sonic/sdk/SonicDataHelper.java @@ -260,8 +260,15 @@ static boolean setSonicUnavailableTime(String sessionId, long unavailableTime) { sessionData.unAvailableTime = unavailableTime; updateSessionData(db, sessionId, sessionData); return true; + } else { + sessionData = new SessionData(); + sessionData.sessionId = sessionId; + sessionData.eTag = "Unknown"; + sessionData.htmlSha1 = "Unknown"; + sessionData.unAvailableTime = unavailableTime; + insertSessionData(db, sessionId, sessionData); + return true; } - return false; } /**