in src/Session/Session.cs [155:187]
public void Resume()
{
lock (_lock)
{
if (this.StopTime == null)
{
//this may sometimes be a valid scenario e.g when the applciation starts
_logger.InfoFormat("Call Resume() without calling Pause() first. But this can be valid opertion only when MobileAnalyticsManager instance is created.");
return;
}
DateTime currentTime = AWSSDKUtils.CorrectedUtcNow;
if (this.StopTime.Value < currentTime)
{
// new session
if (Convert.ToInt64((currentTime - this.StopTime.Value).TotalMilliseconds) > _maConfig.SessionTimeout * 1000)
{
StopSessionHelper();
NewSessionHelper();
}
// resume old session
else
{
ResumeSessionHelper();
}
}
else
{
InvalidOperationException e = new InvalidOperationException();
_logger.Error(e, "Session stop time is earlier than start time !");
}
}
}