summaryrefslogtreecommitdiffstats
path: root/services/java/com/android/server
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2012-10-10 16:30:37 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-10-10 16:30:56 -0700
commitbcfc1ca8ab8bf057e20d9369af3d007d80ca83e4 (patch)
tree105532e4538a4d0839777896ee1a6d520b50d45a /services/java/com/android/server
parentfb9010798d9352fd4f9413f882ffd214d69610b5 (diff)
parentd677054ca63f55abaa1c478ea3c50f6be665a979 (diff)
downloadframeworks_base-bcfc1ca8ab8bf057e20d9369af3d007d80ca83e4.zip
frameworks_base-bcfc1ca8ab8bf057e20d9369af3d007d80ca83e4.tar.gz
frameworks_base-bcfc1ca8ab8bf057e20d9369af3d007d80ca83e4.tar.bz2
Merge "Don't play notifications during speech recognition" into jb-mr1-dev
Diffstat (limited to 'services/java/com/android/server')
-rwxr-xr-xservices/java/com/android/server/NotificationManagerService.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 93ae029..09a606e 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -1069,8 +1069,9 @@ public class NotificationManagerService extends INotificationManager.Stub
}
mSoundNotification = r;
// do not play notifications if stream volume is 0
- // (typically because ringer mode is silent).
- if (audioManager.getStreamVolume(audioStreamType) != 0) {
+ // (typically because ringer mode is silent) or if speech recognition is active.
+ if ((audioManager.getStreamVolume(audioStreamType) != 0)
+ && !audioManager.isSpeechRecognitionActive()) {
final long identity = Binder.clearCallingIdentity();
try {
final IRingtonePlayer player = mAudioService.getRingtonePlayer();