Fixed
Status Update
Comments
su...@google.com <su...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit a071470cde57cf7eb6e39a67d331d716a0f8b842
Author: Ian Lake <ilake@google.com>
Date: Wed Jan 15 14:01:37 2020
Add SpecialEffectsController infrastructure
"Special Effects" is the blanket term for
Animation, Animator, framework Transition, and
AndroidX Transition that Fragments currently support.
Add the infrastructure around a SpecialEffectsController
which would operate on the container (i.e., ViewGroup)
level and coordinate all of the special effects.
This will eventually allow us to track the
postponed state at the container level.
Currently all APIs are purposefully package private
as they should not be used by external developers
at this time.
BUG: 147749580
Test: new test suites pass
Change-Id: I1e209bb4f55c21aa01afb49035d41f5b8d7d3eca
A fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
A fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
A fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsControllerFactory.java
M fragment/fragment/src/main/res/values/ids.xml
M jetifier/jetifier/migration.config
https://android-review.googlesource.com/1209367
Branch: androidx-master-dev
commit a071470cde57cf7eb6e39a67d331d716a0f8b842
Author: Ian Lake <ilake@google.com>
Date: Wed Jan 15 14:01:37 2020
Add SpecialEffectsController infrastructure
"Special Effects" is the blanket term for
Animation, Animator, framework Transition, and
AndroidX Transition that Fragments currently support.
Add the infrastructure around a SpecialEffectsController
which would operate on the container (i.e., ViewGroup)
level and coordinate all of the special effects.
This will eventually allow us to track the
postponed state at the container level.
Currently all APIs are purposefully package private
as they should not be used by external developers
at this time.
BUG: 147749580
Test: new test suites pass
Change-Id: I1e209bb4f55c21aa01afb49035d41f5b8d7d3eca
A fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
A fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
A fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
A fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsControllerFactory.java
M fragment/fragment/src/main/res/values/ids.xml
M jetifier/jetifier/migration.config
dr...@gmail.com <dr...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d990bffa6728272e139e1b5d58e764e9197b1adc
Author: Ian Lake <ilake@google.com>
Date: Thu Jan 16 14:05:14 2020
Find the appropriate SpecialEffectsControllerFactory
Instead of requiring each call to
getOrCreateController() require passing in the
factory, use findFragmentManager() to find the
containing FragmentManager and get the factory from
it.
Test: new test passes
BUG: 147749580
Change-Id: I44f747ba84feb2911a8d0811e40d1b46644429a5
M fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1210675
Branch: androidx-master-dev
commit d990bffa6728272e139e1b5d58e764e9197b1adc
Author: Ian Lake <ilake@google.com>
Date: Thu Jan 16 14:05:14 2020
Find the appropriate SpecialEffectsControllerFactory
Instead of requiring each call to
getOrCreateController() require passing in the
factory, use findFragmentManager() to find the
containing FragmentManager and get the factory from
it.
Test: new test passes
BUG: 147749580
Change-Id: I44f747ba84feb2911a8d0811e40d1b46644429a5
M fragment/fragment/src/androidTest/java/androidx/fragment/app/DefaultSpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
ra...@google.com <ra...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 62e13263d9ee368a255cfb7db73eba061ca85f9c
Author: Ian Lake <ilake@google.com>
Date: Fri Jan 17 13:09:12 2020
Allow cancellation of special effects operations
Pipe through a CancellationSignal to Operation
so that a SpecialEffectsController can handle
cancellation.
Test: new test passes
BUG: 147749580
Change-Id: Iff9525a3d3e079a3b0b6818e43e6efdb16207a7a
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1212445
Branch: androidx-master-dev
commit 62e13263d9ee368a255cfb7db73eba061ca85f9c
Author: Ian Lake <ilake@google.com>
Date: Fri Jan 17 13:09:12 2020
Allow cancellation of special effects operations
Pipe through a CancellationSignal to Operation
so that a SpecialEffectsController can handle
cancellation.
Test: new test passes
BUG: 147749580
Change-Id: Iff9525a3d3e079a3b0b6818e43e6efdb16207a7a
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
dr...@gmail.com <dr...@gmail.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 9ea0884726565254629ff5c99ec919f56e0af1d9
Author: Ian Lake <ilake@google.com>
Date: Fri Jan 17 11:09:14 2020
Allow enqueuing special effects operations
Build the initial infrastructure for enqueuing
ADD and REMOVE operations to a SpecialEffectsController.
This currently doesn't change any runtime behavior
since DefaultSpecialEffectsController doesn't actually
do anything and FragmentStateManager isn't used to
move Fragments beyond CREATED with moveToExpectedState()
in production code.
Cancellation will be handled in a follow up CL.
Test: new SpecialEffectsControllerTest tests pass
BUG: 147749580
Change-Id: I6a3009de80419fd878f2f838bf8e234c20b933ae
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1212444
Branch: androidx-master-dev
commit 9ea0884726565254629ff5c99ec919f56e0af1d9
Author: Ian Lake <ilake@google.com>
Date: Fri Jan 17 11:09:14 2020
Allow enqueuing special effects operations
Build the initial infrastructure for enqueuing
ADD and REMOVE operations to a SpecialEffectsController.
This currently doesn't change any runtime behavior
since DefaultSpecialEffectsController doesn't actually
do anything and FragmentStateManager isn't used to
move Fragments beyond CREATED with moveToExpectedState()
in production code.
Cancellation will be handled in a follow up CL.
Test: new SpecialEffectsControllerTest tests pass
BUG: 147749580
Change-Id: I6a3009de80419fd878f2f838bf8e234c20b933ae
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
ra...@google.com <ra...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d67221893efc073415220d4d3635f159e728b905
Author: Ian Lake <ilake@google.com>
Date: Tue Jan 21 16:49:50 2020
Add isAwaitingCompletion() API
Build the infrastructure for allowing the
FragmentStateManager to check whether a
SpecialEffectsController is still awaiting
completion of queued up / executing
operations.
Test: updated tests to call new API
BUG: 147749580
Change-Id: I6ebd563c505dc2e7b65ced4932316986c478a8cf
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1214213
Branch: androidx-master-dev
commit d67221893efc073415220d4d3635f159e728b905
Author: Ian Lake <ilake@google.com>
Date: Tue Jan 21 16:49:50 2020
Add isAwaitingCompletion() API
Build the infrastructure for allowing the
FragmentStateManager to check whether a
SpecialEffectsController is still awaiting
completion of queued up / executing
operations.
Test: updated tests to call new API
BUG: 147749580
Change-Id: I6ebd563c505dc2e7b65ced4932316986c478a8cf
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
dr...@gmail.com <dr...@gmail.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 974d9e0f0f1ca4108fa653302c239f9025dcd0d9
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 07 15:46:17 2020
Add animations to DefaultSpecialEffectsController
Build the base for running Animations / Animators
in DefaultSpecialEffectsController, correctly only
calling complete() when they finish.
Test: visual inspection, comparing the code to the existing code
BUG: 147749580
Change-Id: Ib0eaeb34bfac7ca5e32b3feea9a2730388dcfd60
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentAnim.java
https://android-review.googlesource.com/1230307
Branch: androidx-master-dev
commit 974d9e0f0f1ca4108fa653302c239f9025dcd0d9
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 07 15:46:17 2020
Add animations to DefaultSpecialEffectsController
Build the base for running Animations / Animators
in DefaultSpecialEffectsController, correctly only
calling complete() when they finish.
Test: visual inspection, comparing the code to the existing code
BUG: 147749580
Change-Id: Ib0eaeb34bfac7ca5e32b3feea9a2730388dcfd60
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentAnim.java
ra...@google.com <ra...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d08aad2c5c5da3127969d4243e93ea8f0e8eccd3
Author: Ian Lake <ilake@google.com>
Date: Tue Feb 11 15:36:30 2020
Add initial infrastructure for transitions
Allow DefaultSpecialEffectsController to
start framework or AndroidX transitions.
This just pipes the Fragment APIs through to
beginDelayedTransition(). It does not currently
handle shared element transitions.
Test: visual inspection, comparing the code to the existing code
BUG: 147749580
Change-Id: Ieb9b9de9bafd59d4a6b9036df389cff263cd737e
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
https://android-review.googlesource.com/1232694
Branch: androidx-master-dev
commit d08aad2c5c5da3127969d4243e93ea8f0e8eccd3
Author: Ian Lake <ilake@google.com>
Date: Tue Feb 11 15:36:30 2020
Add initial infrastructure for transitions
Allow DefaultSpecialEffectsController to
start framework or AndroidX transitions.
This just pipes the Fragment APIs through to
beginDelayedTransition(). It does not currently
handle shared element transitions.
Test: visual inspection, comparing the code to the existing code
BUG: 147749580
Change-Id: Ieb9b9de9bafd59d4a6b9036df389cff263cd737e
M fragment/fragment/src/main/java/androidx/fragment/app/DefaultSpecialEffectsController.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentTransition.java
dr...@gmail.com <dr...@gmail.com> #9
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 9c458049e7543914de98760102017b10dd04068e
Author: Ian Lake <ilake@google.com>
Date: Tue Feb 18 12:57:03 2020
Add cancelAllOperations() to SpecialEffectsController
Provide an API for cancelling all operations
(both pending and being executed) for a
SpecialEffectsController.
Test: new tests pass
BUG: 147749580
Change-Id: Id90f270869470bd44d73163a84343cf2cda3cd47
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1238926
Branch: androidx-master-dev
commit 9c458049e7543914de98760102017b10dd04068e
Author: Ian Lake <ilake@google.com>
Date: Tue Feb 18 12:57:03 2020
Add cancelAllOperations() to SpecialEffectsController
Provide an API for cancelling all operations
(both pending and being executed) for a
SpecialEffectsController.
Test: new tests pass
BUG: 147749580
Change-Id: Id90f270869470bd44d73163a84343cf2cda3cd47
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
ra...@google.com <ra...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 4d3bac24c5a77c5ab5624795afa709b3f265bf74
Author: Ian Lake <ilake@google.com>
Date: Tue Feb 25 15:47:06 2020
Add infrastructure to fully switch to FragmentStateManager
Add the initial logic to fully replace all usages of
moveToState() with FragmentStateManager and its
moveToExpectedState().
Enabling this flag currently causes many tests to fail
(due to work not being completed on b/147749580 ), but
this infrastructure will allow us to confirm our fixes
are actually applied while iterating through those
outstanding issues.
Test: tests all pass with USE_STATE_MANAGER = false
BUG: 139536619
Change-Id: I84340091ce1b0bcc3e26051e25a12d7b38b860c4
M fragment/fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStore.java
https://android-review.googlesource.com/1243715
Branch: androidx-master-dev
commit 4d3bac24c5a77c5ab5624795afa709b3f265bf74
Author: Ian Lake <ilake@google.com>
Date: Tue Feb 25 15:47:06 2020
Add infrastructure to fully switch to FragmentStateManager
Add the initial logic to fully replace all usages of
moveToState() with FragmentStateManager and its
moveToExpectedState().
Enabling this flag currently causes many tests to fail
(due to work not being completed on
this infrastructure will allow us to confirm our fixes
are actually applied while iterating through those
outstanding issues.
Test: tests all pass with USE_STATE_MANAGER = false
BUG: 139536619
Change-Id: I84340091ce1b0bcc3e26051e25a12d7b38b860c4
M fragment/fragment/src/main/java/androidx/fragment/app/BackStackRecord.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStore.java
ap...@google.com <ap...@google.com> #11
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 56a9dc625ea8a9f35569549b4c2f24c1fbc7ff48
Author: Ian Lake <ilake@google.com>
Date: Mon Mar 02 15:32:16 2020
Add infrastructure for awaiting enter/exit effects
Add new states for awaiting enter effects
(which block going to RESUMED) and awaiting
exit effects (which block going to CREATED).
Changed isAwaitingCompletion() to
getAwaitingCompletionType() to know what
type of Operation is uncompleted.
Test: existing tests pass
BUG: 147749580
Change-Id: Ifc28f62dfaadbcd222e3f2d8cf4a21e7eacf6091
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
https://android-review.googlesource.com/1248227
Branch: androidx-master-dev
commit 56a9dc625ea8a9f35569549b4c2f24c1fbc7ff48
Author: Ian Lake <ilake@google.com>
Date: Mon Mar 02 15:32:16 2020
Add infrastructure for awaiting enter/exit effects
Add new states for awaiting enter effects
(which block going to RESUMED) and awaiting
exit effects (which block going to CREATED).
Changed isAwaitingCompletion() to
getAwaitingCompletionType() to know what
type of Operation is uncompleted.
Test: existing tests pass
BUG: 147749580
Change-Id: Ifc28f62dfaadbcd222e3f2d8cf4a21e7eacf6091
M fragment/fragment/src/androidTest/java/androidx/fragment/app/SpecialEffectsControllerTest.kt
M fragment/fragment/src/main/java/androidx/fragment/app/Fragment.java
M fragment/fragment/src/main/java/androidx/fragment/app/FragmentStateManager.java
M fragment/fragment/src/main/java/androidx/fragment/app/SpecialEffectsController.java
Description
When I set up a periodic job, I want the first in the series to be performed INSTANTLY (the user expects it... they hit a button and are waiting for an immediate result), and then for subsequent ones to be performed based on the periodic schedule (more vague timings is fine... the user is no longer waiting).
When you set up a periodic work request *without* a flex interval, it can run anytime in the set interval, i.e. from NOW until the end of the interval. If the device is awake when the periodic work request is scheduled, which is the case for me, I find that the first work in the series is generally performed at the START of the interval, i.e. NOW... though "NOW" may not be instantly (it's up to the device to decide... may be delayed a few seconds).
Because it cannot be guaranteed that the first periodic work will be performed *instantly*, instead I do an explicit call to the work-performing function outside of the WorkManager realm, and put a flexInterval on the periodic work of 5 mins so that the first periodic work will certainly not be performed straight away, but instead it will be near the end of the first period, most likely 5 mins before the end. This is not quite ideal (first gap between work runs is not quite a full interval) but it's OK... the user won't care or even notice it runs 5 mins "early" the first time.
Now, I thought that the ability to set an "initialDelay" in 2.1.0 would solve my problems... so that I could:
(a) still make an explicit call to the work-performing function to do the immediate work, guaranteed to be NOW (the user expects that)
(b) set up a periodic work request WITHOUT flexInterval (i.e. use the whole interval) and WITH an initial delay equal to the period "interval"
That way, I get the immediate work done, and then after "interval" the periodic work request is scheduled, and because (let's assume) the device is still awake, the first periodic work will likely perform at the START of the interval, i.e. almost straight away, i.e. pretty close to exactly one "interval" after the user set the schedule going.
BUT I'm not finding that. Let's say that "interval" of the periodic work is 15 mins, and I set an "initial delay" also of 15 mins, and I set this going when the user hits the button. I find that the immediate work is performed at 0 mins (triggered explicitly, not by WorkManager, so that's as expected), then at 15 mins NOTHING happens, and only at 30 mins does the first periodic work actually run.
It seems that either the first periodic work happens at the END of the first interval (15-30 mins) and not the start (like it usually does, if the device is awake and not busy), or WorkManager delayed first periodic interval to be at 30-45 mins, i.e. it waited 30 mins not 15 mins, twice what I asked for.
So, how is "setInitialDelay" for a periodic work request meant to work? It doesn't just wait "delay" (instead of not waiting at all) and then enqueue the periodic work request?