Fixed
Status Update
Comments
ra...@google.com <ra...@google.com> #2
I can reproduce the problem on my end.
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 91554b0079da4009473f7dd9d0a9fbb9ae3e5543
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Mon Mar 02 10:46:43 2020
Stop duplicate copies of WorkRequests from being executed after a request to stop.
* This effects long running work requests only.
Test: Added unit tests. Ran integration test app and verified correct behavior.
Fixes: b/150553353
Change-Id: I07e8100a2082d69befefc36825b26692e2c9dd70
M work/workmanager/src/androidTest/java/androidx/work/impl/foreground/SystemForegroundDispatcherTest.kt
M work/workmanager/src/main/java/androidx/work/impl/Processor.java
M work/workmanager/src/main/java/androidx/work/impl/utils/StopWorkRunnable.java
https://android-review.googlesource.com/1247484
Branch: androidx-master-dev
commit 91554b0079da4009473f7dd9d0a9fbb9ae3e5543
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Mon Mar 02 10:46:43 2020
Stop duplicate copies of WorkRequests from being executed after a request to stop.
* This effects long running work requests only.
Test: Added unit tests. Ran integration test app and verified correct behavior.
Fixes:
Change-Id: I07e8100a2082d69befefc36825b26692e2c9dd70
M work/workmanager/src/androidTest/java/androidx/work/impl/foreground/SystemForegroundDispatcherTest.kt
M work/workmanager/src/main/java/androidx/work/impl/Processor.java
M work/workmanager/src/main/java/androidx/work/impl/utils/StopWorkRunnable.java
Description
Version used: 2.3.2 stable
Devices/Android versions reproduced on: Samsung Galaxy S10e API 28, PIxel XL Emulator API 26
Sample project:
After enqueueing ForegroundWorker with OneTimeWorkRequest that should take 12 minutes and waiting 10 minutes I have observed that the new worker is spawned while the old one is still running. I tried a few approaches: updating service notification with notification manager and with setForeground, coroutine and Rx worker. And I'm still encountering this weird behaviour.
In a next few days I will try to track Workers timers to debug this issue but I have a limited knowledge about