Merge "Get rid of the silent mode pref on xlarge." into honeycomb
This commit is contained in:
21
res/values-xlarge/bools.xml
Normal file
21
res/values-xlarge/bools.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright (C) 2011 The Android Open Source Project
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<!-- Whether there is a silent mode checkbox -->
|
||||
<bool name="has_silent_mode">false</bool>
|
||||
</resources>
|
||||
|
@@ -20,4 +20,6 @@
|
||||
<bool name="has_intrusive_led">false</bool>
|
||||
<!-- Whether or not the dock settings are to be displayed for this device when docked -->
|
||||
<bool name="has_dock_settings">false</bool>
|
||||
<!-- Whether there is a silent mode checkbox -->
|
||||
<bool name="has_silent_mode">true</bool>
|
||||
</resources>
|
||||
|
@@ -43,6 +43,7 @@ public class SoundSettings extends SettingsPreferenceFragment implements
|
||||
|
||||
private static final String KEY_SILENT = "silent";
|
||||
private static final String KEY_VIBRATE = "vibrate";
|
||||
private static final String KEY_RING_VOLUME = "ring_volume";
|
||||
private static final String KEY_DTMF_TONE = "dtmf_tone";
|
||||
private static final String KEY_SOUND_EFFECTS = "sound_effects";
|
||||
private static final String KEY_HAPTIC_FEEDBACK = "haptic_feedback";
|
||||
@@ -110,6 +111,10 @@ public class SoundSettings extends SettingsPreferenceFragment implements
|
||||
}
|
||||
|
||||
mSilent = (CheckBoxPreference) findPreference(KEY_SILENT);
|
||||
if (!getResources().getBoolean(R.bool.has_silent_mode)) {
|
||||
getPreferenceScreen().removePreference(mSilent);
|
||||
findPreference(KEY_RING_VOLUME).setDependency(null);
|
||||
}
|
||||
|
||||
mVibrate = (ListPreference) findPreference(KEY_VIBRATE);
|
||||
mVibrate.setOnPreferenceChangeListener(this);
|
||||
|
Reference in New Issue
Block a user