Fixed
Status Update
Comments
vi...@google.com <vi...@google.com> #2
Removing from wednesday's list for now since there have been no reports.
do...@gmail.com <do...@gmail.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d02b8afc951f6a9e0fc8e24e19e56a06f1f60fac
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 14:33:54 2019
Tolerate null result in BiometricPrompt fragments
The AndroidX BiometricPrompt API for onAuthenticationSucceeded requires
a non-null AuthenticationResult, so we construct one from the platform
BiometricPrompt or FingerprintManagerCompat result in BiometricFragment
and FingerprintHelperFragment, respectively, when calling this method.
However, the platform API does not guarantee that the result it provides
will be non-null, in which case the current implementation would crash.
This commit fixes the issue by creating an AuthenticationResult with
null crypto when handling a null result in either of these places. It
also adds unit tests to verify the new behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 138862251
Change-Id: I540dd3b4ebdf100553b4fac609f3d928ec69ebfb
A biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
A biometric/src/androidTest/java/androidx/biometric/FingerprintHelperFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
https://android-review.googlesource.com/1122743
https://goto.google.com/android-sha1/d02b8afc951f6a9e0fc8e24e19e56a06f1f60fac
Branch: androidx-master-dev
commit d02b8afc951f6a9e0fc8e24e19e56a06f1f60fac
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Sep 11 14:33:54 2019
Tolerate null result in BiometricPrompt fragments
The AndroidX BiometricPrompt API for onAuthenticationSucceeded requires
a non-null AuthenticationResult, so we construct one from the platform
BiometricPrompt or FingerprintManagerCompat result in BiometricFragment
and FingerprintHelperFragment, respectively, when calling this method.
However, the platform API does not guarantee that the result it provides
will be non-null, in which case the current implementation would crash.
This commit fixes the issue by creating an AuthenticationResult with
null crypto when handling a null result in either of these places. It
also adds unit tests to verify the new behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 138862251
Change-Id: I540dd3b4ebdf100553b4fac609f3d928ec69ebfb
A biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
A biometric/src/androidTest/java/androidx/biometric/FingerprintHelperFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
M biometric/src/main/java/androidx/biometric/FingerprintHelperFragment.java
vi...@google.com <vi...@google.com>
kc...@google.com <kc...@google.com>
cu...@google.com <cu...@google.com>
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 0b2dee89f68e9ed41c9552a93fee72364253af41
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Nov 06 10:00:17 2019
Fix possible NPE with BiometricFragment method
The current implementation of
BiometricFragment#setDeviceCredentialAllowed() tries to get a boolean
from mBundle without first checking to see if mBundle is null,
potentially resulting in a NullPointerException. This commit adds in the
null check in order to make calling this method safer. It also adds a
unit test case to exercise this behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 142599311
Change-Id: I18e03f926ff03c53f8cf1812fbad46ea75db6a32
M biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
https://android-review.googlesource.com/1159943
Branch: androidx-master-dev
commit 0b2dee89f68e9ed41c9552a93fee72364253af41
Author: Curtis Belmonte <curtislb@google.com>
Date: Wed Nov 06 10:00:17 2019
Fix possible NPE with BiometricFragment method
The current implementation of
BiometricFragment#setDeviceCredentialAllowed() tries to get a boolean
from mBundle without first checking to see if mBundle is null,
potentially resulting in a NullPointerException. This commit adds in the
null check in order to make calling this method safer. It also adds a
unit test case to exercise this behavior.
Test: ./gradlew biometric:connectedAndroidTest
Fixes: 142599311
Change-Id: I18e03f926ff03c53f8cf1812fbad46ea75db6a32
M biometric/src/androidTest/java/androidx/biometric/BiometricFragmentTest.java
M biometric/src/main/java/androidx/biometric/BiometricFragment.java
Description
Version used: :1.0.0-beta02
Theme used: Theme.AppCompat
Devices/Android versions reproduced on: Pixel 3 XL
Crash logs:
Caused by java.lang.NullPointerException
Attempt to invoke virtual method 'boolean android.os.Bundle.getBoolean(java.lang.String, boolean)' on a null object reference
androidx.biometric.BiometricFragment.isDeviceCredentialAllowed (BiometricFragment.java:238)
androidx.biometric.BiometricPrompt$2.onPause (BiometricPrompt.java:505)
java.lang.reflect.Method.invoke (Method.java)
androidx.lifecycle.ClassesInfoCache$MethodReference.invokeCallback (ClassesInfoCache.java:216)
androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeMethodsForEvent (ClassesInfoCache.java:194)
androidx.lifecycle.ClassesInfoCache$CallbackInfo.invokeCallbacks (ClassesInfoCache.java:185)
androidx.lifecycle.ReflectiveGenericLifecycleObserver.onStateChanged (ReflectiveGenericLifecycleObserver.java:36)
androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent (LifecycleRegistry.java:361)
androidx.lifecycle.LifecycleRegistry.backwardPass (LifecycleRegistry.java:316)
androidx.lifecycle.LifecycleRegistry.sync (LifecycleRegistry.java:334)
androidx.lifecycle.LifecycleRegistry.moveToState (LifecycleRegistry.java:145)
androidx.lifecycle.LifecycleRegistry.handleLifecycleEvent (LifecycleRegistry.java:131)
androidx.lifecycle.ReportFragment.dispatch (ReportFragment.java:123)
androidx.lifecycle.ReportFragment.onPause (ReportFragment.java:96)
android.app.Fragment.performPause (Fragment.java:2735)
android.app.FragmentManagerImpl.moveToState (FragmentManagerImpl.java:1358)
android.app.FragmentManagerImpl.moveFragmentToExpectedState (FragmentManagerImpl.java:1581)
android.app.FragmentManagerImpl.moveToState (FragmentManagerImpl.java:1642)
android.app.FragmentManagerImpl.dispatchMoveToState (FragmentManagerImpl.java:3052)
android.app.FragmentManagerImpl.dispatchPause (FragmentManagerImpl.java:3018)
android.app.FragmentController.dispatchPause (FragmentController.java:217)
android.app.Activity.performPause (Activity.java:7976)
android.app.Instrumentation.callActivityOnPause (Instrumentation.java:1507)
android.app.ActivityThread.performPauseActivityIfNeeded (ActivityThread.java:4493)
android.app.ActivityThread.performPauseActivity (ActivityThread.java:4454)
android.app.ActivityThread.handlePauseActivity (ActivityThread.java:4406)
android.app.servertransaction.PauseActivityItem.execute (PauseActivityItem.java:46)
android.app.servertransaction.TransactionExecutor.executeLifecycleState (TransactionExecutor.java:176)
android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:97)
android.app.ActivityThread$H.handleMessage (ActivityThread.java:2016)
android.os.Handler.dispatchMessage (Handler.java:107)
android.os.Looper.loop (Looper.java:214)
android.app.ActivityThread.main (ActivityThread.java:7356)
java.lang.reflect.Method.invoke (Method.java)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:492)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:930)