sdm660-common: DeviceSettings: Adapt vibration control to QTI Haptics
* needs kernel support
This commit is contained in:
parent
1f7abf2f4e
commit
ce09f0e3af
3 changed files with 6 additions and 3 deletions
|
@ -38,7 +38,7 @@ public class DeviceSettings extends PreferenceFragment implements
|
|||
|
||||
public static final String CATEGORY_VIBRATOR = "vibration";
|
||||
public static final String PREF_VIBRATION_STRENGTH = "vibration_strength";
|
||||
public static final String VIBRATION_STRENGTH_PATH = "/sys/devices/virtual/timed_output/vibrator/vtg_level";
|
||||
public static final String VIBRATION_STRENGTH_PATH = "/sys/module/qti_haptics/parameters/vmax_mv_override";
|
||||
|
||||
public static final String CATEGORY_NOTIF = "notification_led";
|
||||
public static final String PREF_NOTIF_LED = "notification_led_brightness";
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
on boot
|
||||
# XiaomiParts
|
||||
chown system system /sys/devices/virtual/timed_output/vibrator/vtg_level
|
||||
chmod 0660 /sys/devices/virtual/timed_output/vibrator/vtg_level
|
||||
chown system system /sys/module/qti_haptics/parameters/vmax_mv_override
|
||||
chmod 0660 /sys/module/qti_haptics/parameters/vmax_mv_override
|
||||
chown system system /sys/module/hall/parameters/hall_toggle
|
||||
chmod 0660 /sys/module/hall/parameters/hall_toggle
|
||||
|
||||
|
|
3
sepolicy/vendor/file_contexts
vendored
3
sepolicy/vendor/file_contexts
vendored
|
@ -29,6 +29,9 @@
|
|||
# Hall Switch
|
||||
/sys/module/hall/parameters(/.*)? u:object_r:hall_dev:s0
|
||||
|
||||
# Haptics control
|
||||
/sys/module/qti_haptics/parameters/vmax_mv_override u:object_r:sysfs_vibrator:s0
|
||||
|
||||
# Hexagon DSP-side executable needed for Halide operation
|
||||
# This is labeled as public_adsprpcd_file as it needs to be read by apps
|
||||
# (e.g. Google Camera App)
|
||||
|
|
Loading…
Reference in a new issue