Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8b91d24 authored by Danesh Mondegarian's avatar Danesh Mondegarian
Browse files

Make lockscreen haptic feedback respect global settings.

Change-Id: Id3357287c7efed7d6b0278a927903316ca6f1ab3
parent ebff5255
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -931,8 +931,9 @@ public class RotarySelector extends View {
            mVibrator = (android.os.Vibrator)
                    getContext().getSystemService(Context.VIBRATOR_SERVICE);
        }
        final boolean hapticsEnabled = Settings.System.getInt(mContext.getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED, 0) == 1;
        long[] hapFeedback = stringToLongArray(Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY));
        mVibrator.vibrate(hapFeedback, -1);
        if (hapticsEnabled) mVibrator.vibrate(hapFeedback, -1);
    }

    /**
+2 −1
Original line number Diff line number Diff line
@@ -809,8 +809,9 @@ public class SlidingTab extends ViewGroup {
            mVibrator = (android.os.Vibrator)
                    getContext().getSystemService(Context.VIBRATOR_SERVICE);
        }
        final boolean hapticsEnabled = Settings.System.getInt(mContext.getContentResolver(), Settings.System.HAPTIC_FEEDBACK_ENABLED, 0) == 1;
        long[] hapFeedback = stringToLongArray(Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY));
        mVibrator.vibrate(hapFeedback, -1);
        if (hapticsEnabled) mVibrator.vibrate(hapFeedback, -1);
    }

    /**