aidl: fingerprint: Only call onEnrollmentsEnumerated when finished

* Otherwise only one fingerprint can be registered

Change-Id: I89f4be25d060f461ca6b6e46d3ce7c601828c914
urubino
Tim Zimmermann 11 months ago
parent cde582d00c
commit 6d63dc3862
No known key found for this signature in database
GPG Key ID: 6DC21A63F819C5EF
  1. 7
      aidl/fingerprint/Session.cpp

@ -412,9 +412,12 @@ void Session::notify(const fingerprint_msg_t* msg) {
LOG(DEBUG) << "onEnumerate(fid=" << msg->data.enumerated.finger.fid
<< ", gid=" << msg->data.enumerated.finger.gid
<< ", rem=" << msg->data.enumerated.remaining_templates << ")";
std::vector<int> enrollments;
static std::vector<int> enrollments;
enrollments.push_back(msg->data.enumerated.finger.fid);
mCb->onEnrollmentsEnumerated(enrollments);
if (msg->data.enumerated.remaining_templates == 0) {
mCb->onEnrollmentsEnumerated(enrollments);
enrollments.clear();
}
} break;
}
}

Loading…
Cancel
Save