am 4f78f8cb: Merge "Remove a vibration-related option when there\'s no vibrator" into jb-dev

* commit '4f78f8cb795a754bbe36b3334cb77e2a5b59c278':
  Remove a vibration-related option when there's no vibrator
main
Jean Chalard 2012-05-29 23:34:34 -07:00 committed by Android Git Automerger
commit 40bab488cb
1 changed files with 5 additions and 0 deletions

View File

@ -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(