summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java13
-rw-r--r--services/core/java/com/android/server/audio/AudioService.java11
2 files changed, 17 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
index 9fda531..555c2d1 100644
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java
@@ -192,8 +192,13 @@ public class VolumeDialog {
}
});
- addRow(AudioManager.STREAM_RING,
- R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer_mute, true);
+ if (Util.isVoiceCapable(mContext)) {
+ addRow(AudioManager.STREAM_RING,
+ R.drawable.ic_volume_ringer, R.drawable.ic_volume_ringer_mute, true);
+ } else {
+ addRow(AudioManager.STREAM_RING, R.drawable.ic_volume_notification,
+ R.drawable.ic_volume_notification_mute, true);
+ }
addRow(AudioManager.STREAM_MUSIC,
R.drawable.ic_volume_media, R.drawable.ic_volume_media_mute, true);
addRow(AudioManager.STREAM_ALARM,
@@ -635,7 +640,9 @@ public class VolumeDialog {
}
}
- updateNotificationRowH();
+ if (Util.isVoiceCapable(mContext)) {
+ updateNotificationRowH();
+ }
if (mActiveStream != state.activeStream) {
mActiveStream = state.activeStream;
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index fe3df61..7b90c83 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -1101,10 +1101,13 @@ public class AudioService extends IAudioService.Stub {
mStreamVolumeAlias[AudioSystem.STREAM_DTMF] = dtmfStreamAlias;
- if (mLinkNotificationWithVolume && mVoiceCapable) {
- mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_RING;
- } else {
- mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_NOTIFICATION;
+ if (mVoiceCapable) {
+ if (mLinkNotificationWithVolume) {
+ mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] = AudioSystem.STREAM_RING;
+ } else {
+ mStreamVolumeAlias[AudioSystem.STREAM_NOTIFICATION] =
+ AudioSystem.STREAM_NOTIFICATION;
+ }
}
if (updateVolumes) {