Fixed
Status Update
Comments
il...@google.com <il...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit f570475abb57a6527f861a083ddfccf451b3427b
Author: Sumir Kataria <sumir@google.com>
Date: Wed Aug 29 14:09:32 2018
Add ability to trigger timed work in TestDriver.
Bug: 113360060
Test: Added and ran new tests in TestSchedulerTest.
Change-Id: I681db88e3190b96e90a5d531b7b1fa053eaf8ab9
M work/workmanager-test/src/androidTest/java/androidx/work/test/TestSchedulerTest.java
A work/workmanager-test/src/androidTest/java/androidx/work/test/workers/CountingTestWorker.java
M work/workmanager-test/src/androidTest/java/androidx/work/test/workers/TestWorker.java
M work/workmanager-test/src/main/java/androidx/work/test/TestDriver.java
M work/workmanager-test/src/main/java/androidx/work/test/TestScheduler.java
M work/workmanager-test/src/main/java/androidx/work/test/WorkManagerTestInitHelper.java
https://android-review.googlesource.com/740398
https://goto.google.com/android-sha1/f570475abb57a6527f861a083ddfccf451b3427b
Branch: androidx-master-dev
commit f570475abb57a6527f861a083ddfccf451b3427b
Author: Sumir Kataria <sumir@google.com>
Date: Wed Aug 29 14:09:32 2018
Add ability to trigger timed work in TestDriver.
Bug: 113360060
Test: Added and ran new tests in TestSchedulerTest.
Change-Id: I681db88e3190b96e90a5d531b7b1fa053eaf8ab9
M work/workmanager-test/src/androidTest/java/androidx/work/test/TestSchedulerTest.java
A work/workmanager-test/src/androidTest/java/androidx/work/test/workers/CountingTestWorker.java
M work/workmanager-test/src/androidTest/java/androidx/work/test/workers/TestWorker.java
M work/workmanager-test/src/main/java/androidx/work/test/TestDriver.java
M work/workmanager-test/src/main/java/androidx/work/test/TestScheduler.java
M work/workmanager-test/src/main/java/androidx/work/test/WorkManagerTestInitHelper.java
ch...@google.com <ch...@google.com> #3
The testing artifact (work-testing) will have the ability to trigger initial delays and period met signals in alpha09. You should use this to simulate any testing you need.
ch...@google.com <ch...@google.com> #4
Wau, that was incredibly fast, thanks!
il...@google.com <il...@google.com> #5
Moving this to the Fragment component since this is not related to Navigation - the same thing occurs when using fragment transactions directly when using setReorderingAllowed(true).
il...@google.com <il...@google.com>
an...@gmail.com <an...@gmail.com> #6
Is there any update on this issue? It's been reported in March.
jb...@google.com <jb...@google.com>
li...@gmail.com <li...@gmail.com> #7
Is there any progress or workaround?
This issue may trigger many chain reactions, e.g. LiveData observer's onChange
never be called.
il...@google.com <il...@google.com> #8
Re #7 - this is being actively worked on in the
il...@google.com <il...@google.com> #9
A postponed fragment will never reach onResume()
(part of the contract of a postponed fragment is that it can only go up to STARTED
), so the example project needed to be changed to use onStart()
.
That being said, this has been fixed internally and will be avilable in Fragment 1.3.0-alpha08.
Note: this fix relies on using the
Description
Version used: 2.0.0
The fragment I use as my startDestination uses postponeEnterTransition() and startPostponedEnterTransition() for transition purposes. When my app is opened though, that fragment is never actually visible.
This is because the Fragment does *not* receive onStart() or onResume(), so my data source is never setup, so I do not call scheduleStartPostponedTransitions(). The last lifecycle callback I get is onViewCreated().
If I remove the call to postponeEnterTransition() then everything works as normal, except my transitions.