If we need to set the touch vibration switch to open and remove the sliding unlock vibration effect, you need to make the following modifications.
In the Lockscreen method in the Lockscreen.java class
Copy Code code as follows:
else if (munlockwidget instanceof Multiwaveview) {
Multiwaveview Multiwaveview = (multiwaveview) munlockwidget;
Multiwaveview.setvibrateenabled (Settings.System.getInt (Mcontext.getcontentresolver),//by determining whether the touch vibration effect is set to set the shaking of the unlock.
Settings.System.HAPTIC_FEEDBACK_ENABLED, 1)!= 0);
Multiwaveviewmethods multiwaveviewmethods = new Multiwaveviewmethods (Multiwaveview);
Multiwaveview.setontriggerlistener (Multiwaveviewmethods);
Munlockwidgetmethods = Multiwaveviewmethods;
I'm going to join you here.
Copy Code code as follows:
Class Multiwaveviewmethods implements Multiwaveview.ontriggerlistener,
Unlockwidgetcommonmethods {
Private final Multiwaveview Mmultiwaveview;
Private Boolean mcameradisabled;
Multiwaveviewmethods (Multiwaveview multiwaveview) {
Mmultiwaveview = Multiwaveview;
Multiwaveview.setvibrateenabled (Settings.System.getInt) (Mcontext.getcontentresolver (),
Settings.System.HAPTIC_FEEDBACK_ENABLED, 1)!= 0);
Final Boolean cameradisabled = Mlockpatternutils.getdevicepolicymanager ()
. getcameradisabled (NULL);
Because the main use of sliding unlock is to multiwaveview this control, which is set whether the vibration properties.