Fixed
Status Update
Comments
da...@google.com <da...@google.com>
da...@google.com <da...@google.com> #2
I forgot to mention that my Woker returns Result.SUCCESS always.
ph...@gmail.com <ph...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 05f2d67cc04c5f76bee122b9e1e23ca1bf61a326
Author: Sumir Kataria <sumir@google.com>
Date: Tue Aug 21 16:36:05 2018
Fix periodic work so it executes repeatedly.
Processor.onExecuted is the wrong place for cancelling things in
other schedulers. It doesn't have the proper information about
what needs to be cancelled. For example, PeriodicWork should NOT
be cancelled. This should be done right before Schedulers.schedule
at the end of WorkerWrapper.
Bug: 112859683
Test: Added new tests for API 22-, manually tested using
integration app for 23+ since JobScheduler enforces a 15 minute
limit between executions
Change-Id: Ia0e6e17367fbc2493339b9b1275453267c571580
M work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
M work/workmanager/src/main/java/androidx/work/impl/Processor.java
M work/workmanager/src/main/java/androidx/work/impl/WorkerWrapper.java
https://android-review.googlesource.com/735827
https://goto.google.com/android-sha1/05f2d67cc04c5f76bee122b9e1e23ca1bf61a326
Branch: androidx-master-dev
commit 05f2d67cc04c5f76bee122b9e1e23ca1bf61a326
Author: Sumir Kataria <sumir@google.com>
Date: Tue Aug 21 16:36:05 2018
Fix periodic work so it executes repeatedly.
Processor.onExecuted is the wrong place for cancelling things in
other schedulers. It doesn't have the proper information about
what needs to be cancelled. For example, PeriodicWork should NOT
be cancelled. This should be done right before Schedulers.schedule
at the end of WorkerWrapper.
Bug: 112859683
Test: Added new tests for API 22-, manually tested using
integration app for 23+ since JobScheduler enforces a 15 minute
limit between executions
Change-Id: Ia0e6e17367fbc2493339b9b1275453267c571580
M work/workmanager/src/androidTest/java/androidx/work/impl/WorkManagerImplTest.java
M work/workmanager/src/main/java/androidx/work/impl/Processor.java
M work/workmanager/src/main/java/androidx/work/impl/WorkerWrapper.java
da...@google.com <da...@google.com> #4
I am experiencing the same problem using the following code:
val myWorker = PeriodicWorkRequestBuilder<MyWorker>(15, TimeUnit.MINUTES)
myWorker.addTag(NEWSFEED_SYNC_WORKER_ID)
val constraints = Constraints.Builder()
.setRequiredNetworkType(NetworkType.CONNECTED)
.build()
myWorker.setConstraints(constraints)
WorkManager.getInstance().enqueue(myWorker.build())
val myWorker = PeriodicWorkRequestBuilder<MyWorker>(15, TimeUnit.MINUTES)
myWorker.addTag(NEWSFEED_SYNC_WORKER_ID)
val constraints = Constraints.Builder()
.setRequiredNetworkType(NetworkType.CONNECTED)
.build()
myWorker.setConstraints(constraints)
WorkManager.getInstance().enqueue(myWorker.build())
cm...@gmail.com <cm...@gmail.com> #5
The fix will be available in alpha08.
Description
@Insert
fun addBook(book: Book) : Completable
we should expand this support for prepared queries:
@Query("INSERT INTO BOOK (id, name) VALUES (1, 'A Song of Ice and Fire')")
fun addAwesomeBook() : Completable