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

Commit 88672d32 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Merge "Make lockscreen haptic feedback respect global settings." into gingerbread

parents 238d05dd a8b91d24
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -931,8 +931,9 @@ public class RotarySelector extends View {
            mVibrator = (android.os.Vibrator)
            mVibrator = (android.os.Vibrator)
                    getContext().getSystemService(Context.VIBRATOR_SERVICE);
                    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));
        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 Original line Diff line number Diff line
@@ -809,8 +809,9 @@ public class SlidingTab extends ViewGroup {
            mVibrator = (android.os.Vibrator)
            mVibrator = (android.os.Vibrator)
                    getContext().getSystemService(Context.VIBRATOR_SERVICE);
                    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));
        long[] hapFeedback = stringToLongArray(Settings.System.getString(getContext().getContentResolver(),Settings.System.HAPTIC_DOWN_ARRAY));
        mVibrator.vibrate(hapFeedback, -1);
        if (hapticsEnabled) mVibrator.vibrate(hapFeedback, -1);
    }
    }


    /**
    /**