To support vehicle-specific power management, Android provides a
CarPowerManagementService service and a
CarPowerManager interface. The power
policy affects the Android Automotive OS (AAOS) audio stack and the audio HAL
with the audio component,
learn more, see Power Management.
CarAudioPowerListener is registered on
CarPowerManagementService when the dynamic audio routing is enabled. This
CarAudioService to listen to power policy changes related to audio.
When audio is disabled by the power policy, the following actions take place:
Only focus requests of critical audio attribute usages are retained. Other focus requests are abandoned.
All incoming focus requests of non-critical audio attribute usages are rejected.
If car volume group muting is used, car volume groups that do not contain audio context for critical audio attribute usages are muted.
The following audio attribute usages are considered as critical:
In Sample configuration (version 2), we recommend you use separate volume groups for system sounds, including emergency and safety, from other contexts in the primary audio zone. In this way, volume groups for all non-critical audio attribute usages are muted when audio is disabled, while emergency and safety sounds remain unmuted.