Comment 25 for bug 1433590

Revision history for this message
Zhang Enwei (zhangew401) wrote :

I have compiled the usensord binary based on current solution.
I did some tests and it works well.
Since settings part is not ready, I am using below command to change the property whose default value is 0(means not vibrate).
dbus-send --session --print-reply --type=method_call --dest='com.canonical.usensord' /com/canonical/usensord/haptic org.freedesktop.DBus.Properties.Set string:"com.canonical.usensord.haptic" string:"OtherVibrate" uint32:1

Code is here: https://code.launchpad.net/~zhangew401/usensord/fix-lp-1433590
and the logic is
do vibration for OSK always.
do vibration for others only when the property is 1(means enabled in settings)

The property is saved in file, /home/phablet/.config/usensord/prop so that it will be restored after factory reset.