In-call-notif doesn't use AUDIBILITY_ENFORCED flag

Audibilty enforced flag should only be used to make sure system
sounds are audible when this is mandated by a given country regulation.
Here, it was used incorrectly.  Also, adjusted in-call notification
sound to be less loud.

Fixes: 66808711
Test: manual

Change-Id: I119a718fb5fc605b6f6b3e387e5e9f956cfd5fff
This commit is contained in:
Beverly
2017-09-27 09:58:59 -04:00
parent 4a324cb196
commit ab804f0554
2 changed files with 1 additions and 3 deletions

View File

@@ -3023,7 +3023,7 @@
<bool name="config_handleVolumeKeysInWindowManager">false</bool>
<!-- Volume level of in-call notification tone playback [0..1] -->
<item name="config_inCallNotificationVolume" format="float" type="dimen">.25</item>
<item name="config_inCallNotificationVolume" format="float" type="dimen">.10</item>
<!-- URI for in call notification sound -->
<string translatable="false" name="config_inCallNotificationSound">/system/media/audio/ui/InCallNotification.ogg</string>

View File

@@ -1278,13 +1278,11 @@ public class NotificationManagerService extends SystemService {
R.array.config_notificationFallbackVibePattern,
VIBRATE_PATTERN_MAXLEN,
DEFAULT_VIBRATE_PATTERN);
mInCallNotificationUri = Uri.parse("file://" +
resources.getString(R.string.config_inCallNotificationSound));
mInCallNotificationAudioAttributes = new AudioAttributes.Builder()
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.setUsage(AudioAttributes.USAGE_VOICE_COMMUNICATION)
.setFlags(AudioAttributes.FLAG_AUDIBILITY_ENFORCED)
.build();
mInCallNotificationVolume = resources.getFloat(R.dimen.config_inCallNotificationVolume);