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

Commit 97683bf1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add null check in FaceService#isHardwareDetected"

parents d3ced6d9 d6fe1304
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class FaceManager implements BiometricAuthenticator, BiometricFaceConstan
    private static final int MSG_SET_FEATURE_COMPLETED = 107;
    private static final int MSG_CHALLENGE_GENERATED = 108;

    private IFaceService mService;
    private final IFaceService mService;
    private final Context mContext;
    private IBinder mToken = new Binder();
    private AuthenticationCallback mAuthenticationCallback;
+5 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import android.hardware.face.IFaceServiceReceiver;
import android.os.Binder;
import android.os.IBinder;
import android.os.NativeHandle;
import android.util.Slog;
import android.view.Surface;

import com.android.internal.util.DumpUtils;
@@ -177,6 +178,10 @@ public class FaceService extends SystemService {
        @Override // Binder call
        public boolean isHardwareDetected(String opPackageName) {
            Utils.checkPermission(getContext(), USE_BIOMETRIC_INTERNAL);
            if (mFace10 == null) {
                Slog.wtf(TAG, "No HAL, caller: " + opPackageName);
                return false;
            }
            final long token = Binder.clearCallingIdentity();
            try {
                return mFace10.isHardwareDetected();