From 1feff713873c2de7c3ef8df3cbcca706d8686d85 Mon Sep 17 00:00:00 2001 From: Beverly Date: Wed, 29 May 2019 09:31:12 -0400 Subject: [PATCH] Change suppresible type of voice comm signalling USAGE_VOICE_COMMUNICATION_SIGNALLING shouldn't be considered SUPPRESSIBLE_SYSTEM. It includes the ring tone sound when in a call. Instead, it should not be suppressible like USAGE_VOICE_COMMUNICATION. Test: manual Fixes: 131756661 Change-Id: Ide8aafafe58c421f3b699e6de9358b4e73ad01c5 --- media/java/android/media/AudioAttributes.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media/java/android/media/AudioAttributes.java b/media/java/android/media/AudioAttributes.java index dc3041fb4878e..820d82dd3bd10 100644 --- a/media/java/android/media/AudioAttributes.java +++ b/media/java/android/media/AudioAttributes.java @@ -222,10 +222,10 @@ public final class AudioAttributes implements Parcelable { public final static int SUPPRESSIBLE_MEDIA = 5; /** * @hide - * Denotes a usage for all other sounds not caught in SUPPRESSIBLE_NOTIFICATION, + * Denotes a usage for sounds not caught in SUPPRESSIBLE_NOTIFICATION, * SUPPRESSIBLE_CALL,SUPPRESSIBLE_NEVER, SUPPRESSIBLE_ALARM or SUPPRESSIBLE_MEDIA. - * This includes system, sonification and unknown sounds. - * These will be muted when the Zen priority mode doesn't allow sytem sounds + * This includes sonification sounds. + * These will be muted when the Zen priority mode doesn't allow system sounds * @see #SUPPRESSIBLE_USAGES */ public final static int SUPPRESSIBLE_SYSTEM = 6; @@ -248,6 +248,7 @@ public final class AudioAttributes implements Parcelable { SUPPRESSIBLE_USAGES.put(USAGE_NOTIFICATION_EVENT, SUPPRESSIBLE_NOTIFICATION); SUPPRESSIBLE_USAGES.put(USAGE_ASSISTANCE_ACCESSIBILITY, SUPPRESSIBLE_NEVER); SUPPRESSIBLE_USAGES.put(USAGE_VOICE_COMMUNICATION, SUPPRESSIBLE_NEVER); + SUPPRESSIBLE_USAGES.put(USAGE_VOICE_COMMUNICATION_SIGNALLING, SUPPRESSIBLE_NEVER); SUPPRESSIBLE_USAGES.put(USAGE_ALARM, SUPPRESSIBLE_ALARM); SUPPRESSIBLE_USAGES.put(USAGE_MEDIA, SUPPRESSIBLE_MEDIA); SUPPRESSIBLE_USAGES.put(USAGE_ASSISTANCE_NAVIGATION_GUIDANCE, SUPPRESSIBLE_MEDIA); @@ -255,7 +256,6 @@ public final class AudioAttributes implements Parcelable { SUPPRESSIBLE_USAGES.put(USAGE_ASSISTANT, SUPPRESSIBLE_MEDIA); /** default volume assignment is STREAM_MUSIC, handle unknown usage as media */ SUPPRESSIBLE_USAGES.put(USAGE_UNKNOWN, SUPPRESSIBLE_MEDIA); - SUPPRESSIBLE_USAGES.put(USAGE_VOICE_COMMUNICATION_SIGNALLING, SUPPRESSIBLE_SYSTEM); SUPPRESSIBLE_USAGES.put(USAGE_ASSISTANCE_SONIFICATION, SUPPRESSIBLE_SYSTEM); }