Skip to content

Commit

Permalink
chore: code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-fiedler committed Mar 20, 2024
1 parent d144c3b commit 5474f85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions android/src/main/java/com/amplitude/android/Amplitude.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ open class Amplitude(
}

override suspend fun buildInternal(identityConfiguration: IdentityConfiguration) {
session = Session(configuration as Configuration, storage, store)
logger.debug("Configured session. Session=$session")

// Migrations
ApiKeyStorageMigration(this).execute()
if ((this.configuration as Configuration).migrateLegacyData) {
Expand Down Expand Up @@ -89,6 +86,8 @@ open class Amplitude(

// WARNING: Session events need to run after migrations as not to modify `lastEventTime`
// Check if we need to start a new session
session = Session(configuration as Configuration, storage, store)
logger.debug("Configured session. Session=$session")
val sessionEvents = session.startNewSessionIfNeeded(SystemTime.getCurrentTimeMillis(), configuration.sessionId)

val androidTimeline = timeline as Timeline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ class Session(

init {
loadFromStorage()
state?.sessionId = _sessionId.get()
}

private fun loadFromStorage() {
Expand Down

0 comments on commit 5474f85

Please sign in to comment.