Remove a vibration-related option when there's no vibrator
Bug: 6567160 Change-Id: I1b5d425ffb64b2d7390cd0b7be0825f6aca17f41
This commit is contained in:
parent
902275cb5d
commit
c7f2878cf5
1 changed files with 5 additions and 0 deletions
|
@ -151,6 +151,11 @@ public class Settings extends InputMethodSettingsFragment
|
||||||
|
|
||||||
if (!VibratorUtils.getInstance(context).hasVibrator()) {
|
if (!VibratorUtils.getInstance(context).hasVibrator()) {
|
||||||
generalSettings.removePreference(findPreference(PREF_VIBRATE_ON));
|
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(
|
final boolean showPopupOption = res.getBoolean(
|
||||||
|
|
Loading…
Reference in a new issue