Skip to content

Commit

Permalink
Remove state field and setter in AndroidApplicationService (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikJannsen authored Nov 26, 2024
1 parent e6ff6af commit e22db41
Showing 1 changed file with 0 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import bisq.settings.SettingsService
import bisq.support.SupportService
import bisq.trade.TradeService
import bisq.user.UserService
import com.google.common.base.Preconditions
import lombok.Getter
import lombok.Setter
import lombok.extern.slf4j.Slf4j
Expand Down Expand Up @@ -107,7 +106,6 @@ class AndroidApplicationService(androidMemoryReportService: AndroidMemoryReportS
val log: Logger = LoggerFactory.getLogger(ApplicationService::class.java)
}

val state = Observable(State.INITIALIZE_APP)
private val shutDownErrorMessage = Observable<String>()
private val startupErrorMessage = Observable<String>()

Expand Down Expand Up @@ -342,15 +340,6 @@ class AndroidApplicationService(androidMemoryReportService: AndroidMemoryReportS
}
}

private fun setState(newState: State) {
Preconditions.checkArgument(
state.get().ordinal < newState.ordinal,
"New state %s must have a higher ordinal as the current state %s", newState, state.get()
)
state.set(newState)
log.info("New state {}", newState)
}

private fun logError(throwable: Throwable): Boolean {
log.error("Exception at shutdown", throwable)
return false
Expand Down

0 comments on commit e22db41

Please sign in to comment.