From 556997471421866b7aea0281d67774c46c4c02f5 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Tue, 16 Nov 2021 21:45:58 +0100 Subject: [PATCH] log service start --- .../plugins/general/persistentNotification/DummyService.kt | 2 ++ .../java/info/nightscout/androidaps/services/LocationService.kt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt index 3f84d33162..c6167c7949 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt +++ b/app/src/main/java/info/nightscout/androidaps/plugins/general/persistentNotification/DummyService.kt @@ -42,6 +42,7 @@ class DummyService : DaggerService() { // TODO: I guess this was moved here in order to adhere to the 5 seconds rule to call "startForeground" after a Service was called as Foreground service? // As onCreate() is not called every time a service is started, copied to onStartCommand(). try { + aapsLogger.debug("Starting DummyService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}") startForeground(notificationHolder.notificationID, notificationHolder.notification) } catch (e: Exception) { startForeground(4711, Notification()) @@ -66,6 +67,7 @@ class DummyService : DaggerService() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { super.onStartCommand(intent, flags, startId) try { + aapsLogger.debug("Starting DummyService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}") startForeground(notificationHolder.notificationID, notificationHolder.notification) } catch (e: Exception) { startForeground(4711, Notification()) diff --git a/automation/src/main/java/info/nightscout/androidaps/services/LocationService.kt b/automation/src/main/java/info/nightscout/androidaps/services/LocationService.kt index 0acbe925dc..038757bc19 100644 --- a/automation/src/main/java/info/nightscout/androidaps/services/LocationService.kt +++ b/automation/src/main/java/info/nightscout/androidaps/services/LocationService.kt @@ -88,6 +88,7 @@ class LocationService : DaggerService() { override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int { super.onStartCommand(intent, flags, startId) try { + aapsLogger.debug("Starting LocationService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}") startForeground(notificationHolder.notificationID, notificationHolder.notification) } catch (e: Exception) { startForeground(4711, Notification()) @@ -98,6 +99,7 @@ class LocationService : DaggerService() { override fun onCreate() { super.onCreate() try { + aapsLogger.debug("Starting LocationService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}") startForeground(notificationHolder.notificationID, notificationHolder.notification) } catch (e: Exception) { startForeground(4711, Notification())