commit | 329399eada212c432aa6450471c573481adba757 | [log] [tgz] |
---|---|---|
author | Eric Laurent <elaurent@google.com> | Thu Jun 27 14:44:20 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jun 28 23:10:39 2024 +0000 |
tree | 1e3c11224c687cfb1f9dad9dbc19d5a57fee7186 | |
parent | 961b622ed7f371d6cb6a3e188b1eddcad7883a13 [diff] |
audio policy: fix mmap behavior on device disconnection Commit 8e70cf81 changed the behavior od an AAudio MMAP stream when playing over built-in speaker and a wired headset is connected. This change restores previous behavior while preserving the fix for b/345044066. Bug: 345044066 Bug: 338143144 Bug: 349622795 Flag: EXEMPT bug fix Test: Oboe Tester TEST DISCONNECT (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a491c7c43a240b7862926a779a70ff1833aac55d) Merged-In: I905585b718c298b0dabefacff4f667f7e4981572 Change-Id: I905585b718c298b0dabefacff4f667f7e4981572
diff --git a/services/audiopolicy/common/managerdefinitions/include/AudioIODescriptorInterface.h b/services/audiopolicy/common/managerdefinitions/include/AudioIODescriptorInterface.h index 3edd4de..e519766 100644 --- a/services/audiopolicy/common/managerdefinitions/include/AudioIODescriptorInterface.h +++ b/services/audiopolicy/common/managerdefinitions/include/AudioIODescriptorInterface.h
@@ -53,7 +53,7 @@ // a preferred device in which case the first client drives the selection. if (desc->isMmap()) { auto matchingClients = desc->clientsList( - false /*activeOnly*/, filter, true /*preferredDevice*/); + false /*activeOnly*/, filter, false /*preferredDevice*/); if (matchingClients.empty()) { return nullptr; }