Do not display volume settings if volume is fixed
When the configuration option config_useFixedVolume is true indicating that stream volumes cannot be modified, the volume settings submenu is not available. Bug 8161458 Change-Id: I6d76a2f85c642778ae8c4caa7347b50f659c1def
This commit is contained in:
@@ -145,6 +145,11 @@ public class SoundSettings extends SettingsPreferenceFragment implements
|
|||||||
findPreference(KEY_RING_VOLUME).setDependency(null);
|
findPreference(KEY_RING_VOLUME).setDependency(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getResources().getBoolean(com.android.internal.R.bool.config_useFixedVolume)) {
|
||||||
|
// device with fixed volume policy, do not display volumes submenu
|
||||||
|
getPreferenceScreen().removePreference(findPreference(KEY_RING_VOLUME));
|
||||||
|
}
|
||||||
|
|
||||||
mVibrateWhenRinging = (CheckBoxPreference) findPreference(KEY_VIBRATE);
|
mVibrateWhenRinging = (CheckBoxPreference) findPreference(KEY_VIBRATE);
|
||||||
mVibrateWhenRinging.setPersistent(false);
|
mVibrateWhenRinging.setPersistent(false);
|
||||||
mVibrateWhenRinging.setChecked(Settings.System.getInt(resolver,
|
mVibrateWhenRinging.setChecked(Settings.System.getInt(resolver,
|
||||||
|
Reference in New Issue
Block a user