diff options
author | Eric Laurent <elaurent@google.com> | 2021-01-06 16:05:55 +0100 |
---|---|---|
committer | Eric Laurent <elaurent@google.com> | 2021-02-05 13:59:10 +0100 |
commit | ae3df8e88d9f4a734c0d8d26b1030426ea4d48ff (patch) | |
tree | 178f287ffac02e999a0bda8be88fad9c7316f955 /tools/aapt2/java/JavaClassGenerator_test.cpp | |
parent | bbb6854f6e92d7481cef733c98e8efb2ae01af27 (diff) |
AudioService: refactor audio mode stack
Refactor stack used for audio mode management
and update logic to determine audio mode owner to better
accomodate concurrency and misbehaving VoIP apps:
- A non privileged app is considered active if it plays or records for
VOICE_COMMUNICATION.
- Do not remove inactive VoIP apps from the stack but flag them as
inactive. An inactive, non privileged app cannot be selected as mode
owner for mode IN_COMMUNICATION.
- The most recent privileged app if any or active non privileged app is
selected as audio mode owner when current audio mode is evaluated.
- Audio mode evaluation and setting to native server always happens in
the message handler.
- Update active state in playback and recording monitor callbacks
instead of by polling.
- When an app enters the stack or becomes inactive, give it a grace period
in active state after which the active state is evaluated again. This
avoids spurious brief mode changes on playback/record transitions.
- Add dumpsys entries for audio mode stack
Bug: 174714082
Test: atest AudioManagerTest
Test: Manual audio smoke tests
Change-Id: Id4d12c855ca1ac79beccb34e751aeae593acf6d7
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions