Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE and crash is possible on c.getSystemService(FingerprintManager::class.java) #13

Open
AlexTrotsenko opened this issue Aug 23, 2019 · 0 comments

Comments

@AlexTrotsenko
Copy link

in FahManager :

private var fingerprintManager: FingerprintManager = c.getSystemService(FingerprintManager::class.java)

Now c.getSystemService(FingerprintManager::class.java) is annotated as Nullable thus could return null and cause NPE.

SDK sources:

public final @Nullable <T> T getSystemService(@NonNull Class<T> serviceClass) {
...

Return value must be checked for null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant