Increase wakelock timeout on SSE event

This commit is contained in:
sim 2022-02-22 22:43:43 +01:00
parent 68dc14a95a
commit fb84ec151a

View File

@ -41,7 +41,7 @@ class SSEListener (val context: Context) : EventSourceListener() {
override fun onEvent(eventSource: EventSource, id: String?, type: String?, data: String) { override fun onEvent(eventSource: EventSource, id: String?, type: String?, data: String) {
Log.d(TAG, "New SSE message event=$type message=$data") Log.d(TAG, "New SSE message event=$type message=$data")
StartService.wakeLock?.acquire(10000L /*10 secs*/) StartService.wakeLock?.acquire(30000L /*30 secs*/)
lastEventDate = Calendar.getInstance() lastEventDate = Calendar.getInstance()
when (type) { when (type) {