otter: vibrator: Remove FP5 changes

Change-Id: I75f100b1127b2ef0130b080c8498fd05b7c0fbcb
diff --git a/sepolicy/vendor/genfs_contexts b/sepolicy/vendor/genfs_contexts
index 1867f68..ff8ea08 100644
--- a/sepolicy/vendor/genfs_contexts
+++ b/sepolicy/vendor/genfs_contexts
@@ -4,8 +4,5 @@
 # Touchscreen
 genfscon sysfs /devices/platform/goodix_ts.0                                    u:object_r:vendor_sysfs_touchpanel:s0
 
-# Vibrator
-genfscon sysfs /devices/platform/soc/984000.i2c/i2c-0/0-005a/leds/vibrator_1    u:object_r:sysfs_leds:s0
-
 # Wakeup
 genfscon sysfs /devices/platform/soc/soc:focalfp_ft9362/wakeup                  u:object_r:sysfs_wakeup:s0
diff --git a/vibrator/Vibrator.cpp b/vibrator/Vibrator.cpp
index bea4b44..04bc256 100644
--- a/vibrator/Vibrator.cpp
+++ b/vibrator/Vibrator.cpp
@@ -80,7 +80,7 @@
 
 #define test_bit(bit, array)    ((array)[(bit)/8] & (1<<((bit)%8)))
 
-static const char LED_DEVICE[] = "/sys/class/leds/vibrator_1";
+static const char LED_DEVICE[] = "/sys/class/leds/vibrator";
 static const char HAPTICS_SYSFS[] = "/sys/class/qcom-haptics";
 
 static constexpr int32_t ComposeDelayMaxMs = 1000;
@@ -138,7 +138,6 @@
         }
 
         if (strcmp(name, "qcom-hv-haptics") && strcmp(name, "qti-haptics")
-                && strcmp(name, "aw-haptic-hv")
                 && strcmp(name, "aw8624_haptic")
                 && strcmp(name, "aw8695_haptic")
                 && strcmp(name, "aw8697_haptic")
@@ -432,54 +431,21 @@
     char value[32];
     int ret;
 
-    snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "activate_mode");
-    ret = write_value(file, "0");
+    snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "state");
+    ret = write_value(file, "1");
     if (ret < 0)
        goto error;
 
-    if (timeoutMs <= 50) {
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "seq");
-        ret = write_value(file, "0x00 0x00");
-        if (ret < 0)
-            goto error;
+    snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "duration");
+    snprintf(value, sizeof(value), "%u\n", timeoutMs);
+    ret = write_value(file, value);
+    if (ret < 0)
+       goto error;
 
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "seq");
-        ret = write_value(file, "0x00 0x01");
-        if (ret < 0)
-            goto error;
-
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "loop");
-        ret = write_value(file, "0x00 0x00");
-        if (ret < 0)
-            goto error;
-
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "duration");
-        snprintf(value, sizeof(value), "%u\n", timeoutMs);
-        ret = write_value(file, value);
-        if (ret < 0)
-            goto error;
-
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "brightness");
-        ret = write_value(file, "1");
-        if (ret < 0)
-            goto error;
-    } else {
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "index");
-        ret = write_value(file, "4");
-        if (ret < 0)
-            goto error;
-
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "duration");
-        snprintf(value, sizeof(value), "%u\n", timeoutMs);
-        ret = write_value(file, value);
-        if (ret < 0)
-            goto error;
-
-        snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "activate");
-        ret = write_value(file, "1");
-        if (ret < 0)
-            goto error;
-    }
+    snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "activate");
+    ret = write_value(file, "1");
+    if (ret < 0)
+       goto error;
 
     return 0;
 
@@ -495,17 +461,6 @@
 
     snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "activate");
     ret = write_value(file, "0");
-    if (ret < 0)
-        return ret;
-
-    snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "brightness");
-    ret = write_value(file, "0");
-    if (ret < 0)
-        return ret;
-
-    snprintf(file, sizeof(file), "%s/%s", LED_DEVICE, "index");
-    ret = write_value(file, "1");
-
     return ret;
 }
 
diff --git a/vibrator/excluded-input-devices.xml b/vibrator/excluded-input-devices.xml
index b246f9b..32acdab 100755
--- a/vibrator/excluded-input-devices.xml
+++ b/vibrator/excluded-input-devices.xml
@@ -28,7 +28,6 @@
 <devices>
     <device name="qti-haptics"/>
     <device name="qcom-hv-haptics"/>
-    <device name="aw-haptic-hv"/>
     <device name="aw8624_haptic"/>
     <device name="aw8695_haptic"/>
     <device name="aw8697_haptic"/>