Add null check in AuthBiometricView#onConfigurationChange

Add null check for retrieving saved state on configuration changes

Test: (manual) do repro steps on bug, verify no crash
Fixes: 271527985
Change-Id: I43630549e5d4fa49b8a9e5c1bc8c8b1c067ee2af
This commit is contained in:
Grace Cheng
2023-03-15 07:09:45 +00:00
parent 05356e1d89
commit 26030b9e22

View File

@@ -658,7 +658,9 @@ public abstract class AuthBiometricView extends LinearLayout {
protected void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
mIconController.onConfigurationChanged(newConfig);
updateState(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_STATE));
if (mSavedState != null) {
updateState(mSavedState.getInt(AuthDialog.KEY_BIOMETRIC_STATE));
}
}
@Override