diff options
author | Adithya R <gh0strider.2k18.reborn@gmail.com> | 2021-05-18 22:20:26 +0530 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2022-01-13 16:38:27 +0800 |
commit | 6ae53e590e2e7cd00350d8ac4b385f1a843ed116 (patch) | |
tree | a5b93155e6df85ba8ae150ddc547a59255e2553f | |
parent | 7601d8914b9e21dd9ce419119a35f388c1ca9d21 (diff) |
* breaks vibration on devices with non-qti vibrator, such as
surya and miatoll which use aw8624 vibrator.
This reverts commit c8f31f143e5ed2bfed4f47193fc7514580e87220.
Change-Id: I652ad23eddac84cdbd590323c2f47cf42e8622d7
-rw-r--r-- | aidl/Vibrator.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/aidl/Vibrator.cpp b/aidl/Vibrator.cpp index 4b0d649..42155e8 100644 --- a/aidl/Vibrator.cpp +++ b/aidl/Vibrator.cpp @@ -52,8 +52,7 @@ namespace vibrator { #define MEDIUM_MAGNITUDE 0x5fff #define LIGHT_MAGNITUDE 0x3fff #define INVALID_VALUE -1 -#define CUSTOM_DATA_LEN 3 -#define NAME_BUF_SIZE 32 +#define CUSTOM_DATA_LEN 3 #define MSM_CPU_LAHAINA 415 #define APQ_CPU_LAHAINA 439 @@ -74,7 +73,6 @@ InputFFDevice::InputFFDevice() uint8_t ffBitmask[FF_CNT / 8]; char devicename[PATH_MAX]; const char *INPUT_DIR = "/dev/input/"; - char name[NAME_BUF_SIZE]; int fd, ret; int soc = property_get_int32("ro.vendor.qti.soc_id", -1); @@ -106,20 +104,6 @@ InputFFDevice::InputFFDevice() continue; } - ret = TEMP_FAILURE_RETRY(ioctl(fd, EVIOCGNAME(sizeof(name)), name)); - if (ret == -1) { - ALOGE("get input device name %s failed, errno = %d\n", devicename, errno); - close(fd); - continue; - } - - if (strcmp(name, "qcom-hv-haptics") && strcmp(name, "qti-haptics")) { - ALOGD("not a qcom/qti haptics device\n"); - close(fd); - continue; - } - - ALOGI("%s is detected at %s\n", name, devicename); ret = TEMP_FAILURE_RETRY(ioctl(fd, EVIOCGBIT(EV_FF, sizeof(ffBitmask)), ffBitmask)); if (ret == -1) { ALOGE("ioctl failed, errno = %d", errno); |