Make AUDIO_USAGE_NOTIFICATION_EVENT available to HALs
This aligns the list of usages between the framework and HALs Bug: 199193042 Test: atest android.hardware.audio@7.1-util_tests Test: atest android.hardware.audio.common@7.1-util_tests Test: atest VtsHalAudioV7_1TargetTest Change-Id: I4d7fdbacff87eebcbc8d68dd6ed8cefdd52aa84e
This commit is contained in:
parent
ec8ef38ad9
commit
a85cebb63e
3 changed files with 6 additions and 0 deletions
|
@ -359,6 +359,7 @@ package android.audio.policy.configuration.V7_1 {
|
|||
enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_GAME;
|
||||
enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_MEDIA;
|
||||
enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION;
|
||||
enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION_EVENT;
|
||||
enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE;
|
||||
enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_SAFETY;
|
||||
enum_constant public static final android.audio.policy.configuration.V7_1.AudioUsage AUDIO_USAGE_UNKNOWN;
|
||||
|
|
|
@ -443,6 +443,7 @@
|
|||
<xs:enumeration value="AUDIO_USAGE_ALARM" />
|
||||
<xs:enumeration value="AUDIO_USAGE_NOTIFICATION" />
|
||||
<xs:enumeration value="AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE" />
|
||||
<xs:enumeration value="AUDIO_USAGE_NOTIFICATION_EVENT" />
|
||||
<xs:enumeration value="AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY" />
|
||||
<xs:enumeration value="AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE" />
|
||||
<xs:enumeration value="AUDIO_USAGE_ASSISTANCE_SONIFICATION" />
|
||||
|
|
|
@ -485,8 +485,12 @@ status_t HidlUtils::audioGainToHal(const AudioGain& gain, struct audio_gain* hal
|
|||
status_t HidlUtils::audioUsageFromHal(audio_usage_t halUsage, AudioUsage* usage) {
|
||||
if (halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST ||
|
||||
halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT ||
|
||||
#if MAJOR_VERSION == 7 && MINOR_VERSION == 1
|
||||
halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED) {
|
||||
#else
|
||||
halUsage == AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED ||
|
||||
halUsage == AUDIO_USAGE_NOTIFICATION_EVENT) {
|
||||
#endif
|
||||
halUsage = AUDIO_USAGE_NOTIFICATION;
|
||||
}
|
||||
*usage = audio_usage_to_string(halUsage);
|
||||
|
|
Loading…
Reference in a new issue