diff options
author | fuzz <fuzzzzzzzzzzzzzzzzzz@gmail.com> | 2013-03-09 09:42:24 +0900 |
---|---|---|
committer | fuzz <fuzzzzzzzzzzzzzzzzzz@gmail.com> | 2013-03-09 09:42:24 +0900 |
commit | 294aded6637d69bbdc65155d63ab77e2183f7bac (patch) | |
tree | 69fc0faec793ee888cc4b168bb69ed9fa84cefb1 /src/com/android/settings/SoundSettings.java | |
parent | 0048ad072ed33b5e213ec142097797c013ef2232 (diff) | |
download | packages_apps_settings-294aded6637d69bbdc65155d63ab77e2183f7bac.zip packages_apps_settings-294aded6637d69bbdc65155d63ab77e2183f7bac.tar.gz packages_apps_settings-294aded6637d69bbdc65155d63ab77e2183f7bac.tar.bz2 |
Hide Volume adjustment sound if it's not supported
Change-Id: I8c21c04135ac8d22208c8a2c2feff3863bd43cc0
Diffstat (limited to 'src/com/android/settings/SoundSettings.java')
-rw-r--r-- | src/com/android/settings/SoundSettings.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/com/android/settings/SoundSettings.java b/src/com/android/settings/SoundSettings.java index a6e0abd..8af0c67 100644 --- a/src/com/android/settings/SoundSettings.java +++ b/src/com/android/settings/SoundSettings.java @@ -225,8 +225,14 @@ public class SoundSettings extends SettingsPreferenceFragment implements mHapticFeedback.setChecked(Settings.System.getInt(resolver, Settings.System.HAPTIC_FEEDBACK_ENABLED, 1) != 0); mVolumeAdjustSounds = (CheckBoxPreference) findPreference(KEY_VOLUME_ADJUST_SOUNDS); - mVolumeAdjustSounds.setChecked(Settings.System.getInt(resolver, - Settings.System.VOLUME_ADJUST_SOUNDS_ENABLED, 1) != 0); + if (mVolumeAdjustSounds != null) { + if (!Utils.hasVolumeRocker(getActivity())) { + getPreferenceScreen().removePreference(mVolumeAdjustSounds); + } else { + mVolumeAdjustSounds.setChecked(Settings.System.getInt(resolver, + Settings.System.VOLUME_ADJUST_SOUNDS_ENABLED, 1) != 0); + } + } mLockSounds = (CheckBoxPreference) findPreference(KEY_LOCK_SOUNDS); mLockSounds.setPersistent(false); mLockSounds.setChecked(Settings.System.getInt(resolver, |