diff --git a/res/values/strings.xml b/res/values/strings.xml
index 3a3e3ef..15f1e79 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5927,10 +5927,16 @@
 
 
     <!-- Sounds and Notification -->
-    <!-- Sound: Dashboard summary indicating the volume of ringtong. example: Ring volume at 20%.
+    <!-- Sound: Dashboard summary indicating the volume of ringtone. example: Ring volume at 20%.
     [CHAR LIMIT=100] -->
     <string name="sound_settings_summary">Ring volume at <xliff:g id="percentage" example="2%">%1$s</xliff:g></string>
 
+    <!-- Sound: Dashboard summary indicating the volume of ringtone when at 0% with vibrate enabled. [CHAR LIMIT=100] -->
+    <string name="sound_settings_summary_vibrate">Ringer set to vibrate</string>
+
+    <!-- Sound: Dashboard summary indicating the volume of ringtone when at 0% with vibrate disabled [CHAR LIMIT=100] -->
+    <string name="sound_settings_summary_silent">Ringer set to silent</string>
+
     <!-- Sound: Dashboard summary example used in Setup Wizard preview screen. [CHAR LIMIT=100] -->
     <string name="sound_settings_example_summary">Ring volume at 80%</string>
 
diff --git a/src/com/android/settings/notification/SoundSettings.java b/src/com/android/settings/notification/SoundSettings.java
index 566bb9a..30dd129 100644
--- a/src/com/android/settings/notification/SoundSettings.java
+++ b/src/com/android/settings/notification/SoundSettings.java
@@ -594,10 +594,21 @@
 
         @Override
         public void onReceive(Context context, Intent intent) {
-            String percent =  NumberFormat.getPercentInstance().format(
-                    (double) mAudioManager.getStreamVolume(AudioManager.STREAM_RING) / maxVolume);
-            mSummaryLoader.setSummary(this,
-                    mContext.getString(R.string.sound_settings_summary, percent));
+            final int ringerMode = mAudioManager.getRingerMode();
+            int resId;
+            String percent = "";
+            if (ringerMode == mAudioManager.RINGER_MODE_SILENT) {
+                resId = R.string.sound_settings_summary_silent;
+            } else if (ringerMode == mAudioManager.RINGER_MODE_VIBRATE){
+                resId = R.string.sound_settings_summary_vibrate;
+            }
+            else {
+                percent =  NumberFormat.getPercentInstance().format(
+                        (double) mAudioManager.getStreamVolume(
+                                AudioManager.STREAM_RING) / maxVolume);
+                resId = R.string.sound_settings_summary;
+            }
+            mSummaryLoader.setSummary(this, mContext.getString(resId, percent));
         }
     }
 
diff --git a/tests/app/Android.mk b/tests/app/Android.mk
index cd13384..a641648 100644
--- a/tests/app/Android.mk
+++ b/tests/app/Android.mk
@@ -7,10 +7,15 @@
 
 LOCAL_JAVA_LIBRARIES := android.test.runner bouncycastle
 
+LOCAL_STATIC_ANDROID_LIBRARIES := \
+    android-support-v4
+
 LOCAL_STATIC_JAVA_LIBRARIES := \
     android-support-test \
     mockito-target \
-    espresso-core
+    espresso-core \
+    espresso-contrib \
+    espresso-intents
 
 # Include all test java files.
 LOCAL_SRC_FILES := $(call all-java-files-under, src)
diff --git a/tests/app/src/com/android/settings/notification/SoundSettingsIntegrationTest.java b/tests/app/src/com/android/settings/notification/SoundSettingsIntegrationTest.java
new file mode 100644
index 0000000..dff7e61
--- /dev/null
+++ b/tests/app/src/com/android/settings/notification/SoundSettingsIntegrationTest.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2016 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.
+ */
+package com.android.settings.notification;
+
+import static android.support.test.espresso.Espresso.onView;
+import static android.support.test.espresso.assertion.ViewAssertions.matches;
+import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant;
+import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
+import static android.support.test.espresso.matcher.ViewMatchers.withId;
+import static android.support.test.espresso.matcher.ViewMatchers.withText;
+import static org.hamcrest.Matchers.allOf;
+import static org.hamcrest.Matchers.containsString;
+
+import android.content.Context;
+import android.media.AudioManager;
+import android.support.test.espresso.contrib.RecyclerViewActions;
+import android.support.test.filters.SmallTest;
+import android.support.test.rule.ActivityTestRule;
+import android.support.test.runner.AndroidJUnit4;
+import com.android.settings.R;
+import com.android.settings.Settings;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+@RunWith(AndroidJUnit4.class)
+@SmallTest
+public class SoundSettingsIntegrationTest {
+
+    private AudioManager mAudioManager;
+    private final String TRUNCATED_SUMMARY = "Ring volume at";
+
+    @Rule
+    public ActivityTestRule<Settings> mActivityRule =
+            new ActivityTestRule<>(Settings.class, true);
+
+    @Test
+    public void soundPreferenceShowsCorrectSummaryOnSilentMode() {
+        mAudioManager = (AudioManager) mActivityRule.getActivity().getApplicationContext()
+                .getSystemService(Context.AUDIO_SERVICE);
+        mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT);
+        onView(withId(R.id.dashboard_container))
+                .perform(RecyclerViewActions.scrollTo(
+                        hasDescendant(withText(R.string.sound_settings))));
+        onView(withText(R.string.sound_settings_summary_silent)).check(matches(isDisplayed()));
+    }
+
+    @Test
+    public void soundPreferenceShowsCorrectSummaryOnVibrateMode() {
+        mAudioManager = (AudioManager) mActivityRule.getActivity().getApplicationContext()
+                .getSystemService(Context.AUDIO_SERVICE);
+        mAudioManager.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);
+        onView(withId(R.id.dashboard_container)).perform(RecyclerViewActions
+                .scrollTo(hasDescendant(withText(R.string.sound_settings))));
+        onView(withText(R.string.sound_settings_summary_vibrate)).check(matches(isDisplayed()));
+    }
+
+    @Test
+    public void soundPreferenceShowsCorrectSummaryOnMaxVolume() {
+        mAudioManager = (AudioManager) mActivityRule.getActivity().getApplicationContext()
+                .getSystemService(Context.AUDIO_SERVICE);
+        mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL);
+        mAudioManager.setStreamVolume(AudioManager.STREAM_RING,
+                mAudioManager.getStreamMaxVolume(AudioManager.STREAM_RING), 0);
+        onView(withId(R.id.dashboard_container))
+                .perform(RecyclerViewActions.scrollTo(
+                        hasDescendant(withText(R.string.sound_settings))));
+        onView(withText(containsString(TRUNCATED_SUMMARY))).check(matches(isDisplayed()));
+    }
+}
\ No newline at end of file
