Merge "Enable mainline artifact path enforcement" into rvc-d1-dev-plus-aosp am: 06da82899d

Original change: https://googleplex-android-review.googlesource.com/c/device/google/bramble/+/12343724

Change-Id: I27f1652ea927d3e8a9618c81a22bfa7ccd3c6f42
diff --git a/bramble/init.bramble.rc b/bramble/init.bramble.rc
index 21fae7c..e6b5830 100644
--- a/bramble/init.bramble.rc
+++ b/bramble/init.bramble.rc
@@ -19,6 +19,21 @@
 on property:vendor.all.modules.ready=1
     chown system system /sys/class/spi_master/spi0/spi0.0/stm_fts_cmd
     chown system system /sys/class/spi_master/spi0/spi0.0/audio_status
+    chown system system /sys/class/spi_master/spi0/spi0.0/glove_mode
+
+# Toggle glove_mode according to touch_sensitivity_mode
+on property:persist.vendor.touch_sensitivity_mode=0 && property:sys.boot_completed=1
+    write /sys/class/spi_master/spi0/spi0.0/glove_mode 00
+
+on property:persist.vendor.touch_sensitivity_mode=1 && property:sys.boot_completed=1
+    write /sys/class/spi_master/spi0/spi0.0/glove_mode 01
+
+# Route touch_sensitivity_mode to persist
+on property:debug.touch_sensitivity_mode=0
+    setprop persist.vendor.touch_sensitivity_mode 0
+
+on property:debug.touch_sensitivity_mode=1
+    setprop persist.vendor.touch_sensitivity_mode 1
 
 service vendor.mdm_helper /vendor/bin/mdm_helper
     class core