summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaac Chen <isaacchen@isaacchen.cn>2018-10-23 00:47:53 +0800
committerIsaac Chen <isaacchen@isaacchen.cn>2018-12-02 11:02:30 +0800
commitf89bf07b99c606af842663efd675c6012bd0386f (patch)
tree66a4348fb346c1f257c77eaa834acfa88fd8f636
parent1f768a77be4501d6e79790bed2423adeabec543d (diff)
wayne-common: biometric: Detect fingerprint from cmdline
* Cleanup fingerprint logic
-rw-r--r--biometrics/BiometricsFingerprint.cpp4
-rw-r--r--init/init_wayne.cpp23
2 files changed, 2 insertions, 25 deletions
diff --git a/biometrics/BiometricsFingerprint.cpp b/biometrics/BiometricsFingerprint.cpp
index c6e976e..ea3028f 100644
--- a/biometrics/BiometricsFingerprint.cpp
+++ b/biometrics/BiometricsFingerprint.cpp
@@ -221,7 +221,7 @@ fingerprint_device_t* getDeviceForVendor(const char *class_name)
if (!strcmp(class_name, "fpc")) {
err = load("/system/vendor/lib64/hw/fingerprint.fpc.so", &hw_module);
- } else if (!strcmp(class_name, "goodix")) {
+ } else if (!strcmp(class_name, "gdx")) {
err = load("/system/vendor/lib64/hw/fingerprint.goodix.so", &hw_module);
} else {
ALOGE("No fingerprint module class specified.");
@@ -271,7 +271,7 @@ fingerprint_device_t* getFingerprintDevice()
fingerprint_device_t *fp_device;
char class_name[PROPERTY_VALUE_MAX];
- property_get("ro.boot.fingerprint",
+ property_get("ro.boot.fpsensor",
class_name, NULL);
fp_device = getDeviceForVendor(class_name);
diff --git a/init/init_wayne.cpp b/init/init_wayne.cpp
index 4964568..7f66f8c 100644
--- a/init/init_wayne.cpp
+++ b/init/init_wayne.cpp
@@ -54,28 +54,6 @@ char const *heapsize;
char const *heapminfree;
char const *heapmaxfree;
-static void init_finger_print_properties()
-{
- std::ifstream fin;
- std::string buf;
-
- std::string product = GetProperty("ro.product.name", "");
- if (product.find("wayne") == std::string::npos)
- return;
-
- fin.open("/proc/cmdline");
- while (std::getline(fin, buf, ' '))
- if (buf.find("fpsensor") != std::string::npos)
- break;
- fin.close();
-
- if (buf.find("fpc") != std::string::npos) {
- property_set("ro.boot.fingerprint", "fpc");
- } else {
- property_set("ro.boot.fingerprint", "goodix");
- }
-}
-
static void init_alarm_boot_properties()
{
char const *boot_reason_file = "/proc/sys/kernel/boot_reason";
@@ -137,7 +115,6 @@ void vendor_load_properties()
{
init_alarm_boot_properties();
check_device();
- init_finger_print_properties();
property_set("dalvik.vm.heapstartsize", heapstartsize);
property_set("dalvik.vm.heapgrowthlimit", heapgrowthlimit);