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

Commit 7c2371ad authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Add null checks in BiometricPromptService

Fixes: 113627859

Test: BiometricPromptDemo works
Change-Id: Iffe7d80e78c1df01c67e9693c2a784feaea13220
parent edc46f42
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@ import android.os.UserHandle;
import android.util.Slog;

import com.android.internal.R;
import com.android.internal.os.SomeArgs;
import com.android.server.SystemService;

import java.util.ArrayList;
@@ -133,6 +132,12 @@ public class BiometricPromptService extends SystemService {
            // AppOps and foreground check.
            checkPermission();

            if (token == null || receiver == null || opPackageName == null || bundle == null
                    || dialogReceiver == null) {
                Slog.e(TAG, "Unable to authenticate, one or more null arguments");
                return;
            }

            final int callingUid = Binder.getCallingUid();
            final int callingPid = Binder.getCallingPid();
            final int callingUserId = UserHandle.getCallingUserId();
@@ -166,6 +171,11 @@ public class BiometricPromptService extends SystemService {
                throws RemoteException {
            checkPermission();

            if (token == null || opPackageName == null) {
                Slog.e(TAG, "Unable to cancel, one or more null arguments");
                return;
            }

            final int callingUid = Binder.getCallingUid();
            final int callingPid = Binder.getCallingPid();
            final int callingUserId = UserHandle.getCallingUserId();