Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
I forgot to mention that my Woker returns Result.SUCCESS always.
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.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
ap...@google.com <ap...@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())
Description
Currently for queries like `SELCT *` we can use return type List<Model>. Can we also support ArrayMap<String, Model> (for TEXT type primary key) or ArrayMap<Long, Model> (for INTEGER type primary key). This will make traversing faster in this list of elements.
I haven't tried HashMap but support, that would also be great.
SparseArray in case of INTEGER type primary key can also make sense.