[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: zhangyupeng1 <zhangyupeng1@xiaomi.com> Change-Id: I56ce99505febbb48dc13ccfc3c2d120123da4fa3 Merged-In: I56ce99505febbb48dc13ccfc3c2d120123da4fa3
This commit is contained in:
@@ -221,6 +221,9 @@ public abstract class AuthenticationClient extends ClientMonitor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
result = lockoutMode != LOCKOUT_NONE; // in a lockout mode
|
result = lockoutMode != LOCKOUT_NONE; // in a lockout mode
|
||||||
|
if(result) { // locked out
|
||||||
|
mAlreadyDone = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Slog.e(getLogTag(), "Remote exception", e);
|
Slog.e(getLogTag(), "Remote exception", e);
|
||||||
|
|||||||
@@ -237,6 +237,10 @@ public abstract class ClientMonitor extends LoggableMonitor implements IBinder.D
|
|||||||
}
|
}
|
||||||
|
|
||||||
void binderDiedInternal(boolean clearListener) {
|
void binderDiedInternal(boolean clearListener) {
|
||||||
|
if (isAlreadyDone()) {
|
||||||
|
Slog.w(getLogTag(), "Binder died but client is finished, ignoring");
|
||||||
|
return;
|
||||||
|
}
|
||||||
// If the current client dies we should cancel the current operation.
|
// If the current client dies we should cancel the current operation.
|
||||||
Slog.e(getLogTag(), "Binder died, cancelling client");
|
Slog.e(getLogTag(), "Binder died, cancelling client");
|
||||||
stop(false /* initiatedByClient */);
|
stop(false /* initiatedByClient */);
|
||||||
|
|||||||
Reference in New Issue
Block a user