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

Commit 13648927 authored by Kevin Chyn's avatar Kevin Chyn
Browse files

Don't check canUseBiometric if caller is system process

Fixes: 128108006

Test: Secondary user is able to authenticate
Test: BiometricManager#canAuthenticate for secondary user works
Change-Id: Ia97f4a0972d92e4f6fbe1b634b318ba6e6fe93d3
parent 83234be1
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@ import android.os.IBinder;
import android.os.IHwBinder;
import android.os.IRemoteCallback;
import android.os.PowerManager;
import android.os.Process;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SystemClock;
@@ -958,6 +959,10 @@ public abstract class BiometricServiceBase extends SystemService
            int pid, int userId) {
        checkUseBiometricPermission();


        if (Binder.getCallingUid() == Process.SYSTEM_UID) {
            return true; // System process (BiometricService, etc) is always allowed
        }
        if (isKeyguard(opPackageName)) {
            return true; // Keyguard is always allowed
        }