mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-04 08:08:16 +02:00
Added option to disable haptic feedback
This commit is contained in:
@@ -1926,6 +1926,17 @@ public class Helper {
|
||||
}
|
||||
}
|
||||
|
||||
static void performHapticFeedback(View view, int feedbackConstant) {
|
||||
performHapticFeedback(view, feedbackConstant, 0);
|
||||
}
|
||||
|
||||
static void performHapticFeedback(@NonNull View view, int feedbackConstant, int flags) {
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(view.getContext());
|
||||
boolean haptic_feedback = prefs.getBoolean("haptic_feedback", true);
|
||||
if (haptic_feedback)
|
||||
view.performHapticFeedback(feedbackConstant);
|
||||
}
|
||||
|
||||
// Graphics
|
||||
|
||||
static int dp2pixels(Context context, int dp) {
|
||||
|
||||
Reference in New Issue
Block a user