diff options
| author | Jean-Michel Trivi <jmtrivi@google.com> | 2012-10-10 16:30:37 -0700 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-10-10 16:30:56 -0700 |
| commit | bcfc1ca8ab8bf057e20d9369af3d007d80ca83e4 (patch) | |
| tree | 105532e4538a4d0839777896ee1a6d520b50d45a /services/java/com/android/server | |
| parent | fb9010798d9352fd4f9413f882ffd214d69610b5 (diff) | |
| parent | d677054ca63f55abaa1c478ea3c50f6be665a979 (diff) | |
| download | frameworks_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-x | services/java/com/android/server/NotificationManagerService.java | 5 |
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(); |
