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
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user