Skip to content
Snippets Groups Projects
Commit 194ecd86 authored by Janik Besendorf's avatar Janik Besendorf
Browse files

add null check for fingerprintmanager

parent 9c82bdc2
No related branches found
No related tags found
No related merge requests found
...@@ -237,6 +237,9 @@ public class MainActivity extends AppCompatActivity { ...@@ -237,6 +237,9 @@ public class MainActivity extends AppCompatActivity {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
//Get an instance of FingerprintManager// //Get an instance of FingerprintManager//
fingerprintManager = (FingerprintManager) getSystemService(FINGERPRINT_SERVICE); fingerprintManager = (FingerprintManager) getSystemService(FINGERPRINT_SERVICE);
if (fingerprintManager == null){
return false;
}
return fingerprintManager.isHardwareDetected(); return fingerprintManager.isHardwareDetected();
} }
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment