Fixed
Status Update
Comments
vi...@google.com <vi...@google.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
do...@gmail.com <do...@gmail.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
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)