Ensure candidate phase logged in split branch

There's a chunk of code where the candidate phase should be logged that
splits into a fork, where a cancellation may have occured, or not.
Previously, only one fork was followed. Now both will be followed.

Bug: 275067595
Test: Builds + E2E Test of Functionality
Change-Id: I5e1308ae3dfe66f8434fc1b337a9445c951b8bb8
This commit is contained in:
Arpan Kaphle
2023-04-04 20:25:28 +00:00
parent 72913d7f0a
commit be4c36bc35

View File

@@ -194,7 +194,6 @@ abstract class RequestSession<T, U, V> implements CredentialManagerUi.Credential
ArrayList<ProviderData> providerDataList = getProviderDataForUi();
if (!providerDataList.isEmpty()) {
Log.i(TAG, "provider list not empty about to initiate ui");
mRequestSessionMetric.logCandidatePhaseMetrics(mProviders);
launchUiWithProviderData(providerDataList);
}
}
@@ -204,9 +203,9 @@ abstract class RequestSession<T, U, V> implements CredentialManagerUi.Credential
Log.i(TAG, "In getProviderDataAndInitiateUi");
Log.i(TAG, "In getProviderDataAndInitiateUi providers size: " + mProviders.size());
ArrayList<ProviderData> providerDataList = new ArrayList<>();
mRequestSessionMetric.logCandidatePhaseMetrics(mProviders);
if (isSessionCancelled()) {
mRequestSessionMetric.logCandidatePhaseMetrics(mProviders);
finishSession(/*propagateCancellation=*/true);
return providerDataList;
}