Merge "Get rid of the silent mode pref on xlarge." into honeycomb
diff --git a/res/values-xlarge/bools.xml b/res/values-xlarge/bools.xml
new file mode 100644
index 0000000..bde07d7
--- /dev/null
+++ b/res/values-xlarge/bools.xml
@@ -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>
+
diff --git a/res/values/bools.xml b/res/values/bools.xml
index 61cc79e..f4a95f3 100644
--- a/res/values/bools.xml
+++ b/res/values/bools.xml
@@ -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>
diff --git a/src/com/android/settings/SoundSettings.java b/src/com/android/settings/SoundSettings.java
index cc38c23..23c7096 100644
--- a/src/com/android/settings/SoundSettings.java
+++ b/src/com/android/settings/SoundSettings.java
@@ -43,6 +43,7 @@
 
     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 @@
         }
 
         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);