From e468ba0c033d86429cedb85c1a21e1ed893175d1 Mon Sep 17 00:00:00 2001 From: Ryazantsev Dmitry Date: Tue, 16 Apr 2019 17:47:09 +0200 Subject: [PATCH] Fix crash on rare Nokia devices --- .../omadahealth/lollipin/lib/managers/AppLockActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/com/github/omadahealth/lollipin/lib/managers/AppLockActivity.java b/lib/src/main/java/com/github/omadahealth/lollipin/lib/managers/AppLockActivity.java index c2c72574..57be6f73 100644 --- a/lib/src/main/java/com/github/omadahealth/lollipin/lib/managers/AppLockActivity.java +++ b/lib/src/main/java/com/github/omadahealth/lollipin/lib/managers/AppLockActivity.java @@ -144,7 +144,7 @@ private void initLayoutForFingerprint() { mFingerprintManager = (FingerprintManager) getSystemService(Context.FINGERPRINT_SERVICE); mFingerprintUiHelper = new FingerprintUiHelper.FingerprintUiHelperBuilder(mFingerprintManager).build(mFingerprintImageView, mFingerprintTextView, this); try { - if (mFingerprintManager.isHardwareDetected() && mFingerprintUiHelper.isFingerprintAuthAvailable() + if (mFingerprintManager != null && mFingerprintManager.isHardwareDetected() && mFingerprintUiHelper.isFingerprintAuthAvailable() && mLockManager.getAppLock().isFingerprintAuthEnabled()) { mFingerprintImageView.setVisibility(View.VISIBLE); mFingerprintTextView.setVisibility(View.VISIBLE);