Status Update
Comments
ta...@mercury.com <ta...@mercury.com> #2
I face with the same problem. I have different pageMargin in landscape and portrait and when viewpager is scrolled for the more than first position, after rotating device it is shifted.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
I beleive the problem is inside onSizeChanged that is called after onConfigurationChanged, it has following code:
if (w != oldw) {
recomputeScrollPosition(w, oldw, mPageMargin, mPageMargin);
}
w always not equals oldw when changing orientation, so recomputeScrollPosition is called, but whit the same values for margin and oldMargin.
This should be fixed.
b9...@gmail.com <b9...@gmail.com> #3
[Comment deleted]
lu...@jane.com <lu...@jane.com> #4
I found the same problem in suport library v4, wrong align happens only when ViewPager has a page margin > 0.
ta...@mercury.com <ta...@mercury.com> #5
[Comment deleted]
Description
- Device type: Pixel 6
- OS version: Android 13
- Biometric library version: androidx.biometric:biometric-ktx:1.2.0-alpha05
STEPS TO REPRODUCE
Code:
try {
val result = Class3BiometricAuthPrompt.Builder(...).authenticate(...)
...
} catch () {
//
}
1. Try with wrong finger
2. Try again
2a. Try until lock out
EXPECTED RESULTS
There is two separate issue:
(1)
When fingerprint read fails the authenticate() suspend function throws an exception and continuation completes. But the prompt stays on screen. At the second attempt the code tries to send the result to the already completed continuation.
(2)
On lockout two events comes from biometric service: 'onAuthenticationFailed' and a bit later an 'onError' event. Both calls the same continuation.
Possible solution for both:
Replace continuation with Flow and emit `AuthenticationFailed` event as normal result. Close Flow only when prompt closed. Only `onError` event treated as exception.
OBSERVED RESULTS
java.lang.IllegalStateException: Already resumed, but proposed with update CompletedExceptionally[androidx.biometric.auth.AuthPromptErrorException: Túl sok próbálkozás. Próbálja újra később.]
at kotlinx.coroutines.CancellableContinuationImpl.alreadyResumedError(CancellableContinuationImpl.kt:482)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:447)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)
at androidx.biometric.auth.CoroutineAuthPromptCallback.onAuthenticationError(CoroutineAuthPromptCallback.kt:35)
at androidx.biometric.auth.AuthPromptUtils$AuthenticationCallbackWrapper.onAuthenticationError(AuthPromptUtils.java:186)
at androidx.biometric.BiometricFragment.lambda$sendErrorToClient$9$androidx-biometric-BiometricFragment(BiometricFragment.java:944)
at androidx.biometric.BiometricFragment$$ExternalSyntheticLambda3.run(Unknown Source:6)
at androidx.biometric.auth.Class2BiometricAuthExtensionsKt$$ExternalSyntheticLambda0.execute(Unknown Source:0)
at androidx.biometric.BiometricFragment.sendErrorToClient(BiometricFragment.java:943)
at androidx.biometric.BiometricFragment.sendErrorAndDismiss(BiometricFragment.java:897)
at androidx.biometric.BiometricFragment.onAuthenticationError(BiometricFragment.java:729)
at androidx.biometric.BiometricFragment.lambda$connectViewModel$1$androidx-biometric-BiometricFragment(BiometricFragment.java:320)
at androidx.biometric.BiometricFragment$$ExternalSyntheticLambda6.onChanged(Unknown Source:4)
at androidx.lifecycle.LiveData.considerNotify(LiveData.java:133)
at androidx.lifecycle.LiveData.dispatchingValue(LiveData.java:151)
at androidx.lifecycle.LiveData.setValue(LiveData.java:309)
at androidx.lifecycle.MutableLiveData.setValue(MutableLiveData.java:50)
at androidx.biometric.BiometricViewModel.updateValue(BiometricViewModel.java:688)
at androidx.biometric.BiometricViewModel.setAuthenticationError(BiometricViewModel.java:548)
at androidx.biometric.BiometricViewModel$CallbackListener.onError(BiometricViewModel.java:98)
at androidx.biometric.AuthenticationCallbackProvider$Api28Impl$1.onAuthenticationError(AuthenticationCallbackProvider.java:215)
at android.hardware.biometrics.BiometricPrompt$1.lambda$onError$2$android-hardware-biometrics-BiometricPrompt$1(BiometricPrompt.java:552)
at android.hardware.biometrics.BiometricPrompt$1$$ExternalSyntheticLambda0.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
NUMBER OF TIMES YOU WERE ABLE TO REPRODUCE: 10/10