Fixed
Status Update
Comments
ra...@google.com <ra...@google.com> #2
Easy repro: Tap back key during gesture selection.
yo...@gmail.com <yo...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit dc37dddeefb6910a229d81612a60374678e615b4
Author: Steve McKay <smckay@google.com>
Date: Wed Aug 14 23:48:25 2019
Add support for resetting library state in response to CANCEL events and clearing of selection.
Sepcifically:
- BandSelectionHelper#reset
- GestureSelectionHelper#reset
- Clearing Selection in tracker.
- Reset the OperationMonitor.
- Connect explicit clearSelection (as clients call from back button) to reset.
GestureDetector is already listening for CANCEL events, cleans up its own state internally.
Related cleanups:
- Add onSelectionCleared support to SelectionObserver class.
- Guard all runtime state checking behind DEBUG bit (mis-configuration still throws).
- Deprecate support for setting gesture/pointer tooltypes.
- Define more events in TestEvents.
- Cleanup naming and consoliate some tests in BandSelectionHelperTest.
- Remove support POINTER_UP in BandSelectionHelper...POINTER_UP is for secondary pointer
devices only, which is outside of the domain of BandSelectionHelper.
BUG: 137460699
Test: Passing, added new test related to reset behavior.
Change-Id: Ie7127571dfa95f571ac754b3ae58e03bb153cbe8
M recyclerview/recyclerview-selection/api/1.1.0-alpha07.txt
M recyclerview/recyclerview-selection/api/current.txt
M recyclerview/recyclerview-selection/api/public_plus_experimental_1.1.0-alpha07.txt
M recyclerview/recyclerview-selection/api/public_plus_experimental_current.txt
M recyclerview/recyclerview-selection/api/restricted_1.1.0-alpha07.txt
M recyclerview/recyclerview-selection/api/restricted_current.txt
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/BandSelectionHelperTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/DefaultSelectionTrackerTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/DefaultSelectionTracker_SingleSelectTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/GestureSelectionHelperTest.java
A recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/ResetMangerTest.java
A recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/SelectionTrackerTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/TouchInputHandlerTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/testing/TestEvents.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/testing/TestRunnable.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/testing/TestSelectionObserver.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/BandSelectionHelper.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/DefaultSelectionTracker.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/GestureDetectorOnItemTouchListenerAdapter.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/GestureSelectionHelper.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/MotionEvents.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/MouseInputHandler.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/OperationMonitor.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/Range.java
A recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/ResetManager.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/SelectionTracker.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/TouchInputHandler.java
https://android-review.googlesource.com/1103351
Branch: androidx-master-dev
commit dc37dddeefb6910a229d81612a60374678e615b4
Author: Steve McKay <smckay@google.com>
Date: Wed Aug 14 23:48:25 2019
Add support for resetting library state in response to CANCEL events and clearing of selection.
Sepcifically:
- BandSelectionHelper#reset
- GestureSelectionHelper#reset
- Clearing Selection in tracker.
- Reset the OperationMonitor.
- Connect explicit clearSelection (as clients call from back button) to reset.
GestureDetector is already listening for CANCEL events, cleans up its own state internally.
Related cleanups:
- Add onSelectionCleared support to SelectionObserver class.
- Guard all runtime state checking behind DEBUG bit (mis-configuration still throws).
- Deprecate support for setting gesture/pointer tooltypes.
- Define more events in TestEvents.
- Cleanup naming and consoliate some tests in BandSelectionHelperTest.
- Remove support POINTER_UP in BandSelectionHelper...POINTER_UP is for secondary pointer
devices only, which is outside of the domain of BandSelectionHelper.
BUG: 137460699
Test: Passing, added new test related to reset behavior.
Change-Id: Ie7127571dfa95f571ac754b3ae58e03bb153cbe8
M recyclerview/recyclerview-selection/api/1.1.0-alpha07.txt
M recyclerview/recyclerview-selection/api/current.txt
M recyclerview/recyclerview-selection/api/public_plus_experimental_1.1.0-alpha07.txt
M recyclerview/recyclerview-selection/api/public_plus_experimental_current.txt
M recyclerview/recyclerview-selection/api/restricted_1.1.0-alpha07.txt
M recyclerview/recyclerview-selection/api/restricted_current.txt
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/BandSelectionHelperTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/DefaultSelectionTrackerTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/DefaultSelectionTracker_SingleSelectTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/GestureSelectionHelperTest.java
A recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/ResetMangerTest.java
A recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/SelectionTrackerTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/TouchInputHandlerTest.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/testing/TestEvents.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/testing/TestRunnable.java
M recyclerview/recyclerview-selection/src/androidTest/java/androidx/recyclerview/selection/testing/TestSelectionObserver.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/BandSelectionHelper.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/DefaultSelectionTracker.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/GestureDetectorOnItemTouchListenerAdapter.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/GestureSelectionHelper.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/MotionEvents.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/MouseInputHandler.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/OperationMonitor.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/Range.java
A recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/ResetManager.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/SelectionTracker.java
M recyclerview/recyclerview-selection/src/main/java/androidx/recyclerview/selection/TouchInputHandler.java
ey...@gmail.com <ey...@gmail.com> #4
Aiming to have a 1.1 beta release out soon including this fix.
All defensive check stability issues should be resolved with this CL.
All defensive check stability issues should be resolved with this CL.
su...@google.com <su...@google.com> #5
#3: This is exactly what an internal implementation would look like because the backing JobScheduler does not support initial delays on periodic work. I realize that WorkManager doing it for you is nicer, which is why this feature request is still open, but it may take us some time to get to it.
#4: Please file a separate bug if that doesn't work for you.
#4: Please file a separate bug if that doesn't work for you.
ey...@gmail.com <ey...@gmail.com> #6
#5: How could I debug the behaviour of this chain of Work?
su...@google.com <su...@google.com> #7
Use logcat, or use the various getStatus methods to see what's going on. File a bug with a bugreport and sample code that results in the problem.
ha...@gmail.com <ha...@gmail.com> #8
It would be nice to see setInitialDelay() on PeriodicWorkRequest.Builder in the next version, Thanks
dr...@gmail.com <dr...@gmail.com> #9
Just a "+1" "me too" to add another voice to this... would make so much sense to be able to have setInitialDelay() on PeriodicWorkRequest.Builder
yo...@gmail.com <yo...@gmail.com> #10
Android must list down the challenges of Periodic Work request in there documents, I am tracking Work Manager since it was alpha.Here are the limitations of Priodic Work request:
1. Periodic work request does not support setInitialDelay.
2. Periodic Work request does not support the Chining.
1. Periodic work request does not support setInitialDelay.
2. Periodic Work request does not support the Chining.
su...@google.com <su...@google.com> #11
Both of these items are listed in the official documentation for PeriodicWorkRequest: https://developer.android.com/reference/androidx/work/PeriodicWorkRequest
"Periodic work has a minimum interval of 15 minutes and it cannot have an initial delay."
"Periodic work cannot be part of a chain or graph of work."
"Periodic work has a minimum interval of 15 minutes and it cannot have an initial delay."
"Periodic work cannot be part of a chain or graph of work."
ad...@cashapp.biz <ad...@cashapp.biz> #12
Still not supported...
I feel that many people need it...would make so much sense to be able to have setInitialDelay() on PeriodicWorkRequest.Builder
I feel that many people need it...would make so much sense to be able to have setInitialDelay() on PeriodicWorkRequest.Builder
ra...@google.com <ra...@google.com> #13
Setting a flex period effectively delays a PeriodicWorkRequest.
bo...@gmail.com <bo...@gmail.com> #14
+1 from me too, with an extra option to limit the number of repeats, for example, run a periodic job daily for 7 days and then stop.
ka...@gmail.com <ka...@gmail.com> #15
+1 for setInitailDelay() and limitNumberOfFires() for Periodic work request!
ha...@gmail.com <ha...@gmail.com> #16
What is the best solution for now to setInitailDelay() ?
pm...@google.com <pm...@google.com> #17
You can use a PeriodicWorkRequest.Builder with a flex Period as suggested in #13.
This behaviour is documented:https://developer.android.com/reference/androidx/work/PeriodicWorkRequest.Builder#PeriodicWorkRequest.Builder(java.lang.Class%3C?%20extends%20androidx.work.ListenableWorker%3E,%20long,%20java.util.concurrent.TimeUnit,%20long,%20java.util.concurrent.TimeUnit)
The call creates a PeriodicWorkRequest to run periodically once within the flex period of every interval period.
This behaviour is documented:
The call creates a PeriodicWorkRequest to run periodically once within the flex period of every interval period.
ha...@gmail.com <ha...@gmail.com> #18
What I mean by setInitailDelay() is the delay before the first run then a fixed periodic delay.
ra...@google.com <ra...@google.com>
ap...@google.com <ap...@google.com> #19
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 25dc21990f5b0d606f3141b9120516b880599b6c
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Mon Apr 29 10:27:18 2019
Add support for initialDelays for PeriodicWorkRequests.
Test: Additional WorkSpecTest unit tests.
Integration tests on API 23, and API 21.
Fixes: b/111404867
Change-Id: I9eae1c7cf527c231b831f22c6a2d10089d6a63c9
M work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
M work/integration-tests/testapp/src/main/res/layout/activity_main.xml
M work/integration-tests/testapp/src/main/res/values/strings.xml
M work/workmanager/api/2.1.0-alpha01.txt
M work/workmanager/api/current.txt
M work/workmanager/src/androidTest/java/androidx/work/WorkSpecTest.java
M work/workmanager/src/main/java/androidx/work/OneTimeWorkRequest.java
M work/workmanager/src/main/java/androidx/work/WorkRequest.java
M work/workmanager/src/main/java/androidx/work/impl/WorkerWrapper.java
M work/workmanager/src/main/java/androidx/work/impl/background/systemjob/SystemJobScheduler.java
M work/workmanager/src/main/java/androidx/work/impl/model/WorkSpec.java
https://android-review.googlesource.com/953484
https://goto.google.com/android-sha1/25dc21990f5b0d606f3141b9120516b880599b6c
Branch: androidx-master-dev
commit 25dc21990f5b0d606f3141b9120516b880599b6c
Author: Rahul Ravikumar <rahulrav@google.com>
Date: Mon Apr 29 10:27:18 2019
Add support for initialDelays for PeriodicWorkRequests.
Test: Additional WorkSpecTest unit tests.
Integration tests on API 23, and API 21.
Fixes:
Change-Id: I9eae1c7cf527c231b831f22c6a2d10089d6a63c9
M work/integration-tests/testapp/src/main/java/androidx/work/integration/testapp/MainActivity.java
M work/integration-tests/testapp/src/main/res/layout/activity_main.xml
M work/integration-tests/testapp/src/main/res/values/strings.xml
M work/workmanager/api/2.1.0-alpha01.txt
M work/workmanager/api/current.txt
M work/workmanager/src/androidTest/java/androidx/work/WorkSpecTest.java
M work/workmanager/src/main/java/androidx/work/OneTimeWorkRequest.java
M work/workmanager/src/main/java/androidx/work/WorkRequest.java
M work/workmanager/src/main/java/androidx/work/impl/WorkerWrapper.java
M work/workmanager/src/main/java/androidx/work/impl/background/systemjob/SystemJobScheduler.java
M work/workmanager/src/main/java/androidx/work/impl/model/WorkSpec.java
sp...@gmail.com <sp...@gmail.com> #20
still can't rely on it :(
I calculate millis to midnight and schedule a daily backup with PeriodicWorkRequest (should happen each 24h), and it just won't fire up the Worker.
When I remove setInitialDelay() call, PeriodicWorkRequest - it works!
classic
I calculate millis to midnight and schedule a daily backup with PeriodicWorkRequest (should happen each 24h), and it just won't fire up the Worker.
When I remove setInitialDelay() call, PeriodicWorkRequest - it works!
classic
Description