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

Commit 4f78f8cb authored by Jean Chalard's avatar Jean Chalard Committed by Android (Google) Code Review
Browse files

Merge "Remove a vibration-related option when there's no vibrator" into jb-dev

parents 62cd919d c7f2878c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -151,6 +151,11 @@ public class Settings extends InputMethodSettingsFragment

        if (!VibratorUtils.getInstance(context).hasVibrator()) {
            generalSettings.removePreference(findPreference(PREF_VIBRATE_ON));
            final PreferenceGroup advancedSettings =
                    (PreferenceGroup) findPreference(PREF_ADVANCED_SETTINGS);
            if (null != advancedSettings) { // Theoretically advancedSettings cannot be null
                advancedSettings.removePreference(findPreference(PREF_VIBRATION_DURATION_SETTINGS));
            }
        }

        final boolean showPopupOption = res.getBoolean(