Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

device-generic-goldfish: Commit

device/generic/goldfish


Commit MetaInfo

Revision06e141a637136930282d31c2d59a871bb4f11846 (tree)
Time2017-03-24 03:07:05
AuthorTreeHugger Robot <treehugger-gerrit@goog...>
CommiterAndroid (Google) Code Review

Log Message

Merge "implemented enumerate method in fingerprintservice fixes bug 35358801 Test: ran enumeration in template with 1) more fingerprints in fingerprintd 2) more fingerprints in framework 3) no fingerprints in fingerprintd, but fingerprints in framework 4) no fingerprints in framework, but fingerprints in fingerprintd"

Change Summary

Incremental Difference

--- a/fingerprint/fingerprint.c
+++ b/fingerprint/fingerprint.c
@@ -417,13 +417,21 @@ static int fingerprint_enumerate(struct fingerprint_device *device) {
417417 fingerprint_msg_t message = {0, {0}};
418418 message.type = FINGERPRINT_TEMPLATE_ENUMERATING;
419419 message.data.enumerated.finger.gid = qdev->group_id;
420- for (int i = 0; i < MAX_NUM_FINGERS; i++) {
421- if (qdev->listener.secureid[i] != 0 ||
422- qdev->listener.fingerid[i] != 0) {
423- template_count--;
424- message.data.enumerated.remaining_templates = template_count;
425- message.data.enumerated.finger.fid = qdev->listener.fingerid[i];
426- qdev->device.notify(&message);
420+
421+ if(template_count == 0) {
422+ message.data.enumerated.remaining_templates = 0;
423+ message.data.enumerated.finger.fid = 0;
424+ qdev->device.notify(&message);
425+ }
426+ else {
427+ for (int i = 0; i < MAX_NUM_FINGERS; i++) {
428+ if (qdev->listener.secureid[i] != 0 ||
429+ qdev->listener.fingerid[i] != 0) {
430+ template_count--;
431+ message.data.enumerated.remaining_templates = template_count;
432+ message.data.enumerated.finger.fid = qdev->listener.fingerid[i];
433+ qdev->device.notify(&message);
434+ }
427435 }
428436 }
429437
Show on old repository browser