Last active
December 13, 2016 21:39
-
-
Save invisiblek/e3e36ce10b6f9e86fcd53a57bb29e948 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java | |
index dedbc9e..2fd17b8 100644 | |
--- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java | |
+++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialog.java | |
@@ -699,13 +699,24 @@ public class VolumeDialog implements TunerService.Tunable { | |
private void updateNotificationRowH() { | |
VolumeRow notificationRow = findRow(AudioManager.STREAM_NOTIFICATION); | |
- if (notificationRow != null) { | |
- if (mState.linkedNotification) { | |
- removeRow(notificationRow); | |
+ if (Util.isVoiceCapable(mContext)) { | |
+ if (notificationRow != null) { | |
+ if (mState.linkedNotification) { | |
+ removeRow(notificationRow); | |
+ } | |
+ } else if (!mState.linkedNotification) { | |
+ addRow(AudioManager.STREAM_NOTIFICATION, | |
+ R.drawable.ic_volume_notification, R.drawable.ic_volume_notification_mute, true); | |
+ } | |
+ } else { | |
+ VolumeRow ringRow = findRow(AudioManager.STREAM_RING); | |
+ if (ringRow != null) { | |
+ removeRow(ringRow); | |
+ } | |
+ if (notificationRow == null) { | |
+ addRow(AudioManager.STREAM_NOTIFICATION, | |
+ R.drawable.ic_volume_notification, R.drawable.ic_volume_notification_mute, true); | |
} | |
- } else if (!mState.linkedNotification) { | |
- addRow(AudioManager.STREAM_NOTIFICATION, | |
- R.drawable.ic_volume_notification, R.drawable.ic_volume_notification_mute, true); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment