AudioPolicyManager: disable offload mode when streaming.
This is a temporary work around until the root cause is fixed in offload
playback path.
Bug: 23499384
Change-Id: I1ee8197ba8995084287ef9385a0f6a30e4bb9351
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
index 8bb49fa..7d996cc 100644
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
@@ -2200,6 +2200,13 @@
return false;
}
+ // Check if streaming is off, then only allow offload as of now.
+ if (offloadInfo.is_streaming)
+ {
+ ALOGV("isOffloadSupported: is_streaming == true, returning false");
+ return false;
+ }
+
//TODO: enable audio offloading with video when ready
const bool allowOffloadWithVideo =
property_get_bool("audio.offload.video", false /* default_value */);