Merge "Retry pullfinish with empty payload if call fails" into rvc-dev

This commit is contained in:
Tej Singh 2020-06-01 19:14:09 +00:00 committed by Android (Google) Code Review
commit 84db2e40e1

View file

@ -131,7 +131,11 @@ class StatsPullAtomCallbackInternal : public BnPullAtomCallback {
parcels.push_back(std::move(p));
}
resultReceiver->pullFinished(atomTag, success, parcels);
Status status = resultReceiver->pullFinished(atomTag, success, parcels);
if (!status.isOk()) {
std::vector<StatsEventParcel> emptyParcels;
resultReceiver->pullFinished(atomTag, /*success=*/false, emptyParcels);
}
for (int i = 0; i < statsEventList.data.size(); i++) {
AStatsEvent_release(statsEventList.data[i]);
}