From 5ac4b393368a2bed60b5b282db2ac3c7983dc791 Mon Sep 17 00:00:00 2001 From: Reema Bajwa Date: Wed, 10 May 2023 17:49:07 +0000 Subject: [PATCH] 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 --- .../java/com/android/server/credentials/RequestSession.java | 1 - 1 file changed, 1 deletion(-) diff --git a/services/credentials/java/com/android/server/credentials/RequestSession.java b/services/credentials/java/com/android/server/credentials/RequestSession.java index a41b5713ee145..f2075df7e1ee0 100644 --- a/services/credentials/java/com/android/server/credentials/RequestSession.java +++ b/services/credentials/java/com/android/server/credentials/RequestSession.java @@ -210,7 +210,6 @@ abstract class RequestSession implements CredentialManagerUi.Credential if (propagateCancellation) { mProviders.values().forEach(ProviderSession::cancelProviderRemoteSession); } - cancelExistingPendingIntent(); mRequestSessionStatus = RequestSessionStatus.COMPLETE; mProviders.clear(); clearRequestSessionLocked();