Fix issue with last auth entry

The problem is that we send an exception to the client and then send the pending data to the UI. As part of sending the exception, we also finish the session and in that finish logic, we are cancelling the pending intent. The status update is async so there's race condition. For now, I'm removing the cancellation of the pending intent so as part of the finish logic. It is still cancelled when a new pending intent is created for the same session but won't be cancelled when the session ends. May send out a follow up that addresses cancelling the pending intent with session finish in a safe way.

Bug: 281615828
Test: built and deployed locally

Change-Id: I9f30a0236da2125b56d8de42217fa70cc5e65191
This commit is contained in:
Reema Bajwa
2023-05-10 17:49:07 +00:00
parent c51d3ed90c
commit 5ac4b39336

View File

@@ -210,7 +210,6 @@ abstract class RequestSession<T, U, V> implements CredentialManagerUi.Credential
if (propagateCancellation) {
mProviders.values().forEach(ProviderSession::cancelProviderRemoteSession);
}
cancelExistingPendingIntent();
mRequestSessionStatus = RequestSessionStatus.COMPLETE;
mProviders.clear();
clearRequestSessionLocked();