Sfoglia il codice sorgente

cupid: Add support for udfps long press sensor

Change-Id: I7196dce967c9adbc62bb5156ade749c92c7780a1
Cosmin Tanislav 3 anni fa
parent
commit
8ab10ce2c5
5 ha cambiato i file con 16 aggiunte e 0 eliminazioni
  1. 3 0
      BoardConfig.mk
  2. 4 0
      device.mk
  3. 3 0
      overlay/Frameworks/res/values/config.xml
  4. 2 0
      properties/vendor.prop
  5. 4 0
      sensors/hals.conf

+ 3 - 0
BoardConfig.mk

@@ -12,5 +12,8 @@ include vendor/xiaomi/cupid/BoardConfigVendor.mk
 
 DEVICE_PATH := device/xiaomi/cupid
 
+# Properties
+TARGET_VENDOR_PROP += $(DEVICE_PATH)/properties/vendor.prop
+
 # Screen density
 TARGET_SCREEN_DENSITY := 440

+ 4 - 0
device.mk

@@ -18,6 +18,10 @@ PRODUCT_PACKAGES += \
     SystemUIResCupid \
     WifiResCupid
 
+# Sensors
+PRODUCT_COPY_FILES += \
+    $(LOCAL_PATH)/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf
+
 # Soong namespaces
 PRODUCT_SOONG_NAMESPACES += \
     $(LOCAL_PATH)

+ 3 - 0
overlay/Frameworks/res/values/config.xml

@@ -4,6 +4,9 @@
      SPDX-License-Identifier: Apache-2.0
 -->
 <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+    <!-- Type of the udfps long press sensor. Empty if long press is not supported. -->
+    <string name="config_dozeUdfpsLongPressSensorType" translatable="false">org.lineageos.sensor.udfps</string>
+
     <!-- How long it takes for the HW to start illuminating after the illumination is requested. -->
     <integer name="config_udfps_illumination_transition_ms">0</integer>
 </resources>

+ 2 - 0
properties/vendor.prop

@@ -0,0 +1,2 @@
+# Sensors
+ro.vendor.sensors.xiaomi.udfps=true

+ 4 - 0
sensors/hals.conf

@@ -0,0 +1,4 @@
+sensors.ultrasoundproximity.so
+sensors.ssc.so
+sensors.touch.detect.so
+sensors.xiaomi.so