diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index e2a318ab6f96a..d32ce55d84954 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -755,8 +755,11 @@
Customize
-
- This blocks ALL sounds and vibrations, including from alarms, music, videos, and games. You’ll still be able to make phone calls.
+
+ This blocks ALL sounds and vibrations, including from alarms, music, videos, and games. You’ll still be able to make phone calls.
+
+
+ This blocks ALL sounds and vibrations, including from alarms, music, videos, and games.
+%d
diff --git a/packages/SystemUI/src/com/android/systemui/volume/Util.java b/packages/SystemUI/src/com/android/systemui/volume/Util.java
index 421409156a384..a46a44d9c8e3a 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/Util.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/Util.java
@@ -16,11 +16,13 @@
package com.android.systemui.volume;
+import android.content.Context;
import android.media.AudioManager;
import android.media.MediaMetadata;
import android.media.VolumeProvider;
import android.media.session.MediaController.PlaybackInfo;
import android.media.session.PlaybackState;
+import android.telephony.TelephonyManager;
import android.view.View;
import android.widget.TextView;
@@ -164,4 +166,9 @@ class Util {
v.setVisibility(vis ? View.VISIBLE : View.INVISIBLE);
}
+ public static boolean isVoiceCapable(Context context) {
+ final TelephonyManager telephony =
+ (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
+ return telephony != null && telephony.isVoiceCapable();
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
index a0eb61fc50e3d..8035cd3a2d5e1 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/ZenModePanel.java
@@ -118,6 +118,7 @@ public class ZenModePanel extends LinearLayout {
private Condition mSessionExitCondition;
private Condition[] mConditions;
private Condition mTimeCondition;
+ private boolean mVoiceCapable;
public ZenModePanel(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -127,6 +128,7 @@ public class ZenModePanel extends LinearLayout {
mIconPulser = new IconPulser(mContext);
mForeverId = Condition.newId(mContext).appendPath("forever").build();
mSpTexts = new SpTexts(mContext);
+ mVoiceCapable = Util.isVoiceCapable(mContext);
if (DEBUG) Log.d(mTag, "new ZenModePanel");
}
@@ -144,6 +146,7 @@ public class ZenModePanel extends LinearLayout {
pw.println(mPrefs.mConfirmedPriorityIntroduction);
pw.print(" mConfirmedSilenceIntroduction=");
pw.println(mPrefs.mConfirmedSilenceIntroduction);
+ pw.print(" mVoiceCapable="); pw.println(mVoiceCapable);
mTransitionHelper.dump(fd, pw, args);
}
@@ -444,6 +447,7 @@ public class ZenModePanel extends LinearLayout {
mZenIntroduction.setVisibility(introduction ? VISIBLE : GONE);
if (introduction) {
mZenIntroductionMessage.setText(zenImportant ? R.string.zen_priority_introduction
+ : mVoiceCapable ? R.string.zen_silence_introduction_voice
: R.string.zen_silence_introduction);
mZenIntroductionCustomize.setVisibility(zenImportant ? VISIBLE : GONE);
}