aidl: fingerprint: Only call onEnrollmentsEnumerated when finished

* Otherwise only one fingerprint can be registered

Change-Id: I89f4be25d060f461ca6b6e46d3ce7c601828c914
diff --git a/aidl/fingerprint/Session.cpp b/aidl/fingerprint/Session.cpp
index 6f65046..e5429f6 100644
--- a/aidl/fingerprint/Session.cpp
+++ b/aidl/fingerprint/Session.cpp
@@ -412,9 +412,12 @@
             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;
     }
 }