Fixed
Status Update
Comments
su...@google.com <su...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 9fe209b0b6489fc3eba5be3c646beaf0efe8ed7e
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Aug 25 11:55:49 2020
Remove observers when unregistering ActivityResult
Currently, if you register an ActivityResult using a LifecycleOwner and
then go through process death, we add an Observer to fire the registered
callback once the lifecycle goes to STARTED. In the case of
unregistering, we should make sure to remove any observers that may have
been added.
Test: Added ActivityResultRegistryTest#testLifecycleOwnerCallbackUnregistered
Bug: 165608393
Change-Id: If81142b1a6abc72b105986a2460e4aeb96e29eaf
M activity/activity/src/androidTest/java/androidx/activity/result/ActivityResultRegistryTest.kt
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistry.java
https://android-review.googlesource.com/1410730
Branch: androidx-master-dev
commit 9fe209b0b6489fc3eba5be3c646beaf0efe8ed7e
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Aug 25 11:55:49 2020
Remove observers when unregistering ActivityResult
Currently, if you register an ActivityResult using a LifecycleOwner and
then go through process death, we add an Observer to fire the registered
callback once the lifecycle goes to STARTED. In the case of
unregistering, we should make sure to remove any observers that may have
been added.
Test: Added ActivityResultRegistryTest#testLifecycleOwnerCallbackUnregistered
Bug: 165608393
Change-Id: If81142b1a6abc72b105986a2460e4aeb96e29eaf
M activity/activity/src/androidTest/java/androidx/activity/result/ActivityResultRegistryTest.kt
M activity/activity/src/main/java/androidx/activity/result/ActivityResultRegistry.java
Description
Version used: 1.0.0-beta02
Devices/Android versions reproduced on: Nexus 5X API 28 Emulator (28.1.3-5243232) and Samsung J5 phone with 8.1.0
Steps to reproduce:
- Run application, monitoring logcat
- Press Enqueue
- Toast will be displayed and the log should indicate the worker started, failed and requested a retry
- Monitor the logcat for a few minutes and observe that no worker has been retried
This is intermittent but happens 90% of the time. If the Worker does retry, hit Enqueue again and it will likely fail to retry the new worker.
Expected Behaviour:
The worker should be retried after 10 seconds and up to 5 times in total before failing.