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

Commit 2981461b authored by Jeff Pu's avatar Jeff Pu
Browse files

Do not execute fingerDown command if there is no existing HAL session

Bug: 294101107
Test: atest com.android.server.biometrics -c
Change-Id: I3886cf897312242de8d65adb224803a9fbd2a3d5
parent ac57bac3
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -875,6 +875,10 @@ public class FingerprintProvider implements IBinder.DeathRecipient, ServiceProvi
    public void simulateVhalFingerDown(int userId, int sensorId) {
        Slog.d(getTag(), "Simulate virtual HAL finger down event");
        final AidlSession session = mFingerprintSensors.get(sensorId).getSessionForUser(userId);
        if (session == null) {
            Slog.e(getTag(), "no existing hal session found - aborting");
            return;
        }
        final PointerContext pc = new PointerContext();
        try {
            session.getSession().onPointerDownWithContext(pc);