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

Commit 802c0a76 authored by zhangyupeng1's avatar zhangyupeng1 Committed by Kevin Chyn
Browse files

[BugFix][Fingerprint]fix client was canceled by service by mistake



issue:
After the call of client A started in the lockout state returns,
after client B calls the fp service, A is dead,
a death notification will be sent to the service, and the service will stop clent B.

solution:
Each time onAuthentication sets a flag mAlreadyDone to true.
Judge this flag as true in binderDie, and keep the current
fingerprint operation to avoid affecting the current user

Signed-off-by: default avatarzhangyupeng1 <zhangyupeng1@xiaomi.com>
Change-Id: I56ce99505febbb48dc13ccfc3c2d120123da4fa3
parent 0f56d5d5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -195,6 +195,8 @@ public abstract class AuthenticationClient<T> extends AcquisitionClient<T>
                    if (listener != null) {
                        listener.onAuthenticationFailed(getSensorId());
                    }
                } else {
                    mAlreadyDone = true;
                }
            }
        } catch (RemoteException e) {
+5 −0
Original line number Diff line number Diff line
@@ -176,6 +176,11 @@ public abstract class ClientMonitor<T> extends LoggableMonitor implements IBinde

    // TODO(b/157790417): Move this to the scheduler
    void binderDiedInternal(boolean clearListener) {
        if (isAlreadyDone()) {
            Slog.w(TAG, "Binder died but client is finished, ignoring");
            return;
        }

        // If the current client dies we should cancel the current operation.
        if (this instanceof Interruptable) {
            Slog.e(TAG, "Binder died, cancelling client");