am 1d6aedb3: am bf2751a5: am 7ccc6b9b: Merge "fix audio patch leak." into lmp-mr1-dev
* commit '1d6aedb3581f1ef2ce9862b1b1d03c9fd3cfff83':
fix audio patch leak.
diff --git a/services/audiopolicy/AudioPolicyService.cpp b/services/audiopolicy/AudioPolicyService.cpp
index b80380e..eb9116d 100644
--- a/services/audiopolicy/AudioPolicyService.cpp
+++ b/services/audiopolicy/AudioPolicyService.cpp
@@ -908,8 +908,10 @@
}
removedCommands.clear();
- // Disable wait for status if delay is not 0
- if (delayMs != 0) {
+ // Disable wait for status if delay is not 0.
+ // Except for create audio patch command because the returned patch handle
+ // is needed by audio policy manager
+ if (delayMs != 0 && command->mCommand != CREATE_AUDIO_PATCH) {
command->mWaitStatus = false;
}