This commit is contained in:
arm64v8a 2023-07-01 21:30:44 +09:00
parent c06df8d251
commit da682b1dd4
2 changed files with 3 additions and 2 deletions

View File

@ -71,8 +71,9 @@ class BaseService {
fun changeState(s: State, msg: String? = null) { fun changeState(s: State, msg: String? = null) {
if (state == s && msg == null) return if (state == s && msg == null) return
binder.stateChanged(s, msg)
state = s state = s
DataStore.serviceState = s
binder.stateChanged(s, msg)
} }
} }

View File

@ -13,7 +13,7 @@ import moe.matsuri.nb4a.TempDatabase
object DataStore : OnPreferenceDataStoreChangeListener { object DataStore : OnPreferenceDataStoreChangeListener {
// share service state in main process // share service state in main & bg process
@Volatile @Volatile
var serviceState = BaseService.State.Idle var serviceState = BaseService.State.Idle