Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7fe81a61 authored by Louis Chang's avatar Louis Chang
Browse files

Adding null check to prevent NPE

#createConfirmDeviceCredentialIntent returns null if the device
is insecure.

Bug: 229950204
Test: atest StartActivityAsUserTests
Change-Id: I7de3e72d0677044e282952126612fc3e072d83fd
parent 1b43c023
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -261,8 +261,10 @@ public class KeyguardManager {
            CharSequence title, CharSequence description, int userId,
            boolean disallowBiometricsIfPolicyExists) {
        Intent intent = this.createConfirmDeviceCredentialIntent(title, description, userId);
        if (intent != null) {
            intent.putExtra(EXTRA_DISALLOW_BIOMETRICS_IF_POLICY_EXISTS,
                    disallowBiometricsIfPolicyExists);
        }
        return intent;
    }