Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Hi Sunkesula, which coroutine scope did you use?
pr...@google.com <pr...@google.com> #3
If you use a lifecycle scope then the operation is expected to automatically cancel upon the destroy of the lifecycle owner (e.g. activity lifecycle scope cancels upon activity destroyed by configuration changes).
You need a different scope (e.g. view model scope) to survive across activity lifecycles. Meanwhile, the CredentialManager api takes in an activity: please do not cache that activity into your view model to use view model scope as that can cause memory leak when the activity gets destroyed. Instead, you would want to dynamically get your activity from a callback at the time of the invocation.
Description
biometric/biometric/src/test/java/androidx/biometric/AuthenticationCallbackProviderTest.java: MockitoAnnotations.initMocks(this); biometric/biometric/src/test/java/androidx/biometric/BiometricManagerTest.java: MockitoAnnotations.initMocks(this); biometric/biometric/src/test/java/androidx/biometric/CancellationSignalProviderTest.java: MockitoAnnotations.initMocks(this); biometric/biometric/src/test/java/androidx/biometric/CryptoObjectUtilsTest.java: MockitoAnnotations.initMocks(this); biometric/biometric/src/test/java/androidx/biometric/KeyguardUtilsTest.java: MockitoAnnotations.initMocks(this); biometric/biometric/src/test/java/androidx/biometric/PackageUtilsTest.java: MockitoAnnotations.initMocks(this);
These deprecations will be suppressed inhttps://android-review.googlesource.com/c/platform/frameworks/support/+/2241387