mirror of
https://github.com/d4rken-org/capod.git
synced 2026-09-14 18:26:11 -04:00
fix: Remove premature startForegroundService call from App.onCreate()
Calling startMonitor() in App.onCreate() started the foreground service timeout clock before the BroadcastReceiver even ran, consuming timeout budget with post-init work and receiver processing. The service is already started by BluetoothEventReceiver, BootCompletedReceiver, and OverviewViewModel, making this call redundant.
This commit is contained in:
@@ -14,7 +14,7 @@ import eu.darken.capod.common.upgrade.UpgradeRepo
|
||||
import eu.darken.capod.main.ui.widget.WidgetManager
|
||||
import eu.darken.capod.monitor.core.PodMonitor
|
||||
import eu.darken.capod.monitor.core.devicesWithProfiles
|
||||
import eu.darken.capod.monitor.core.worker.MonitorControl
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
@@ -27,7 +27,6 @@ import javax.inject.Inject
|
||||
open class App : Application() {
|
||||
|
||||
@Inject lateinit var autoReporting: AutomaticBugReporter
|
||||
@Inject lateinit var monitorControl: MonitorControl
|
||||
@Inject lateinit var podMonitor: PodMonitor
|
||||
@Inject lateinit var widgetManager: WidgetManager
|
||||
@Inject lateinit var upgradeRepo: UpgradeRepo
|
||||
@@ -41,8 +40,6 @@ open class App : Application() {
|
||||
|
||||
log(TAG) { "onCreate() done! ${Exception().asLog()}" }
|
||||
|
||||
monitorControl.startMonitor(forceStart = true)
|
||||
|
||||
appScope.launch { widgetManager.refreshWidgets() }
|
||||
|
||||
podMonitor.devicesWithProfiles()
|
||||
|
||||
Reference in New Issue
Block a user