log service start
This commit is contained in:
parent
fb9871507b
commit
5569974714
|
@ -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?
|
// 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().
|
// As onCreate() is not called every time a service is started, copied to onStartCommand().
|
||||||
try {
|
try {
|
||||||
|
aapsLogger.debug("Starting DummyService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}")
|
||||||
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
startForeground(4711, Notification())
|
startForeground(4711, Notification())
|
||||||
|
@ -66,6 +67,7 @@ class DummyService : DaggerService() {
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
super.onStartCommand(intent, flags, startId)
|
super.onStartCommand(intent, flags, startId)
|
||||||
try {
|
try {
|
||||||
|
aapsLogger.debug("Starting DummyService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}")
|
||||||
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
startForeground(4711, Notification())
|
startForeground(4711, Notification())
|
||||||
|
|
|
@ -88,6 +88,7 @@ class LocationService : DaggerService() {
|
||||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||||
super.onStartCommand(intent, flags, startId)
|
super.onStartCommand(intent, flags, startId)
|
||||||
try {
|
try {
|
||||||
|
aapsLogger.debug("Starting LocationService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}")
|
||||||
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
startForeground(4711, Notification())
|
startForeground(4711, Notification())
|
||||||
|
@ -98,6 +99,7 @@ class LocationService : DaggerService() {
|
||||||
override fun onCreate() {
|
override fun onCreate() {
|
||||||
super.onCreate()
|
super.onCreate()
|
||||||
try {
|
try {
|
||||||
|
aapsLogger.debug("Starting LocationService with ID ${notificationHolder.notificationID} notification ${notificationHolder.notification}")
|
||||||
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
startForeground(notificationHolder.notificationID, notificationHolder.notification)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
startForeground(4711, Notification())
|
startForeground(4711, Notification())
|
||||||
|
|
Loading…
Reference in a new issue