sm6150-common: fingerprint: Allow loading FOD modules
Change-Id: I2ccef59698a570dcb35c331dd7994fb7f7af68f0
This commit is contained in:
parent
9f781f1bdf
commit
d1dd0a2214
@ -255,18 +255,13 @@ fingerprint_device_t* getDeviceForVendor(const char *class_name) {
|
||||
|
||||
fingerprint_device_t* getFingerprintDevice() {
|
||||
fingerprint_device_t *fp_device;
|
||||
std::string vendor_modules[] = { "fpc", "fpc_fod", "goodix", "goodix_fod" };
|
||||
|
||||
fp_device = getDeviceForVendor("fpc");
|
||||
if (fp_device == nullptr) {
|
||||
ALOGE("Failed to load fpc fingerprint module");
|
||||
} else {
|
||||
return fp_device;
|
||||
for (const auto& vendor : vendor_modules) {
|
||||
if ((fp_device = getDeviceForVendor(vendor.c_str())) == nullptr) {
|
||||
ALOGE("Failed to load %s fingerprint module", vendor.c_str());
|
||||
continue;
|
||||
}
|
||||
|
||||
fp_device = getDeviceForVendor("goodix");
|
||||
if (fp_device == nullptr) {
|
||||
ALOGE("Failed to load goodix fingerprint module");
|
||||
} else {
|
||||
return fp_device;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user