Merge "HbmManager: Configure compensation_filter_horizon to 3500" into rvc-d1-dev
diff --git a/bramble/overlay_packages/SettingsOverlayG025E/Android.bp b/bramble/overlay_packages/SettingsOverlayG025E/Android.bp
new file mode 100644
index 0000000..8b917cc
--- /dev/null
+++ b/bramble/overlay_packages/SettingsOverlayG025E/Android.bp
@@ -0,0 +1,4 @@
+runtime_resource_overlay {
+    name: "SettingsOverlayG025E",
+    product_specific: true,
+}
diff --git a/bramble/overlay_packages/SettingsOverlayG025E/AndroidManifest.xml b/bramble/overlay_packages/SettingsOverlayG025E/AndroidManifest.xml
new file mode 100644
index 0000000..ac25f1f
--- /dev/null
+++ b/bramble/overlay_packages/SettingsOverlayG025E/AndroidManifest.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.android.settings.overlay.g025e">
+    <application android:hasCode="false" />
+    <overlay android:targetPackage="com.android.settings"
+             android:requiredSystemPropertyName="ro.boot.hardware.sku"
+             android:requiredSystemPropertyValue="G025E"
+             android:isStatic="true"
+             android:priority="10" />
+</manifest>
diff --git a/bramble/overlay_packages/SettingsOverlayG025E/res/drawable/regulatory_info.png b/bramble/overlay_packages/SettingsOverlayG025E/res/drawable/regulatory_info.png
new file mode 100644
index 0000000..085a349
--- /dev/null
+++ b/bramble/overlay_packages/SettingsOverlayG025E/res/drawable/regulatory_info.png
Binary files differ
diff --git a/device-bramble.mk b/device-bramble.mk
index 8803f11..169eaf6 100644
--- a/device-bramble.mk
+++ b/device-bramble.mk
@@ -192,4 +192,5 @@
     SettingsOverlayG025H \
     FrameworkOverlayG6QU3 \
     SettingsOverlayG025I \
-    SettingsOverlayG6QU3
+    SettingsOverlayG6QU3 \
+    SettingsOverlayG025E
diff --git a/vibrator/drv2624/Vibrator.cpp b/vibrator/drv2624/Vibrator.cpp
index 8129dcf..c2658df 100644
--- a/vibrator/drv2624/Vibrator.cpp
+++ b/vibrator/drv2624/Vibrator.cpp
@@ -75,6 +75,7 @@
 #define SENSOR_DATA_NUM 20
 // Set sensing period to 2s
 #define SENSING_PERIOD 2000000000
+#define VIBRATION_MOTION_TIME_THRESHOLD 100
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
 
 int GSensorCallback(__attribute__((unused)) int fd, __attribute__((unused)) int events,
@@ -464,7 +465,9 @@
         if (temperature > TEMP_UPPER_BOUND) {
             mSteadyConfig->odClamp = &mSteadyTargetOdClamp[0];
             mSteadyConfig->olLraPeriod = mSteadyOlLraPeriod;
-            if (!motionAwareness()) {
+            // TODO: b/162346934 This a compromise way to bypass the motion
+            // awareness delay
+            if ((timeoutMs > VIBRATION_MOTION_TIME_THRESHOLD) && (!motionAwareness())) {
                 return on(timeoutMs, RTP_MODE, mSteadyConfig, 2);
             }
         } else if (temperature < TEMP_LOWER_BOUND) {